idlehomescreen/widgetmanager/src/wmconfiguration.cpp
branchRCL_3
changeset 19 79311d856354
parent 18 d05a55b217df
equal deleted inserted replaced
18:d05a55b217df 19:79311d856354
   280             
   280             
   281             if ( !type.Compare( KOpAppTypeS60 ) )
   281             if ( !type.Compare( KOpAppTypeS60 ) )
   282                 {
   282                 {
   283                 iOperatorAppType = ES60;
   283                 iOperatorAppType = ES60;
   284                 iOperatorAppIdUid = StringToUid( appId );
   284                 iOperatorAppIdUid = StringToUid( appId );
   285                 SetOperatorIcon( iOperatorAppIdUid );
   285                 SetOperatorIconL( iOperatorAppIdUid );
   286                 }
   286                 }
   287             else if ( !type.Compare( KOpAppTypeCwrt ) )
   287             else if ( !type.Compare( KOpAppTypeCwrt ) )
   288                 {
   288                 {
   289                 iOperatorAppType = ECwrt;
   289                 iOperatorAppType = ECwrt;
   290                 iOperatorAppIdUid = FetchWidgetUidFromRegistryL( appId );
   290                 iOperatorAppIdUid = FetchWidgetUidFromRegistryL( appId );
   291                 SetOperatorIcon( iOperatorAppIdUid );
   291                 SetOperatorIconL( iOperatorAppIdUid );
   292                 }
   292                 }
   293             else if ( !type.Compare( KOpAppTypeWrt ) )
   293             else if ( !type.Compare( KOpAppTypeWrt ) )
   294                 {
   294                 {
   295                 iOperatorAppType = EWrt;
   295                 iOperatorAppType = EWrt;
   296                 iOperatorAppIdUid = FetchWidgetUidFromRegistryL( appId );
   296                 iOperatorAppIdUid = FetchWidgetUidFromRegistryL( appId );
   297                 SetOperatorIcon( iOperatorAppIdUid );
   297                 SetOperatorIconL( iOperatorAppIdUid );
   298                 }
   298                 }
   299             else if ( !type.Compare( KOpAppTypeJava ) )
   299             else if ( !type.Compare( KOpAppTypeJava ) )
   300                 {
   300                 {
   301                 //TODO: java support is not fully implemented
   301                 //TODO: java support is not fully implemented
   302                 User::Leave( KErrGeneral );
   302                 User::Leave( KErrGeneral );
   305                 }
   305                 }
   306             else if ( !type.Compare( KOpAppTypeQt ) )
   306             else if ( !type.Compare( KOpAppTypeQt ) )
   307                 {
   307                 {
   308                 iOperatorAppType = EQt;
   308                 iOperatorAppType = EQt;
   309                 iOperatorAppIdUid = StringToUid( appId );
   309                 iOperatorAppIdUid = StringToUid( appId );
   310                 SetOperatorIcon( iOperatorAppIdUid );
   310                 SetOperatorIconL( iOperatorAppIdUid );
   311                 }
   311                 }
   312             }
   312             }
   313         CleanupStack::PopAndDestroy( applicationInfo );
   313         CleanupStack::PopAndDestroy( applicationInfo );
   314         }
   314         }
   315     }
   315     }
   316 
   316 
   317 // ---------------------------------------------------------
   317 // ---------------------------------------------------------
   318 // CWmConfiguration::SetOperatorIcon
   318 // CWmConfiguration::SetOperatorIcon
   319 // ---------------------------------------------------------
   319 // ---------------------------------------------------------
   320 //
   320 //
   321 void CWmConfiguration::SetOperatorIcon( TUid aUid )
   321 void CWmConfiguration::SetOperatorIconL( TUid aUid )
   322     {
   322     {
   323     if ( iOperatorButtonIcon &&
   323     if ( iOperatorButtonIcon &&
   324         !iOperatorButtonIcon->Des().Length() )
   324         !iOperatorButtonIcon->Des().Length() )
   325         {
   325         {
   326         delete iOperatorButtonIcon;
   326         delete iOperatorButtonIcon;
   327         iOperatorButtonIcon = NULL;
   327         iOperatorButtonIcon = NULL;
   328         TRAP_IGNORE( iOperatorButtonIcon = HBufC::NewL(
   328         iOperatorButtonIcon = HBufC::NewL(
   329                 KMaxUidName + KOperatorIcon().Length() ) );
   329                 KMaxUidName + KOperatorIcon().Length() );
   330         iOperatorButtonIcon->Des().Format(
   330         iOperatorButtonIcon->Des().Format(
   331                 KOperatorIcon(), aUid );
   331                 KOperatorIcon(), aUid );
   332         }
   332         }
   333     }
   333     }
   334 
   334