diff -r 5456b4e8b3a8 -r 3321d3e205b6 idlehomescreen/xmluirendering/uiengine/src/xnplugindata.cpp --- a/idlehomescreen/xmluirendering/uiengine/src/xnplugindata.cpp Wed Sep 01 12:32:46 2010 +0100 +++ b/idlehomescreen/xmluirendering/uiengine/src/xnplugindata.cpp Tue Sep 14 20:58:58 2010 +0300 @@ -37,6 +37,7 @@ // Constants _LIT8( KLockingStatusLocked, "locked" ); +_LIT8( KLockingStatusPermanent, "permanent" ); // ============================ LOCAL FUNCTIONS ================================ @@ -497,12 +498,22 @@ void CXnPluginData::Flush() { // Don't touch to iOwner, because this plugin might be reused later - + + // clear all flags, except editable and removable + TBool removable = iFlags.IsSet( EIsRemovable ); + TBool editable = iFlags.IsSet( EIsEditable ); + iFlags.ClearAll(); - // This is default - iFlags.Set( EIsRemovable ); - + if( removable ) + { + iFlags.Set( EIsRemovable ); + } + if( editable ) + { + iFlags.Set( EIsEditable ); + } + iNode = NULL; delete iConfigurationId; @@ -551,7 +562,7 @@ } // ----------------------------------------------------------------------------- -// CXnPluginData::SetEmpty() +// CXnPluginData::SetEmptyL() // // ----------------------------------------------------------------------------- // @@ -624,13 +635,20 @@ // void CXnPluginData::SetLockingStatus( const TDesC8& aStatus ) { - if ( aStatus.CompareF( KLockingStatusLocked ) == 0 ) + if( aStatus.CompareF( KLockingStatusPermanent ) == 0 ) { iFlags.Clear( EIsRemovable ); + iFlags.Clear( EIsEditable ); + } + else if( aStatus.CompareF( KLockingStatusLocked ) == 0 ) + { + iFlags.Clear( EIsRemovable ); + iFlags.Set( EIsEditable ); } else { iFlags.Set( EIsRemovable ); + iFlags.Set( EIsEditable ); } }