diff -r ff572dfe6d86 -r 9674c1a575e9 idlehomescreen/xmluirendering/uiengine/src/xnviewdata.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnviewdata.cpp Fri Mar 12 15:41:49 2010 +0200 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnviewdata.cpp Mon Mar 15 12:39:47 2010 +0200 @@ -34,6 +34,7 @@ #include "debug.h" // Constants +const TInt KLoadDelay( 100000 ); const TInt KInterval( 10000 ); // ============================ LOCAL FUNCTIONS ================================ @@ -111,12 +112,11 @@ } if ( aActive ) - { + { + iFlags.Set( EIsActive ); iFlags.Clear( EIsInitial ); - - iFlags.Set( EIsActive ); - - LoadPublishers(); + + LoadPublishers(); } else { @@ -217,12 +217,17 @@ // CXnPluginData* CXnViewData::Plugin( CXnNode* aNode ) { - if ( !aNode ) { return NULL; } + if ( !aNode ) + { + return NULL; + } + CXnDomNode* view( Node() ); + if ( aNode->ViewNodeImpl() ) { // Reached view, return self - if ( Node()->LayoutNode() == aNode ) + if ( view && view->LayoutNode() == aNode ) { return this; } @@ -230,7 +235,9 @@ for ( TInt i = 0; i < iPluginsData.Count(); i++ ) { - if ( iPluginsData[i]->Owner()->LayoutNode() == aNode ) + CXnDomNode* plugin( iPluginsData[i]->Owner() ); + + if ( plugin && plugin->LayoutNode() == aNode ) { return iPluginsData[i]; } @@ -466,7 +473,7 @@ iLoadIndex = 0; - iLoader->Start( TTimeIntervalMicroSeconds32( KInterval ), + iLoader->Start( TTimeIntervalMicroSeconds32( KLoadDelay ), TTimeIntervalMicroSeconds32( KInterval ), TCallBack( DoLoadPublishersL, this ) ); } @@ -505,7 +512,14 @@ TInt reason( plugin->VirginPublishers() ? EAiFwSystemStartup : EAiFwPageStartup ); - if( plugin->LoadPublishers( reason ) != KErrNone ) + TInt ret( plugin->LoadPublishers( reason ) ); + + if ( ret == KErrAlreadyExists ) + { + ret = KErrNone; + } + + if( ret != KErrNone ) { self->iManager.UnloadWidgetFromPluginL( *plugin, ETrue );