mmshplugins/mmshsettingsuiplugin/src/mussettingsmodel.cpp
branchRCL_3
changeset 13 a184f3d659e6
parent 2 b31261fd4e04
child 32 73a1feb507fb
--- a/mmshplugins/mmshsettingsuiplugin/src/mussettingsmodel.cpp	Mon Mar 15 12:40:08 2010 +0200
+++ b/mmshplugins/mmshsettingsuiplugin/src/mussettingsmodel.cpp	Wed Mar 31 21:25:43 2010 +0300
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:  Document model class for MUSSettingsPlugin.
-*  Version     : %version: 17 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: 18 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -100,7 +100,7 @@
     MUS_LOG( "[MUSSET] -> CMusSettingsModel::VSSettingsRecordedVideoSavingL()" )
     TInt vsVideoLocationMode = MultimediaSharingSettings::VideoLocationSettingL();
     MUS_LOG1(
-    "[MUSSET] <- CMusSettingsContainer::VSSettingsRecordedVideoSavingL()( %d )",
+    "[MUSSET] <- CMusSettingsModel::VSSettingsRecordedVideoSavingL()( %d )",
         vsVideoLocationMode )
     return vsVideoLocationMode;
     }
@@ -111,10 +111,10 @@
 //
 void CMusSettingsModel::SetActivationItem( TBool aActive )
     {
-    MUS_LOG( "[MUSSET] -> CMusSettingsContainer::SetActivationItem()" )
+    MUS_LOG( "[MUSSET] -> CMusSettingsModel::SetActivationItem()" )
     MUS_LOG1( "            Profile disabled? ( %d )", aActive )
     iProfileDisabled = aActive;
-    MUS_LOG( "[MUSSET] <- CMusSettingsContainer::SetActivationItem()" )
+    MUS_LOG( "[MUSSET] <- CMusSettingsModel::SetActivationItem()" )
     }
 
 // ----------------------------------------------------------------------------
@@ -123,8 +123,8 @@
 //
 TBool CMusSettingsModel::ActivationItem()
     {
-    MUS_LOG( "[MUSSET] -> CMusSettingsContainer::SetActivationItem()" )
-    MUS_LOG( "[MUSSET] <- CMusSettingsContainer::SetActivationItem()" )
+    MUS_LOG( "[MUSSET] -> CMusSettingsModel::ActivationItem()" )
+    MUS_LOG( "[MUSSET] <- CMusSettingsModel::ActivationItem()" )
     return iProfileDisabled;
     }
 
@@ -171,7 +171,7 @@
 HBufC* CMusSettingsModel::ProfileNameL( TInt aId )
     {
     MUS_LOG1(
-    "[MUSSET] -> CMusSettingsContainer::ProfileNameL()( %d )",
+    "[MUSSET] -> CMusSettingsModel::ProfileNameL()( %d )",
         aId )
     const TDesC8* providerName = 0;
     TInt index = ProfileIndexByIdL( aId );
@@ -255,25 +255,11 @@
        CMusSIPProfileModel& handler = 
            static_cast<CMusSIPProfileModel&>( iHandler );
        TRAPD( error, enabled = handler.ProfileEnabledL());
-       if ( error != KErrNone )
-           {
-           MUS_LOG( "Error returned" )
-           // Problems with re-reading profiles; use existing array
-           SetActivationItem( EFalse );
-           }
-       else
-           {
-           MUS_LOG1("SIP registration service( %d )",
-           enabled )
-           if( enabled )
-               {
-               SetActivationItem( enabled );
-               }
-           else
-               {
-               SetActivationItem( enabled);
-               }
-           }
+       enabled = error != KErrNone ? EFalse : enabled;
+       MUS_LOG2("SIP registration service( %d ), error( %d )", enabled, error )
+       //profile enabled - activation disabled = false 
+       //profile disabled - activation disabled = true 
+       SetActivationItem( !enabled );
        }
     MUS_LOG( "[MUSSET] <- CMusSettingsModel::InitializeProfileEnabler()" )
     }