idlefw/plugins/mcsplugin/settings/src/mcspluginsettingsmodel.cpp
changeset 1 844b978f8d5e
parent 0 79c6a41cd166
child 8 d0529222e3f0
equal deleted inserted replaced
0:79c6a41cd166 1:844b978f8d5e
    49 _LIT8( KProperNameLocked, "locked" );
    49 _LIT8( KProperNameLocked, "locked" );
    50 _LIT8( KProperValueFolder, "folder" );
    50 _LIT8( KProperValueFolder, "folder" );
    51 _LIT8( KProperValueSuite, "suite" );
    51 _LIT8( KProperValueSuite, "suite" );
    52 _LIT8( KProperValueBookmark, "bookmark" );
    52 _LIT8( KProperValueBookmark, "bookmark" );
    53 _LIT8( KProperValueAppl, "application" );
    53 _LIT8( KProperValueAppl, "application" );
    54 _LIT( KSuiteName, "suite_name" );
    54 
    55 
    55 
    56 
    56 
    57 using namespace HSPluginSettingsIf;
    57 using namespace HSPluginSettingsIf;
    58 
    58 
    59 // -----------------------------------------------------------------------------
    59 // -----------------------------------------------------------------------------
   343                 }
   343                 }
   344             else if ( properties[ i ]->Name() == KProperNameParam )
   344             else if ( properties[ i ]->Name() == KProperNameParam )
   345                 {
   345                 {
   346                 TPtrC param = aMenuItem.GetAttributeL( KMenuAttrParam, exists );
   346                 TPtrC param = aMenuItem.GetAttributeL( KMenuAttrParam, exists );
   347                 TBool isFolder = EFalse;
   347                 TBool isFolder = EFalse;
   348                 TBool isSuite = EFalse;
       
   349                 TPtrC type = aMenuItem.Type();
   348                 TPtrC type = aMenuItem.Type();
   350 
   349 
   351                 // is the item folder or suite?
   350                 // is the item folder or suite?
   352 
   351 
   353                 if ( type == KMenuTypeFolder )
   352                 if ( type == KMenuTypeFolder )
   354                     {
   353                     {
   355                     isFolder = ETrue;
   354                     isFolder = ETrue;
   356                     }
   355                     }
   357 
   356 
   358                 if ( type == KMenuTypeSuite )
   357                 if ( exists || isFolder )
   359                     {
       
   360                     isSuite = ETrue;
       
   361                     }
       
   362 
       
   363                 if ( exists || isFolder || isSuite )
       
   364                     {
   358                     {
   365                     // the folder id is stored 
   359                     // the folder id is stored 
   366                     // in param attribute in HSPS
   360                     // in param attribute in HSPS
   367                     if ( isFolder )
   361                     if ( isFolder )
   368                         {
   362                         {
   369                         TBuf<8> number;
   363                         TBuf<8> number;
   370                         number.Num( aMenuItem.Id() );
   364                         number.Num( aMenuItem.Id() );
   371                         param.Set( number );
   365                         param.Set( number );
   372                         }
   366                         }
   373 
   367 
   374                     // the suite_name is stored 
       
   375                     // in param attribute in HSPS
       
   376                     if ( isSuite )
       
   377                         {
       
   378                         TBool suiteNameExists = EFalse;
       
   379                         TPtrC suiteName = aMenuItem.GetAttributeL( KSuiteName, suiteNameExists );
       
   380                         if ( suiteNameExists )
       
   381                             {
       
   382                             param.Set( suiteName );
       
   383                             }
       
   384                         }
       
   385 
       
   386                     HBufC8* param8( NULL );
   368                     HBufC8* param8( NULL );
   387                     param8 = AiUtility::CopyToBufferL( param8, param );
   369                     param8 = AiUtility::CopyToBufferL( param8, param );
   388                     CleanupStack::PushL( param8 );
   370                     CleanupStack::PushL( param8 );
   389                     properties[ i ]->SetValueL( *param8 );
   371                     properties[ i ]->SetValueL( *param8 );
   390                     CleanupStack::PopAndDestroy( param8 );
   372                     CleanupStack::PopAndDestroy( param8 );