idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsmodel.cpp
branchRCL_3
changeset 130 67f2ed48ad91
parent 118 8baec10861af
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsmodel.cpp	Wed Sep 15 12:32:36 2010 +0300
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsmodel.cpp	Wed Oct 13 14:53:46 2010 +0300
@@ -49,7 +49,6 @@
 _LIT8( KProperValueAppl, "application" );
 _LIT8( KProperValueMailbox, "mailbox" );
 _LIT( KMenuTypeMailbox, "menu:mailbox" );
-_LIT8( KMenuAttrInvokeSettingsUid, "0x99999990" );
 
 using namespace HSPluginSettingsIf;
 
@@ -231,7 +230,7 @@
 TSettingItem CMCSPluginSettingsModel::ItemL( 
                  RPointerArray<HSPluginSettingsIf::CPropertyMap>& aProperties )
     {
-    TSettingItem setting = { KErrNotFound, EApplication , EFalse, EFalse };
+    TSettingItem setting = { KErrNotFound, EApplication , EFalse };
 
     TSettingType type = SettingTypeL( aProperties );
     if ( type == EApplication || type == EMailbox )
@@ -244,8 +243,7 @@
         }
     
     setting.locked = SettingLockedL( aProperties );
-    setting.empty = SettingEmptyL( aProperties );
-    
+
     return setting;
     }
 
@@ -303,30 +301,6 @@
     }
 
 // ---------------------------------------------------------------------------
-// Gets empty status of given HSPS entry
-// ---------------------------------------------------------------------------
-//
-TBool CMCSPluginSettingsModel::SettingEmptyL( 
-                RPointerArray<HSPluginSettingsIf::CPropertyMap>& aProperties )
-    {
-        
-    for( TInt i = 0; i <aProperties.Count(); i++ )
-        {
-        TPtrC8 name = aProperties[i]->Name();
-        if( name == KProperNameUid )
-            {
-            TPtrC8 value = aProperties[i]->Value();
-            if( value.Compare(KMenuAttrInvokeSettingsUid) == 0 )
-                {
-                return ETrue;
-                }
-            }
-        }   
-    
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
 // Saves menuitem to HSPS to the given shortcut index
 // ---------------------------------------------------------------------------
 //
@@ -507,8 +481,8 @@
             }
         }
 
-    // EFalse tells that modified settings are not stored to plugin reference
-    User::LeaveIfError( iPluginSettings->SetSettingsL( *iPluginId, settingItems, EFalse ) );
+    // ETrue tells that modified settings are stored also to plugin reference
+    User::LeaveIfError( iPluginSettings->SetSettingsL( *iPluginId, settingItems, ETrue ) );
     CleanupStack::PopAndDestroy(); // settingItems
     }
 
@@ -552,19 +526,10 @@
         // first, we need to check if the item is missing 
         // (application uninstalled or mmc card removed)
         // If it is, we return "Undefined" application name instead
-        // In case of empty item, it's own name is returned
         if ( iSettings[ aIndex ].id == KErrNotFound )
             {
-            if ( iSettings[ aIndex ].empty )
-                {
-                const TDesC& caption = iAppList->EmptyText();
-                TRAP_IGNORE( line.Set( ListBoxLineL( caption, aIndex ) ) )
-                }
-            else
-                {
-                const TDesC& caption = iAppList->UndefinedText();
-                TRAP_IGNORE( line.Set( ListBoxLineL( caption, aIndex ) ) )
-                }
+            const TDesC& caption = iAppList->UndefinedText();
+            TRAP_IGNORE( line.Set( ListBoxLineL( caption, aIndex ) ) )
             }
         else
             {
@@ -601,7 +566,7 @@
 //
 const TSettingItem CMCSPluginSettingsModel::Item( TInt aIndex ) const
     {
-    TSettingItem setting = { KErrNotFound, EApplication, EFalse, EFalse };
+    TSettingItem setting = { KErrNotFound, EApplication, EFalse };
 
     if ( aIndex >= 0 && aIndex < iSettings.Count() )
         {