browserui/browser/SettingsSrc/SettingsContainer.cpp
changeset 10 4530440261a8
parent 1 57d5b8e231c4
child 24 868cceedabd3
equal deleted inserted replaced
5:e45c3f40ea5f 10:4530440261a8
   250 #endif // __RSS_FEEDS
   250 #endif // __RSS_FEEDS
   251 
   251 
   252     
   252     
   253     if (!iPenEnabled)
   253     if (!iPenEnabled)
   254     {
   254     {
   255 	    // Toolbar Category item
   255         // Toolbar Category item
   256         AddCategoryListBoxItemL( R_SETTINGS_CATEGORY_TOOLBAR, *itemArray );
   256         AddCategoryListBoxItemL( R_SETTINGS_CATEGORY_TOOLBAR, *itemArray );
   257         iSettingIndex->AppendL( EWmlSettingsToolbar );
   257         iSettingIndex->AppendL( EWmlSettingsToolbar );
   258 
   258 
   259         // Shortcut Keys Category item
   259         // Shortcut Keys Category item
   260         if(!ApiProvider().Preferences().ShortcutKeysForQwerty())
   260         if(!ApiProvider().Preferences().ShortcutKeysForQwerty())
   261     	    {
   261             {
   262     	    AddCategoryListBoxItemL( R_SETTINGS_CATEGORY_SHORTCUTS, *itemArray );
   262             AddCategoryListBoxItemL( R_SETTINGS_CATEGORY_SHORTCUTS, *itemArray );
   263     	    iSettingIndex->AppendL( EWmlSettingsShortcuts );    	
   263             iSettingIndex->AppendL( EWmlSettingsShortcuts );        
   264     	    }
   264             }
   265     }
   265     }
   266 	    
   266         
   267 
   267 
   268     RestoreListBoxIndexL();
   268     RestoreListBoxIndexL();
   269     
   269     
   270     }
   270     }
   271 
   271 
   377                 !ApiProvider().IsEmbeddedModeOn() )
   377                 !ApiProvider().IsEmbeddedModeOn() )
   378         {
   378         {
   379         AppendHomePageL( itemArray, itemText );
   379         AppendHomePageL( itemArray, itemText );
   380         }
   380         }
   381 
   381 
   382 	// Minimap not supported on touch devices
   382     // Minimap not supported on touch devices
   383     if (!iPenEnabled)
   383     if (!iPenEnabled)
   384 	    {
   384         {
   385 		//MiniMap feature is determined by the PageScaler dll, not by the preference setting.
   385         //MiniMap feature is determined by the PageScaler dll, not by the preference setting.
   386 		//We should query webkit for the feature.
   386         //We should query webkit for the feature.
   387 		if(ApiProvider().WindowMgr().CurrentWindow()->IsPageOverviewSupportedL()) 
   387         if(ApiProvider().WindowMgr().CurrentWindow()->IsPageOverviewSupportedL()) 
   388 			{
   388             {
   389 			// Page Overview
   389             // Page Overview
   390 			AppendPageOverviewL( itemArray, itemText );
   390             AppendPageOverviewL( itemArray, itemText );
   391 			}	    	
   391             }           
   392 	    }
   392         }
   393 
   393 
   394 
   394 
   395 	if(	iApiProvider.Preferences().UiLocalFeatureSupported( KBrowserGraphicalHistory ))
   395     if( iApiProvider.Preferences().UiLocalFeatureSupported( KBrowserGraphicalHistory ))
   396 		{
   396         {
   397 		// Back List
   397         // Back List
   398 	    AppendBackListL( itemArray, itemText );
   398         AppendBackListL( itemArray, itemText );
   399 		}
   399         }
   400 
   400 
   401 	if (!ApiProvider().IsEmbeddedModeOn())
   401     if (!ApiProvider().IsEmbeddedModeOn())
   402 		{
   402         {
   403 		AppendURLSuffixListL(itemArray, itemText);
   403         AppendURLSuffixListL(itemArray, itemText);
   404 		}
   404         }
   405     // Http Security Warnings
   405     // Http Security Warnings
   406     if ( !ApiProvider().Preferences().HttpSecurityWarningsStatSupressed() )
   406     if ( !ApiProvider().Preferences().HttpSecurityWarningsStatSupressed() )
   407         {
   407         {
   408         AppendHttpSecurityWarningsL( itemArray, itemText );
   408         AppendHttpSecurityWarningsL( itemArray, itemText );
   409         }
   409         }
   410 
   410 
   411     // Ecma
   411     // Ecma
   412     AppendEcmaL( itemArray, itemText );
   412     AppendEcmaL( itemArray, itemText );
   413 
   413 
   414 	// Script Logging
   414     // Script Logging
   415     AppendScriptLogL( itemArray, itemText );
   415     AppendScriptLogL( itemArray, itemText );
   416 
   416 
   417     // Downloads open settings 
   417     // Downloads open settings 
   418     if( PROGRESSIVE_DOWNLOAD )
   418     if( PROGRESSIVE_DOWNLOAD )
   419     	{
   419         {
   420     	AppendDownloadsOpenL( itemArray, itemText );
   420         AppendDownloadsOpenL( itemArray, itemText );
   421     	}
   421         }
   422     
   422     
   423     if( ApiProvider().Preferences().SearchFeature() )
   423     if( ApiProvider().Preferences().SearchFeature() )
   424     	{
   424         {
   425     	AppendSearchProviderL( itemArray, itemText );
   425         AppendSearchProviderL( itemArray, itemText );
   426     	}
   426         }
   427 
   427 
   428     RestoreListBoxIndexL();
   428     RestoreListBoxIndexL();
   429     iSettingListBox->DrawNow();
   429     iSettingListBox->DrawNow();
   430     ActivateL();
   430     ActivateL();
   431     }
   431     }
   511     if ( ADAPTIVEBOOKMARKS )
   511     if ( ADAPTIVEBOOKMARKS )
   512         {
   512         {
   513         AppendAdaptiveBookmarksL( itemArray, itemText );
   513         AppendAdaptiveBookmarksL( itemArray, itemText );
   514         }
   514         }
   515 
   515 
   516  	if (iApiProvider.Preferences().UiLocalFeatureSupported(KBrowserAutoFormFill) )
   516     if (iApiProvider.Preferences().UiLocalFeatureSupported(KBrowserAutoFormFill) )
   517  		{
   517         {
   518 	    // Form Data Saving
   518         // Form Data Saving
   519 	    AppendFormDataSavingL( itemArray, itemText );
   519         AppendFormDataSavingL( itemArray, itemText );
   520  		}
   520         }
   521 
   521 
   522     // Cookies
   522     // Cookies
   523     AppendCookiesL( itemArray, itemText );
   523     AppendCookiesL( itemArray, itemText );
   524 
   524 
   525     // IMEI
   525     // IMEI
   683 // -----------------------------------------------------------------------------
   683 // -----------------------------------------------------------------------------
   684 //
   684 //
   685 void CSettingsContainer::AppendDefaultAccessPointL( CDesCArray*& aItemArray,
   685 void CSettingsContainer::AppendDefaultAccessPointL( CDesCArray*& aItemArray,
   686                                                     TBuf<KWmlSettingsItemMaxLength>& aItemText )
   686                                                     TBuf<KWmlSettingsItemMaxLength>& aItemText )
   687     {
   687     {
   688   	//get the connection identifier based on the connection type
   688     //get the connection identifier based on the connection type
   689     switch (ApiProvider().Preferences().AccessPointSelectionMode())
   689     switch (ApiProvider().Preferences().AccessPointSelectionMode())
   690         {
   690         {
   691         case EAlwaysAsk:
   691         case EAlwaysAsk:
   692         	{
   692             {
   693 		    CreateItemFromTwoStringsL( 
   693             #if !defined(BRDO_BROWSER_50_FF)        
   694 		    R_WMLBROWSER_SETTINGS_DEFAULT_AP, 
   694                 CreateItemFromTwoStringsL( 
   695 		    R_WML_SETTINGS_ACCESS_POINT_ASK_WHEN_NEEDED, 
   695                 R_WMLBROWSER_SETTINGS_DEFAULT_AP, 
   696 		    aItemText );
   696                 R_WML_SETTINGS_ACCESS_POINT_ALWAYS_ASK, 
   697 		        
   697                 aItemText );
   698 		    break;	
   698             #else
   699         	}
   699                 CreateItemFromTwoStringsL( 
   700         	
   700                 R_WMLBROWSER_SETTINGS_DEFAULT_AP, 
       
   701                 R_WML_SETTINGS_ACCESS_POINT_ASK_WHEN_NEEDED, 
       
   702                 aItemText );
       
   703             #endif //BRDO_BROWSER_50_FF
       
   704             break;  
       
   705             }
       
   706             
   701         //get the destination identifyer based on the snap Id
   707         //get the destination identifyer based on the snap Id
   702         case EDestination:
   708         case EDestination:
   703         	{
   709             {
   704         	aItemText.Zero();
   710             aItemText.Zero();
   705 		    aItemText.Append( KWmlSettingsListBoxItemPrefix );
   711             aItemText.Append( KWmlSettingsListBoxItemPrefix );
   706 		    HBufC* defaultAp = iCoeEnv->AllocReadResourceLC( 
   712             HBufC* defaultAp = iCoeEnv->AllocReadResourceLC( 
   707 		                            R_WMLBROWSER_SETTINGS_DEFAULT_AP );
   713                                     R_WMLBROWSER_SETTINGS_DEFAULT_AP );
   708 		    aItemText.Append( *defaultAp );
   714             aItemText.Append( *defaultAp );
   709 		    CleanupStack::PopAndDestroy(); // defaultAp
   715             CleanupStack::PopAndDestroy(); // defaultAp
   710 		    aItemText.Append( KWmlSettingsListBoxItemPostfix );
   716             aItemText.Append( KWmlSettingsListBoxItemPostfix );
   711 		    
   717             
   712 		    RCmManager        cmManager;
   718             RCmManager        cmManager;
   713 		    cmManager.OpenL();
   719             cmManager.OpenL();
   714 
   720 
   715             TInt snapId = ApiProvider().Preferences().DefaultSnapId();
   721             TInt snapId = ApiProvider().Preferences().DefaultSnapId();
   716             if (snapId != KWmlNoDefaultSnapId)   
   722             if (snapId != KWmlNoDefaultSnapId)   
   717                 {            
   723                 {            
   718     			TRAPD(err, RCmDestination dest = cmManager.DestinationL( snapId ));
   724                 TRAPD(err, RCmDestination dest = cmManager.DestinationL( snapId ));
   719     			if (err == KErrNone)
   725                 if (err == KErrNone)
   720     			    {
   726                     {
   721         			RCmDestination dest = cmManager.DestinationL( snapId );					
   727                     RCmDestination dest = cmManager.DestinationL( snapId );                 
   722         			CleanupClosePushL( dest );					
   728                     CleanupClosePushL( dest );                  
   723         			HBufC* destName = dest.NameLC();				       					
   729                     HBufC* destName = dest.NameLC();                                        
   724         			aItemText.Append(*destName);
   730                     aItemText.Append(*destName);
   725         			CleanupStack::PopAndDestroy( 2 ); // destName, dest
   731                     CleanupStack::PopAndDestroy( 2 ); // destName, dest
   726         			cmManager.Close();
   732                     cmManager.Close();
   727         			break;
   733                     break;
   728                     }   
   734                     }   
   729                 }
   735                 }
   730             
   736             #if !defined(BRDO_BROWSER_50_FF)
   731             HBufC* name = iCoeEnv->AllocReadResourceLC( R_WML_SETTINGS_ACCESS_POINT_ASK_WHEN_NEEDED );
   737                 HBufC* name = iCoeEnv->AllocReadResourceLC( R_WML_SETTINGS_ACCESS_POINT_ALWAYS_ASK );
       
   738             #else
       
   739                 HBufC* name = iCoeEnv->AllocReadResourceLC( R_WML_SETTINGS_ACCESS_POINT_ASK_WHEN_NEEDED );
       
   740             #endif // BRDO_BROWSER_50_FF
   732             aItemText.Append( *name );
   741             aItemText.Append( *name );
   733             CleanupStack::PopAndDestroy(); // name
   742             CleanupStack::PopAndDestroy(); // name
   734                 
   743                 
   735             ApiProvider().Preferences().SetAccessPointSelectionModeL( EAlwaysAsk );
   744             ApiProvider().Preferences().SetAccessPointSelectionModeL( EAlwaysAsk );
   736 		    cmManager.Close();
   745             cmManager.Close();
   737 
   746 
   738 			break;
   747             break;
   739         	}
   748             }
   740         	
   749             
   741         	//if connecting with Iap Id
   750             //if connecting with Iap Id
   742         case EConnectionMethod:
   751         case EConnectionMethod:
   743             {
   752             {
   744             aItemText.Zero();
   753             aItemText.Zero();
   745             aItemText.Append( KWmlSettingsListBoxItemPrefix );
   754             aItemText.Append( KWmlSettingsListBoxItemPrefix );
   746             HBufC* defaultAp = iCoeEnv->AllocReadResourceLC(
   755             HBufC* defaultAp = iCoeEnv->AllocReadResourceLC(
   758                 aItemText.Append( name );
   767                 aItemText.Append( name );
   759                 CleanupStack::PopAndDestroy();  // au
   768                 CleanupStack::PopAndDestroy();  // au
   760                 }
   769                 }
   761             else
   770             else
   762                 {
   771                 {
   763                 HBufC* name = iCoeEnv->AllocReadResourceLC( R_WML_SETTINGS_ACCESS_POINT_ASK_WHEN_NEEDED );
   772                 #if !defined(BRDO_BROWSER_50_FF)
       
   773                     HBufC* name = iCoeEnv->AllocReadResourceLC( R_WML_SETTINGS_ACCESS_POINT_ALWAYS_ASK );
       
   774                 #else
       
   775                     HBufC* name = iCoeEnv->AllocReadResourceLC( R_WML_SETTINGS_ACCESS_POINT_ASK_WHEN_NEEDED );
       
   776                 #endif // BRDO_BROWSER_50_FF
   764                 aItemText.Append( *name );
   777                 aItemText.Append( *name );
   765                 CleanupStack::PopAndDestroy(); // name
   778                 CleanupStack::PopAndDestroy(); // name
   766                 
   779                 
   767                 ApiProvider().Preferences().SetAccessPointSelectionModeL( EAlwaysAsk  );
   780                 ApiProvider().Preferences().SetAccessPointSelectionModeL( EAlwaysAsk  );
   768                 }
   781                 }
   769 
   782 
   770 		    break;	
   783             break;  
   771         	}
   784             }
   772 
   785 
   773         default:
   786         default:
   774         	{
   787             {
   775         	User::Leave( KErrNotSupported);	
   788             User::Leave( KErrNotSupported); 
   776         	}
   789             }
   777         }
   790         }
   778     
   791     
   779     aItemArray->AppendL( aItemText );
   792     aItemArray->AppendL( aItemText );
   780     iSettingIndex->AppendL( EWmlSettingsAccesspoint );
   793     iSettingIndex->AppendL( EWmlSettingsAccesspoint );
   781     }
   794     }
   850                                               TBuf<KWmlSettingsItemMaxLength>& aItemText)
   863                                               TBuf<KWmlSettingsItemMaxLength>& aItemText)
   851     {
   864     {
   852     if ( iApiProvider.Preferences().PageOverview() )
   865     if ( iApiProvider.Preferences().PageOverview() )
   853         {
   866         {
   854         CreateItemFromTwoStringsL(
   867         CreateItemFromTwoStringsL(
   855 	    R_WMLBROWSER_SETTINGS_PAGEOVERVIEW,
   868         R_WMLBROWSER_SETTINGS_PAGEOVERVIEW,
   856 	    R_WMLBROWSER_SETTINGS_PAGEOVERVIEW_ON,
   869         R_WMLBROWSER_SETTINGS_PAGEOVERVIEW_ON,
   857 	    aItemText );
   870         aItemText );
   858         }
   871         }
   859     else
   872     else
   860         {
   873         {
   861         CreateItemFromTwoStringsL(
   874         CreateItemFromTwoStringsL(
   862 	        R_WMLBROWSER_SETTINGS_PAGEOVERVIEW,
   875             R_WMLBROWSER_SETTINGS_PAGEOVERVIEW,
   863 	        R_WMLBROWSER_SETTINGS_PAGEOVERVIEW_OFF,
   876             R_WMLBROWSER_SETTINGS_PAGEOVERVIEW_OFF,
   864 	        aItemText );
   877             aItemText );
   865         }
   878         }
   866     aItemArray->AppendL( aItemText );
   879     aItemArray->AppendL( aItemText );
   867     iSettingIndex->AppendL( EWmlSettingsPageOverview );
   880     iSettingIndex->AppendL( EWmlSettingsPageOverview );
   868     }
   881     }
   869 
   882 
   876                                               TBuf<KWmlSettingsItemMaxLength>& aItemText)
   889                                               TBuf<KWmlSettingsItemMaxLength>& aItemText)
   877     {
   890     {
   878     if ( iApiProvider.Preferences().ShowToolbarOnOff() )
   891     if ( iApiProvider.Preferences().ShowToolbarOnOff() )
   879         {
   892         {
   880         CreateItemFromTwoStringsL(
   893         CreateItemFromTwoStringsL(
   881 	    R_BROWSER_SETTING_TOOLBAR_ON_OFF,
   894         R_BROWSER_SETTING_TOOLBAR_ON_OFF,
   882 	    R_BROWSER_SETTING_TOOLBAR_ON,
   895         R_BROWSER_SETTING_TOOLBAR_ON,
   883 	    aItemText );
   896         aItemText );
   884         }
   897         }
   885     else
   898     else
   886         {
   899         {
   887         CreateItemFromTwoStringsL(
   900         CreateItemFromTwoStringsL(
   888 	        R_BROWSER_SETTING_TOOLBAR_ON_OFF,
   901             R_BROWSER_SETTING_TOOLBAR_ON_OFF,
   889 	        R_BROWSER_SETTING_TOOLBAR_OFF,
   902             R_BROWSER_SETTING_TOOLBAR_OFF,
   890 	        aItemText );
   903             aItemText );
   891         }
   904         }
   892     aItemArray->AppendL( aItemText );
   905     aItemArray->AppendL( aItemText );
   893     iSettingIndex->AppendL( EWmlSettingsToolbarOnOff );
   906     iSettingIndex->AppendL( EWmlSettingsToolbarOnOff );
   894     }
   907     }
   895 
   908 
   904     //-------------------------------------------------------------------------
   917     //-------------------------------------------------------------------------
   905     // BackList
   918     // BackList
   906    if ( iApiProvider.Preferences().BackList() )
   919    if ( iApiProvider.Preferences().BackList() )
   907         {
   920         {
   908         CreateItemFromTwoStringsL(
   921         CreateItemFromTwoStringsL(
   909 	    R_WMLBROWSER_SETTINGS_BACK_LIST,
   922         R_WMLBROWSER_SETTINGS_BACK_LIST,
   910 	    R_WMLBROWSER_SETTINGS_BACK_LIST_ON,
   923         R_WMLBROWSER_SETTINGS_BACK_LIST_ON,
   911 	    aItemText );
   924         aItemText );
   912         }
   925         }
   913     else
   926     else
   914         {
   927         {
   915         CreateItemFromTwoStringsL(
   928         CreateItemFromTwoStringsL(
   916 	        R_WMLBROWSER_SETTINGS_BACK_LIST,
   929             R_WMLBROWSER_SETTINGS_BACK_LIST,
   917 	        R_WMLBROWSER_SETTINGS_BACK_LIST_OFF,
   930             R_WMLBROWSER_SETTINGS_BACK_LIST_OFF,
   918 	        aItemText );
   931             aItemText );
   919         }
   932         }
   920     aItemArray->AppendL( aItemText );
   933     aItemArray->AppendL( aItemText );
   921     iSettingIndex->AppendL( EWmlSettingsBackList );
   934     iSettingIndex->AppendL( EWmlSettingsBackList );
   922     }
   935     }
   923 
   936 
  1099 // CSettingsContainer::AppendSearchProviderL
  1112 // CSettingsContainer::AppendSearchProviderL
  1100 // -----------------------------------------------------------------------------
  1113 // -----------------------------------------------------------------------------
  1101 void CSettingsContainer::AppendSearchProviderL(
  1114 void CSettingsContainer::AppendSearchProviderL(
  1102                                                       CDesCArray*& aItemArray,
  1115                                                       CDesCArray*& aItemArray,
  1103                                                       TBuf<KWmlSettingsItemMaxLength>& aItemText)
  1116                                                       TBuf<KWmlSettingsItemMaxLength>& aItemText)
  1104 	{
  1117     {
  1105 	aItemText.Zero();
  1118     aItemText.Zero();
  1106     aItemText.Append( KWmlSettingsListBoxItemPrefix );
  1119     aItemText.Append( KWmlSettingsListBoxItemPrefix );
  1107     HBufC* settingTitle = iCoeEnv->AllocReadResourceLC( R_BROWSERS_SETT_WEB_SEARCH_PROVIDER );
  1120     HBufC* settingTitle = iCoeEnv->AllocReadResourceLC( R_BROWSERS_SETT_WEB_SEARCH_PROVIDER );
  1108     aItemText.Append( *settingTitle );
  1121     aItemText.Append( *settingTitle );
  1109     CleanupStack::PopAndDestroy(); // settingTitle
  1122     CleanupStack::PopAndDestroy(); // settingTitle
  1110     aItemText.Append( KWmlSettingsListBoxItemPostfix );
  1123     aItemText.Append( KWmlSettingsListBoxItemPostfix );
  1114     
  1127     
  1115     ApiProvider().Preferences().GetStringValueL( KBrowserSearchProviderTitle,
  1128     ApiProvider().Preferences().GetStringValueL( KBrowserSearchProviderTitle,
  1116             KMaxTitleLength , searchProviderPtr);
  1129             KMaxTitleLength , searchProviderPtr);
  1117     
  1130     
  1118     if(searchProvider->Compare(KNullDesC()) == 0)
  1131     if(searchProvider->Compare(KNullDesC()) == 0)
  1119     	{
  1132         {
  1120     	CleanupStack::PopAndDestroy(searchProvider);
  1133         CleanupStack::PopAndDestroy(searchProvider);
  1121     	searchProvider = iCoeEnv->AllocReadResourceLC( R_IS_LABEL_NOT_SELECTED );
  1134         searchProvider = iCoeEnv->AllocReadResourceLC( R_IS_LABEL_NOT_SELECTED );
  1122     	}
  1135         }
  1123     
  1136     
  1124     aItemText.Append( *searchProvider );
  1137     aItemText.Append( *searchProvider );
  1125     CleanupStack::PopAndDestroy( searchProvider );
  1138     CleanupStack::PopAndDestroy( searchProvider );
  1126     
  1139     
  1127     aItemArray->AppendL( aItemText );
  1140     aItemArray->AppendL( aItemText );
  1128     iSettingIndex->AppendL( EWmlSettingsSearchProvider );
  1141     iSettingIndex->AppendL( EWmlSettingsSearchProvider );
  1129 	}
  1142     }
  1130 
  1143 
  1131 // -----------------------------------------------------------------------------
  1144 // -----------------------------------------------------------------------------
  1132 // CSettingsContainer::AppendAutoLoadContentL
  1145 // CSettingsContainer::AppendAutoLoadContentL
  1133 // -----------------------------------------------------------------------------
  1146 // -----------------------------------------------------------------------------
  1134 //
  1147 //
  1231     HBufC* defaultAp = iCoeEnv->AllocReadResourceLC(
  1244     HBufC* defaultAp = iCoeEnv->AllocReadResourceLC(
  1232                             R_WMLBROWSER_SETTINGS_AUTOUPDATING_AP );
  1245                             R_WMLBROWSER_SETTINGS_AUTOUPDATING_AP );
  1233     aItemText.Append( *defaultAp );
  1246     aItemText.Append( *defaultAp );
  1234     CleanupStack::PopAndDestroy(); // defaultAp
  1247     CleanupStack::PopAndDestroy(); // defaultAp
  1235     aItemText.Append( KWmlSettingsListBoxItemPostfix );
  1248     aItemText.Append( KWmlSettingsListBoxItemPostfix );
  1236 
  1249     
  1237     TBuf< KCommsDbSvrMaxFieldLength > name;
  1250     if ( id == -1 )
  1238     CApUtils* au = CApUtils::NewLC( ApiProvider().CommsModel().CommsDb() );
  1251         {
  1239     TRAP_IGNORE(au->NameL( id, name ));
  1252         // If user hasn't selected an AP, show a blank list entry. Once user
  1240     aItemText.Append( name );
  1253         // selects an AP, it will be displayed.  Note: The browser's default AP
  1241     CleanupStack::PopAndDestroy();  // au
  1254         // is used, until user makes a different AP selection.
       
  1255         aItemText.Append( KNullDesC );
       
  1256         }
       
  1257     else
       
  1258         {
       
  1259         // User (or configuration) has already selected an AP, display its name
       
  1260         TBuf< KCommsDbSvrMaxFieldLength > name;
       
  1261         CApUtils* au = CApUtils::NewLC( ApiProvider().CommsModel().CommsDb() );
       
  1262         TRAP_IGNORE(au->NameL( id, name ));
       
  1263         aItemText.Append( name );
       
  1264         CleanupStack::PopAndDestroy();  // au
       
  1265         }
  1242 
  1266 
  1243     aItemArray->AppendL( aItemText );
  1267     aItemArray->AppendL( aItemText );
  1244     iSettingIndex->AppendL( EWmlSettingsAutomaticUpdatingAP );
  1268     iSettingIndex->AppendL( EWmlSettingsAutomaticUpdatingAP );
  1245     }
  1269     }
  1246 
  1270 
  1254     {
  1278     {
  1255     
  1279     
  1256     if ( iApiProvider.Preferences().AutomaticUpdatingWhileRoaming() )
  1280     if ( iApiProvider.Preferences().AutomaticUpdatingWhileRoaming() )
  1257         {
  1281         {
  1258         CreateItemFromTwoStringsL(
  1282         CreateItemFromTwoStringsL(
  1259 	    R_WMLBROWSER_SETTINGS_AUTOUPDATING_ROAMING,
  1283         R_WMLBROWSER_SETTINGS_AUTOUPDATING_ROAMING,
  1260 	    R_WMLBROWSER_SETTINGS_AUTOUPDATING_ROAMING_ON,
  1284         R_WMLBROWSER_SETTINGS_AUTOUPDATING_ROAMING_ON,
  1261 	    aItemText );
  1285         aItemText );
  1262         }
  1286         }
  1263     else
  1287     else
  1264         {
  1288         {
  1265         CreateItemFromTwoStringsL(
  1289         CreateItemFromTwoStringsL(
  1266 	        R_WMLBROWSER_SETTINGS_AUTOUPDATING_ROAMING,
  1290             R_WMLBROWSER_SETTINGS_AUTOUPDATING_ROAMING,
  1267 	        R_WMLBROWSER_SETTINGS_AUTOUPDATING_ROAMING_OFF,
  1291             R_WMLBROWSER_SETTINGS_AUTOUPDATING_ROAMING_OFF,
  1268 	        aItemText );
  1292             aItemText );
  1269         }
  1293         }
  1270     aItemArray->AppendL( aItemText );
  1294     aItemArray->AppendL( aItemText );
  1271     
  1295     
  1272     iSettingIndex->AppendL( EWmlSettingsAutomaticUpdatingWhileRoaming );
  1296     iSettingIndex->AppendL( EWmlSettingsAutomaticUpdatingWhileRoaming );
  1273     }
  1297     }
  1344     for( int i = 0; i < iEncodingArray->Count(); i++ )
  1368     for( int i = 0; i < iEncodingArray->Count(); i++ )
  1345         {
  1369         {
  1346         if( iEncodingArray->At(i).iSystemId == iEncoding )
  1370         if( iEncodingArray->At(i).iSystemId == iEncoding )
  1347             {
  1371             {
  1348             CreateItemFromTwoStringsL(
  1372             CreateItemFromTwoStringsL(
  1349             		    R_WMLBROWSER_SETTINGS_ENCODING,
  1373                         R_WMLBROWSER_SETTINGS_ENCODING,
  1350             		    iEncodingArray->At(i).iResId,
  1374                         iEncodingArray->At(i).iResId,
  1351             		    aItemText );
  1375                         aItemText );
  1352             currentEncodingFound = ETrue;
  1376             currentEncodingFound = ETrue;
  1353             break;
  1377             break;
  1354             }
  1378             }
  1355         }
  1379         }
  1356 
  1380 
  1398                                             TBuf<KWmlSettingsItemMaxLength>& aItemText)
  1422                                             TBuf<KWmlSettingsItemMaxLength>& aItemText)
  1399     {
  1423     {
  1400     if ( iApiProvider.Preferences().AutoRefresh() )
  1424     if ( iApiProvider.Preferences().AutoRefresh() )
  1401         {
  1425         {
  1402         CreateItemFromTwoStringsL(
  1426         CreateItemFromTwoStringsL(
  1403 	    R_WMLBROWSER_SETTINGS_AUTO_REFRESH,
  1427         R_WMLBROWSER_SETTINGS_AUTO_REFRESH,
  1404 	    R_WMLBROWSER_SETTINGS_AUTO_REFRESH_ON,
  1428         R_WMLBROWSER_SETTINGS_AUTO_REFRESH_ON,
  1405 	    aItemText );
  1429         aItemText );
  1406         }
  1430         }
  1407     else
  1431     else
  1408         {
  1432         {
  1409         CreateItemFromTwoStringsL(
  1433         CreateItemFromTwoStringsL(
  1410 	        R_WMLBROWSER_SETTINGS_AUTO_REFRESH,
  1434             R_WMLBROWSER_SETTINGS_AUTO_REFRESH,
  1411 	        R_WMLBROWSER_SETTINGS_AUTO_REFRESH_OFF,
  1435             R_WMLBROWSER_SETTINGS_AUTO_REFRESH_OFF,
  1412 	        aItemText );
  1436             aItemText );
  1413         }
  1437         }
  1414     aItemArray->AppendL( aItemText );
  1438     aItemArray->AppendL( aItemText );
  1415     iSettingIndex->AppendL( EWmlSettingsAutoRefresh );
  1439     iSettingIndex->AppendL( EWmlSettingsAutoRefresh );
  1416     }
  1440     }
  1417 
  1441 
  1434             break;
  1458             break;
  1435             }
  1459             }
  1436         case EWmlSettingsAdaptiveBookmarksHideFolder:
  1460         case EWmlSettingsAdaptiveBookmarksHideFolder:
  1437             {
  1461             {
  1438             CreateItemFromTwoStringsL(
  1462             CreateItemFromTwoStringsL(
  1439 	                R_WMLBROWSER_SETTINGS_ADAPTIVE_BOOKMARKS,
  1463                     R_WMLBROWSER_SETTINGS_ADAPTIVE_BOOKMARKS,
  1440 	                R_WMLBROWSER_SETTINGS_ADAPTIVE_BOOKMARKS_VALUE_HIDE_FOLDER,
  1464                     R_WMLBROWSER_SETTINGS_ADAPTIVE_BOOKMARKS_VALUE_HIDE_FOLDER,
  1441 	                aItemText );
  1465                     aItemText );
  1442             break;
  1466             break;
  1443             }
  1467             }
  1444         case EWmlSettingsAdaptiveBookmarksOff:
  1468         case EWmlSettingsAdaptiveBookmarksOff:
  1445             {
  1469             {
  1446             CreateItemFromTwoStringsL(
  1470             CreateItemFromTwoStringsL(
  1466                                                TBuf<KWmlSettingsItemMaxLength>& aItemText)
  1490                                                TBuf<KWmlSettingsItemMaxLength>& aItemText)
  1467     {
  1491     {
  1468     switch ( ApiProvider().Preferences().FormDataSaving() )
  1492     switch ( ApiProvider().Preferences().FormDataSaving() )
  1469         {
  1493         {
  1470         case EWmlSettingsFormDataPlusPassword:
  1494         case EWmlSettingsFormDataPlusPassword:
  1471         	{
  1495             {
  1472         	CreateItemFromTwoStringsL(
  1496             CreateItemFromTwoStringsL(
  1473 	            R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING,
  1497                 R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING,
  1474 	            R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING_ON,
  1498                 R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING_ON,
  1475 	            aItemText );
  1499                 aItemText );
  1476 	        break;
  1500             break;
  1477         	}
  1501             }
  1478         case EWmlSettingsFormDataOnly:
  1502         case EWmlSettingsFormDataOnly:
  1479         	{
  1503             {
  1480         	CreateItemFromTwoStringsL(
  1504             CreateItemFromTwoStringsL(
  1481 	            R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING,
  1505                 R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING,
  1482 	            R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING_ONLY,
  1506                 R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING_ONLY,
  1483 	            aItemText );
  1507                 aItemText );
  1484 	        break;
  1508             break;
  1485         	}
  1509             }
  1486         case EWmlSettingsFormDataOff:
  1510         case EWmlSettingsFormDataOff:
  1487         	{
  1511             {
  1488         	CreateItemFromTwoStringsL(
  1512             CreateItemFromTwoStringsL(
  1489 	            R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING,
  1513                 R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING,
  1490 	            R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING_OFF,
  1514                 R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING_OFF,
  1491 	            aItemText );
  1515                 aItemText );
  1492 	        break;
  1516             break;
  1493         	}
  1517             }
  1494 
  1518 
  1495         default:
  1519         default:
  1496             break;
  1520             break;
  1497         }
  1521         }
  1498     aItemArray->AppendL( aItemText );
  1522     aItemArray->AppendL( aItemText );
  1510     switch ( ApiProvider().Preferences().Cookies() )
  1534     switch ( ApiProvider().Preferences().Cookies() )
  1511         {
  1535         {
  1512         case EWmlSettingsCookieAllow:
  1536         case EWmlSettingsCookieAllow:
  1513             {
  1537             {
  1514             CreateItemFromTwoStringsL(
  1538             CreateItemFromTwoStringsL(
  1515 	              R_WMLBROWSER_SETTINGS_COOKIES,
  1539                   R_WMLBROWSER_SETTINGS_COOKIES,
  1516 	              R_WMLBROWSER_SETTINGS_C_VALUE_ALLOW,
  1540                   R_WMLBROWSER_SETTINGS_C_VALUE_ALLOW,
  1517 	              aItemText );
  1541                   aItemText );
  1518             break;
  1542             break;
  1519             }
  1543             }
  1520         case EWmlSettingsCookieReject:
  1544         case EWmlSettingsCookieReject:
  1521             {
  1545             {
  1522             CreateItemFromTwoStringsL(
  1546             CreateItemFromTwoStringsL(
  1523 	              R_WMLBROWSER_SETTINGS_COOKIES,
  1547                   R_WMLBROWSER_SETTINGS_COOKIES,
  1524 	              R_WMLBROWSER_SETTINGS_C_VALUE_REJECT,
  1548                   R_WMLBROWSER_SETTINGS_C_VALUE_REJECT,
  1525 	              aItemText );
  1549                   aItemText );
  1526             break;
  1550             break;
  1527             }
  1551             }
  1528         default:
  1552         default:
  1529             break;
  1553             break;
  1530         }
  1554         }
  1631 // -----------------------------------------------------------------------------
  1655 // -----------------------------------------------------------------------------
  1632 // CSettingsContainer::AppendToolbarButtonsL
  1656 // CSettingsContainer::AppendToolbarButtonsL
  1633 // -----------------------------------------------------------------------------
  1657 // -----------------------------------------------------------------------------
  1634 //
  1658 //
  1635 void CSettingsContainer::AppendToolbarButtonsL( CDesCArray*& aItemArray,
  1659 void CSettingsContainer::AppendToolbarButtonsL( CDesCArray*& aItemArray,
  1636                                          		TBuf<KWmlSettingsItemMaxLength>& aItemText)
  1660                                                 TBuf<KWmlSettingsItemMaxLength>& aItemText)
  1637     {
  1661     {
  1638    
  1662    
  1639     CreateItemFromTwoStringsL(
  1663     CreateItemFromTwoStringsL(
  1640         R_BROWSER_SETTING_TOOLBAR_BUTTON1,
  1664         R_BROWSER_SETTING_TOOLBAR_BUTTON1,
  1641         ToolbarCommandDecodeMatrix[iApiProvider.Preferences().ShowToolbarButton1Cmd()][KToolbarCommandDecodeMatrixStringId],
  1665         ToolbarCommandDecodeMatrix[iApiProvider.Preferences().ShowToolbarButton1Cmd()][KToolbarCommandDecodeMatrixStringId],
  1691 // -----------------------------------------------------------------------------
  1715 // -----------------------------------------------------------------------------
  1692 // CSettingsContainer::AppendShortcutKeysL
  1716 // CSettingsContainer::AppendShortcutKeysL
  1693 // -----------------------------------------------------------------------------
  1717 // -----------------------------------------------------------------------------
  1694 //
  1718 //
  1695 void CSettingsContainer::AppendShortcutKeysL( CDesCArray*& aItemArray,
  1719 void CSettingsContainer::AppendShortcutKeysL( CDesCArray*& aItemArray,
  1696                                          		TBuf<KWmlSettingsItemMaxLength>& aItemText)
  1720                                                 TBuf<KWmlSettingsItemMaxLength>& aItemText)
  1697     {
  1721     {
  1698    
  1722    
  1699     CreateItemFromTwoStringsL(
  1723     CreateItemFromTwoStringsL(
  1700         R_BROWSER_SETTING_SHORTCUT_KEY1,
  1724         R_BROWSER_SETTING_SHORTCUT_KEY1,
  1701         ShortcutsCommandDecodeMatrix[iApiProvider.Preferences().ShortcutKey1Cmd()][KShortcutsCommandDecodeMatrixStringId],
  1725         ShortcutsCommandDecodeMatrix[iApiProvider.Preferences().ShortcutKey1Cmd()][KShortcutsCommandDecodeMatrixStringId],
  1890     switch ( settingsItem )
  1914     switch ( settingsItem )
  1891         {
  1915         {
  1892         case EWmlSettingsAccesspoint:
  1916         case EWmlSettingsAccesspoint:
  1893             {
  1917             {
  1894             TInt err(KErrNone);
  1918             TInt err(KErrNone);
  1895 	        TInt retVal( KErrNone );
  1919             TInt retVal( KErrNone );
  1896 	        //start the connection  dialog
  1920             //start the connection  dialog
  1897 	        CCmApplicationSettingsUi* settings = CCmApplicationSettingsUi::NewL();
  1921             CCmApplicationSettingsUi* settings = CCmApplicationSettingsUi::NewL();
  1898 	        CleanupStack::PushL( settings );
  1922             CleanupStack::PushL( settings );
  1899 	        
  1923             
  1900 	        TCmSettingSelection selection;
  1924             TCmSettingSelection selection;
  1901 	        
  1925             
  1902 	        //
  1926             //
  1903 	        // In Avkon tradition,
  1927             // In Avkon tradition,
  1904 	        // set the id of selection from the existing setting in preferences
  1928             // set the id of selection from the existing setting in preferences
  1905 	        // so it is shown that way in the selection dialog box.
  1929             // so it is shown that way in the selection dialog box.
  1906 	        //
  1930             //
  1907 	        // Note the CCmApplicationSettingsUi API should ensure that if
  1931             // Note the CCmApplicationSettingsUi API should ensure that if
  1908 	        // "Connection Method" was previously selected, it should show up as
  1932             // "Connection Method" was previously selected, it should show up as
  1909 	        // "Uncategorized" being shown selected
  1933             // "Uncategorized" being shown selected
  1910 	        //
  1934             //
  1911 	        switch (preferences.AccessPointSelectionMode())
  1935             switch (preferences.AccessPointSelectionMode())
  1912 		        {	
  1936                 {   
  1913 		        case EAlwaysAsk:
  1937                 case EAlwaysAsk:
  1914 		            {		                
  1938                     {                       
  1915 		            selection.iResult = EAlwaysAsk;
  1939                     selection.iResult = EAlwaysAsk;
  1916 		            selection.iId = preferences.DefaultSnapId();
  1940                     selection.iId = preferences.DefaultSnapId();
  1917 		            break;
  1941                     break;
  1918 		            }
  1942                     }
  1919 		        case EDestination:
  1943                 case EDestination:
  1920 		            {		                
  1944                     {                       
  1921 		            selection.iResult = EDestination;
  1945                     selection.iResult = EDestination;
  1922 		            selection.iId = preferences.DefaultSnapId();
  1946                     selection.iId = preferences.DefaultSnapId();
  1923 		            break;
  1947                     break;
  1924 		            }
  1948                     }
  1925 		        case EConnectionMethod:
  1949                 case EConnectionMethod:
  1926 		            {
  1950                     {
  1927 		            selection.iResult = EConnectionMethod;
  1951                     selection.iResult = EConnectionMethod;
  1928 		            selection.iId = Util::IapIdFromWapIdL( ApiProvider(), preferences.DefaultAccessPoint() );
  1952                     selection.iId = Util::IapIdFromWapIdL( ApiProvider(), preferences.DefaultAccessPoint() );
  1929 		            break;
  1953                     break;
  1930 		            }
  1954                     }
  1931 		        default:
  1955                 default:
  1932 		            // default case, set it to nothing
  1956                     // default case, set it to nothing
  1933 		            selection.iResult = EDefaultConnection;
  1957                     selection.iResult = EDefaultConnection;
  1934 		            break;
  1958                     break;
  1935 		        }
  1959                 }
  1936 	        	        
  1960                         
  1937             // empty filter array because no filtering is wanted
  1961             // empty filter array because no filtering is wanted
  1938             TBearerFilterArray filterArray;
  1962             TBearerFilterArray filterArray;
  1939 	        TRAP ( err, retVal = settings->RunApplicationSettingsL( selection, 
  1963             TRAP ( err, retVal = settings->RunApplicationSettingsL( selection, 
  1940                                                 EShowAlwaysAsk | EShowDestinations | EShowConnectionMethods,
  1964                                                 EShowAlwaysAsk | EShowDestinations | EShowConnectionMethods,
  1941                                                 // turn off SNAP
  1965                                                 // turn off SNAP
  1942 //                                                EShowAlwaysAsk | EShowConnectionMethods,
  1966 //                                                EShowAlwaysAsk | EShowConnectionMethods,
  1943                                                 filterArray ) );
  1967                                                 filterArray ) );
  1944 	        CleanupStack::PopAndDestroy();//settings
  1968             CleanupStack::PopAndDestroy();//settings
  1945         	
  1969             
  1946 	        //if something has been selected
  1970             //if something has been selected
  1947 	        if (retVal)	
  1971             if (retVal) 
  1948 	            {
  1972                 {
  1949 	            //set the selection mode
  1973                 //set the selection mode
  1950                 preferences.SetAccessPointSelectionModeL( 
  1974                 preferences.SetAccessPointSelectionModeL( 
  1951                         STATIC_CAST( TCmSettingSelectionMode, selection.iResult ) );
  1975                         STATIC_CAST( TCmSettingSelectionMode, selection.iResult ) );
  1952 
  1976 
  1953 	            //based on the chosen connection type, store the connection identifier(iapid, snap id, always ask)
  1977                 //based on the chosen connection type, store the connection identifier(iapid, snap id, always ask)
  1954 	            //in the preferences list
  1978                 //in the preferences list
  1955 	            switch (preferences.AccessPointSelectionMode())
  1979                 switch (preferences.AccessPointSelectionMode())
  1956 		            {			
  1980                     {           
  1957 		            case EConnectionMethod:
  1981                     case EConnectionMethod:
  1958 			            {
  1982                         {
  1959 			            BROWSER_LOG( ( _L( "CSettingsContainer::ChangeItemL CApSettingsHandler" ) ) );
  1983                         BROWSER_LOG( ( _L( "CSettingsContainer::ChangeItemL CApSettingsHandler" ) ) );
  1960             			    
  1984                             
  1961 			            TUint32 id = preferences.DefaultAccessPoint();
  1985                         TUint32 id = preferences.DefaultAccessPoint();
  1962                         // CMManager gives us IAPid, need to translate to WAPid
  1986                         // CMManager gives us IAPid, need to translate to WAPid
  1963 			            if (selection.iId != 0)
  1987                         if (selection.iId != 0)
  1964 			                {                   		
  1988                             {                           
  1965 			                id = Util::WapIdFromIapIdL( ApiProvider(), selection.iId ); 
  1989                             id = Util::WapIdFromIapIdL( ApiProvider(), selection.iId ); 
  1966 			                }			    			    
  1990                             }                               
  1967 			            preferences.SetDefaultAccessPointL( id );
  1991                         preferences.SetDefaultAccessPointL( id );
  1968 			            BROWSER_LOG( ( _L( " SetDefaultAccessPointL OK" ) ) );
  1992                         BROWSER_LOG( ( _L( " SetDefaultAccessPointL OK" ) ) );
  1969 			            // Requested AP is preset for PushMtm
  1993                         // Requested AP is preset for PushMtm
  1970 			            ApiProvider().SetRequestedAP( preferences.DefaultAccessPoint() );
  1994                         ApiProvider().SetRequestedAP( preferences.DefaultAccessPoint() );
  1971 			            break;	
  1995                         break;  
  1972 			            }
  1996                         }
  1973 
  1997 
  1974 		            case EDestination:
  1998                     case EDestination:
  1975 			            {
  1999                         {
  1976 			            TUint32 snapId = preferences.DefaultSnapId();
  2000                         TUint32 snapId = preferences.DefaultSnapId();
  1977 			            if (selection.iId != 0)
  2001                         if (selection.iId != 0)
  1978 			                {                   		
  2002                             {                           
  1979 			                snapId = selection.iId;
  2003                             snapId = selection.iId;
  1980 			                }			        
  2004                             }                   
  1981 			            preferences.SetDefaultSnapId( snapId );
  2005                         preferences.SetDefaultSnapId( snapId );
  1982 
  2006 
  1983 			            break;	
  2007                         break;  
  1984 			            }
  2008                         }
  1985 
  2009 
  1986 		            case EAlwaysAsk:
  2010                     case EAlwaysAsk:
  1987 			            {
  2011                         {
  1988 			            break;	
  2012                         break;  
  1989 			            }
  2013                         }
  1990 
  2014 
  1991 		            default:
  2015                     default:
  1992 			            {
  2016                         {
  1993 			            LOG_ENTERFN(" Wrong value in CSettingsContainer::ChangeItemL");
  2017                         LOG_ENTERFN(" Wrong value in CSettingsContainer::ChangeItemL");
  1994 			            }
  2018                         }
  1995 		            }			
  2019                     }           
  1996 	            }
  2020                 }
  1997 
  2021 
  1998 	        DisplayGeneralSettingsL();
  2022             DisplayGeneralSettingsL();
  1999 	        BROWSER_LOG( ( _L( "DisplayGeneralSettingsL OK" ) ) );
  2023             BROWSER_LOG( ( _L( "DisplayGeneralSettingsL OK" ) ) );
  2000 
  2024 
  2001             break;
  2025             break;
  2002 	        }
  2026             }
  2003 
  2027 
  2004         case EWmlSettingsAutoLoadContent:
  2028         case EWmlSettingsAutoLoadContent:
  2005     		{
  2029             {
  2006        		if(iFlashPluginPresent)
  2030             if(iFlashPluginPresent)
  2007     		    {
  2031                 {
  2008     		    value = 2 - preferences.AutoLoadContent();
  2032                 value = 2 - preferences.AutoLoadContent();
  2009     		    
  2033                 
  2010     		    values->AppendL( R_WMLBROWSER_SETTINGS_AUTOLOAD_ALL );              // 2
  2034                 values->AppendL( R_WMLBROWSER_SETTINGS_AUTOLOAD_ALL );              // 2
  2011     	    	values->AppendL( R_WMLBROWSER_SETTINGS_AUTOLOAD_IMAGES_NO_FLASH );  // 1
  2035                 values->AppendL( R_WMLBROWSER_SETTINGS_AUTOLOAD_IMAGES_NO_FLASH );  // 1
  2012     		    values->AppendL( R_WMLBROWSER_SETTINGS_AUTOLOAD_TEXT );             // 0
  2036                 values->AppendL( R_WMLBROWSER_SETTINGS_AUTOLOAD_TEXT );             // 0
  2013     		    
  2037                 
  2014         	    value = 2 - (ShowRadioButtonSettingPageL(R_WMLBROWSER_SETTINGS_AUTOLOAD_CONTENT,
  2038                 value = 2 - (ShowRadioButtonSettingPageL(R_WMLBROWSER_SETTINGS_AUTOLOAD_CONTENT,
  2015                                                             values,
  2039                                                             values,
  2016                                                             value ));
  2040                                                             value ));
  2017     		    }
  2041                 }
  2018 		    else
  2042             else
  2019 		        {
  2043                 {
  2020 		        // Below is cenrep values for Load Content for cenrep key KBrowserNGImagesEnabled
  2044                 // Below is cenrep values for Load Content for cenrep key KBrowserNGImagesEnabled
  2021 		        // Load Content 
  2045                 // Load Content 
  2022                 // Valid values: 
  2046                 // Valid values: 
  2023                 // If flash plugin is present: 0 = Text only, 1 = Images,No flash, 2 = All
  2047                 // If flash plugin is present: 0 = Text only, 1 = Images,No flash, 2 = All
  2024                 // If flash plugin is not present 0 = Text only, 1 = All
  2048                 // If flash plugin is not present 0 = Text only, 1 = All
  2025                 
  2049                 
  2026                 // Based on this we have to manually translate the value of 1 from Images,No flash to All 
  2050                 // Based on this we have to manually translate the value of 1 from Images,No flash to All 
  2027                 // in case where the flash plugin is not present.
  2051                 // in case where the flash plugin is not present.
  2028 
  2052 
  2029 
  2053 
  2030     		    value = 1 - preferences.AutoLoadContent();
  2054                 value = 1 - preferences.AutoLoadContent();
  2031 
  2055 
  2032                 if ( value < 0 )
  2056                 if ( value < 0 )
  2033                     {
  2057                     {
  2034                     // for case of EWmlSettingsAutoloadAll value would be negative ;
  2058                     // for case of EWmlSettingsAutoloadAll value would be negative ;
  2035                     // reset to 0 to prevent crash later
  2059                     // reset to 0 to prevent crash later
  2036                     value = 0; 
  2060                     value = 0; 
  2037                     }
  2061                     }
  2038                     
  2062                     
  2039     		    values->AppendL( R_WMLBROWSER_SETTINGS_AUTOLOAD_ALL );  // 1 (translated from 2 when flash plugin is present)
  2063                 values->AppendL( R_WMLBROWSER_SETTINGS_AUTOLOAD_ALL );  // 1 (translated from 2 when flash plugin is present)
  2040     		    values->AppendL( R_WMLBROWSER_SETTINGS_AUTOLOAD_TEXT ); // 0
  2064                 values->AppendL( R_WMLBROWSER_SETTINGS_AUTOLOAD_TEXT ); // 0
  2041     		    
  2065                 
  2042         	    value = 1 - (ShowRadioButtonSettingPageL(R_WMLBROWSER_SETTINGS_AUTOLOAD_CONTENT,
  2066                 value = 1 - (ShowRadioButtonSettingPageL(R_WMLBROWSER_SETTINGS_AUTOLOAD_CONTENT,
  2043                                                               values,
  2067                                                               values,
  2044                                                               value ));                
  2068                                                               value ));                
  2045                                                               
  2069                                                               
  2046                 if (value == EWmlSettingsAutoloadImagesNoFlash)
  2070                 if (value == EWmlSettingsAutoloadImagesNoFlash)
  2047                     // Flash plugin not present so reset value from 1 to 2
  2071                     // Flash plugin not present so reset value from 1 to 2
  2048                     {
  2072                     {
  2049                     value = EWmlSettingsAutoloadAll;
  2073                     value = EWmlSettingsAutoloadAll;
  2050                     }
  2074                     }
  2051 		        }
  2075                 }
  2052 
  2076 
  2053     		preferences.SetAutoLoadContentL( value );
  2077             preferences.SetAutoLoadContentL( value );
  2054                 DisplayPageSettingsL();
  2078                 DisplayPageSettingsL();
  2055     		break;
  2079             break;
  2056     		}
  2080             }
  2057 
  2081 
  2058         case EWmlSettingsFontSize:
  2082         case EWmlSettingsFontSize:
  2059              {
  2083              {
  2060              //The relationship between index and fontsize is awkward because 
  2084              //The relationship between index and fontsize is awkward because 
  2061              //the radio buttons reverse the order and the routine called tries
  2085              //the radio buttons reverse the order and the routine called tries
  2090              DisplayPageSettingsL();
  2114              DisplayPageSettingsL();
  2091              break;
  2115              break;
  2092              }
  2116              }
  2093 
  2117 
  2094         case EWmlSettingsPageOverview:
  2118         case EWmlSettingsPageOverview:
  2095     		{
  2119             {
  2096  		    if( ApiProvider().WindowMgr().CurrentWindow()->IsPageOverviewSupportedL() )
  2120             if( ApiProvider().WindowMgr().CurrentWindow()->IsPageOverviewSupportedL() )
  2097                 {
  2121                 {
  2098      		    values->AppendL( R_WMLBROWSER_SETTINGS_PAGEOVERVIEW_OFF );
  2122                 values->AppendL( R_WMLBROWSER_SETTINGS_PAGEOVERVIEW_OFF );
  2099      		    values->AppendL( R_WMLBROWSER_SETTINGS_PAGEOVERVIEW_ON );
  2123                 values->AppendL( R_WMLBROWSER_SETTINGS_PAGEOVERVIEW_ON );
  2100      		    value = preferences.PageOverview();
  2124                 value = preferences.PageOverview();
  2101      		    value = aSelectKeyWasPressed ?
  2125                 value = aSelectKeyWasPressed ?
  2102      		    1 - value :
  2126                 1 - value :
  2103      		    ShowRadioButtonSettingPageL(
  2127                 ShowRadioButtonSettingPageL(
  2104      			    R_WMLBROWSER_SETTINGS_PAGEOVERVIEW,
  2128                     R_WMLBROWSER_SETTINGS_PAGEOVERVIEW,
  2105      			    values,
  2129                     values,
  2106      			    value );
  2130                     value );
  2107      		    preferences.SetPageOverviewL( value );
  2131                 preferences.SetPageOverviewL( value );
  2108                 DisplayGeneralSettingsL();
  2132                 DisplayGeneralSettingsL();
  2109                 }
  2133                 }
  2110     		break;
  2134             break;
  2111     		}
  2135             }
  2112 
  2136 
  2113     	case EWmlSettingsBackList:
  2137         case EWmlSettingsBackList:
  2114     		{
  2138             {
  2115     		values->AppendL( R_WMLBROWSER_SETTINGS_BACK_LIST_OFF );
  2139             values->AppendL( R_WMLBROWSER_SETTINGS_BACK_LIST_OFF );
  2116     		values->AppendL( R_WMLBROWSER_SETTINGS_BACK_LIST_ON );
  2140             values->AppendL( R_WMLBROWSER_SETTINGS_BACK_LIST_ON );
  2117     		value = preferences.BackList();
  2141             value = preferences.BackList();
  2118     		value = aSelectKeyWasPressed ?
  2142             value = aSelectKeyWasPressed ?
  2119     		1 - value :
  2143             1 - value :
  2120     		ShowRadioButtonSettingPageL(
  2144             ShowRadioButtonSettingPageL(
  2121     			R_WMLBROWSER_SETTINGS_BACK_LIST,
  2145                 R_WMLBROWSER_SETTINGS_BACK_LIST,
  2122     			values,
  2146                 values,
  2123     			value );
  2147                 value );
  2124     		preferences.SetBackListL( value );
  2148             preferences.SetBackListL( value );
  2125                 DisplayGeneralSettingsL();
  2149                 DisplayGeneralSettingsL();
  2126     		break;
  2150             break;
  2127     		}
  2151             }
  2128     	case EWmlSettingsUrlSuffix:
  2152         case EWmlSettingsUrlSuffix:
  2129         	{
  2153             {
  2130 	        TInt ret;
  2154             TInt ret;
  2131 
  2155 
  2132 	        HBufC* suffixBuf = iApiProvider.Preferences().URLSuffixList();
  2156             HBufC* suffixBuf = iApiProvider.Preferences().URLSuffixList();
  2133 	        HBufC* suffixToPass = HBufC::NewLC( KMaxSearchPgUrlLength );
  2157             HBufC* suffixToPass = HBufC::NewLC( KMaxSearchPgUrlLength );
  2134 	        suffixToPass = suffixBuf;
  2158             suffixToPass = suffixBuf;
  2135 	        TPtr ptr = suffixToPass->Des();
  2159             TPtr ptr = suffixToPass->Des();
  2136 
  2160 
  2137 	        TInt resource = R_URL_SUFFIX_PAGE;
  2161             TInt resource = R_URL_SUFFIX_PAGE;
  2138 
  2162 
  2139 	        CAknSettingPage* dlg = new ( ELeave ) CAknTextSettingPage( 
  2163             CAknSettingPage* dlg = new ( ELeave ) CAknTextSettingPage( 
  2140 	                resource, ptr, CAknTextSettingPage::EZeroLengthAllowed );
  2164                     resource, ptr, CAknTextSettingPage::EZeroLengthAllowed );
  2141 
  2165 
  2142 	        ret = dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged );
  2166             ret = dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged );
  2143 
  2167 
  2144 	        if ( ret )
  2168             if ( ret )
  2145 	            {
  2169                 {
  2146 	            iApiProvider.Preferences().SetURLSuffixList(suffixToPass);
  2170                 iApiProvider.Preferences().SetURLSuffixList(suffixToPass);
  2147 	            }
  2171                 }
  2148 	        
  2172             
  2149 	        CleanupStack::PopAndDestroy(); // suffixToPass
  2173             CleanupStack::PopAndDestroy(); // suffixToPass
  2150             DisplayGeneralSettingsL();
  2174             DisplayGeneralSettingsL();
  2151 	        break;
  2175             break;
  2152         	}
  2176             }
  2153     	case EWmlSettingsAutoRefresh:
  2177         case EWmlSettingsAutoRefresh:
  2154     		{
  2178             {
  2155     		values->AppendL( R_WMLBROWSER_SETTINGS_AUTO_REFRESH_OFF );
  2179             values->AppendL( R_WMLBROWSER_SETTINGS_AUTO_REFRESH_OFF );
  2156     		values->AppendL( R_WMLBROWSER_SETTINGS_AUTO_REFRESH_ON );
  2180             values->AppendL( R_WMLBROWSER_SETTINGS_AUTO_REFRESH_ON );
  2157     		value = preferences.AutoRefresh();
  2181             value = preferences.AutoRefresh();
  2158     		value = aSelectKeyWasPressed ?
  2182             value = aSelectKeyWasPressed ?
  2159     		1 - value :
  2183             1 - value :
  2160     		ShowRadioButtonSettingPageL(
  2184             ShowRadioButtonSettingPageL(
  2161     			R_WMLBROWSER_SETTINGS_AUTO_REFRESH,
  2185                 R_WMLBROWSER_SETTINGS_AUTO_REFRESH,
  2162     			values,
  2186                 values,
  2163     			value );
  2187                 value );
  2164     		preferences.SetAutoRefreshL( value );
  2188             preferences.SetAutoRefreshL( value );
  2165                 DisplayPageSettingsL();
  2189                 DisplayPageSettingsL();
  2166     		break;
  2190             break;
  2167     		}
  2191             }
  2168 
  2192 
  2169     case EWmlSettingsEncoding:
  2193     case EWmlSettingsEncoding:
  2170         {
  2194         {
  2171         TInt highlightedItemIndex = KDoesntExist;
  2195         TInt highlightedItemIndex = KDoesntExist;
  2172         TInt lathinIndex = KDoesntExist;
  2196         TInt lathinIndex = KDoesntExist;
  2223             values->AppendL(
  2247             values->AppendL(
  2224                     R_WMLBROWSER_SETTINGS_ADAPTIVE_BOOKMARKS_VALUE_ON );
  2248                     R_WMLBROWSER_SETTINGS_ADAPTIVE_BOOKMARKS_VALUE_ON );
  2225 
  2249 
  2226             value = 2-preferences.AdaptiveBookmarks();
  2250             value = 2-preferences.AdaptiveBookmarks();
  2227             value = ShowRadioButtonSettingPageL(
  2251             value = ShowRadioButtonSettingPageL(
  2228             	R_WMLBROWSER_SETTINGS_ADAPTIVE_BOOKMARKS,
  2252                 R_WMLBROWSER_SETTINGS_ADAPTIVE_BOOKMARKS,
  2229             	values,
  2253                 values,
  2230             	value );
  2254                 value );
  2231             preferences.SetAdaptiveBookmarksL(
  2255             preferences.SetAdaptiveBookmarksL(
  2232                                 ( TWmlSettingsAdaptiveBookmarks )(2-value) );
  2256                                 ( TWmlSettingsAdaptiveBookmarks )(2-value) );
  2233             DisplayPrivacySettingsL();
  2257             DisplayPrivacySettingsL();
  2234             break;
  2258             break;
  2235             }
  2259             }
  2236 
  2260 
  2237         case EWmlSettingsFormDataSaving:
  2261         case EWmlSettingsFormDataSaving:
  2238     	    {
  2262             {
  2239     	    values->AppendL( R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING_OFF );
  2263             values->AppendL( R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING_OFF );
  2240             values->AppendL( R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING_ONLY );
  2264             values->AppendL( R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING_ONLY );
  2241             values->AppendL( R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING_ON );
  2265             values->AppendL( R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING_ON );
  2242 
  2266 
  2243             value = preferences.FormDataSaving();
  2267             value = preferences.FormDataSaving();
  2244             TInt origValue(value);
  2268             TInt origValue(value);
  2245             value = ShowRadioButtonSettingPageL(
  2269             value = ShowRadioButtonSettingPageL(
  2246     	            R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING,
  2270                     R_WMLBROWSER_SETTINGS_FORM_DATA_SAVING,
  2247     	            values,
  2271                     values,
  2248     	            value );
  2272                     value );
  2249             preferences.SetFormDataSavingL( (TWmlSettingsFormData) value );
  2273             preferences.SetFormDataSavingL( (TWmlSettingsFormData) value );
  2250 
  2274 
  2251             if (origValue > value)
  2275             if (origValue > value)
  2252             	{
  2276                 {
  2253             	// query to see if we need to delete stored form data
  2277                 // query to see if we need to delete stored form data
  2254             	if (origValue == EWmlSettingsFormDataPlusPassword && value == EWmlSettingsFormDataOnly)
  2278                 if (origValue == EWmlSettingsFormDataPlusPassword && value == EWmlSettingsFormDataOnly)
  2255             		{
  2279                     {
  2256             		// delete password data?
  2280                     // delete password data?
  2257             		ShowFormDataDeletePasswordQueryDialogL();
  2281                     ShowFormDataDeletePasswordQueryDialogL();
  2258             		}
  2282                     }
  2259             	else if (origValue == EWmlSettingsFormDataPlusPassword && value == EWmlSettingsFormDataOff)
  2283                 else if (origValue == EWmlSettingsFormDataPlusPassword && value == EWmlSettingsFormDataOff)
  2260             		{
  2284                     {
  2261             		// delete password and form data
  2285                     // delete password and form data
  2262             		ShowFormDataDeleteAllQueryDialogL();
  2286                     ShowFormDataDeleteAllQueryDialogL();
  2263             		}
  2287                     }
  2264             	else if (origValue == EWmlSettingsFormDataOnly && value == EWmlSettingsFormDataOff)
  2288                 else if (origValue == EWmlSettingsFormDataOnly && value == EWmlSettingsFormDataOff)
  2265             		{
  2289                     {
  2266             		// delete form data
  2290                     // delete form data
  2267             		ShowFormDataDeleteAllQueryDialogL();
  2291                     ShowFormDataDeleteAllQueryDialogL();
  2268             		}
  2292                     }
  2269             	}
  2293                 }
  2270 
  2294 
  2271             DisplayPrivacySettingsL();
  2295             DisplayPrivacySettingsL();
  2272     	    break;
  2296             break;
  2273     	    }
  2297             }
  2274 
  2298 
  2275         case EWmlSettingsFullScreen:
  2299         case EWmlSettingsFullScreen:
  2276             {
  2300             {
  2277             
  2301             
  2278             values->AppendL( R_WMLBROWSER_SETTINGS_SOFTKEYS_OFF );
  2302             values->AppendL( R_WMLBROWSER_SETTINGS_SOFTKEYS_OFF );
  2279  		    values->AppendL( R_WMLBROWSER_SETTINGS_SOFTKEYS_ON );
  2303             values->AppendL( R_WMLBROWSER_SETTINGS_SOFTKEYS_ON );
  2280             value = preferences.FullScreen(); 
  2304             value = preferences.FullScreen(); 
  2281  		    value = aSelectKeyWasPressed ?
  2305             value = aSelectKeyWasPressed ?
  2282  		    1 - value :
  2306             1 - value :
  2283  		    ShowRadioButtonSettingPageL(
  2307             ShowRadioButtonSettingPageL(
  2284  			    R_WMLBROWSER_SETTINGS_SOFTKEYS,
  2308                 R_WMLBROWSER_SETTINGS_SOFTKEYS,
  2285  			    values,
  2309                 values,
  2286  			    value );
  2310                 value );
  2287  		    preferences.SetFullScreenL( ( TWmlSettingsFullScreen )( value ) );
  2311             preferences.SetFullScreenL( ( TWmlSettingsFullScreen )( value ) );
  2288             DisplayPageSettingsL();
  2312             DisplayPageSettingsL();
  2289             break;
  2313             break;
  2290             }
  2314             }
  2291 
  2315 
  2292     case EWmlSettingsHomePage:
  2316     case EWmlSettingsHomePage:
  2310        TBool dialogCancel( ETrue );
  2334        TBool dialogCancel( ETrue );
  2311        while( dialogCancel )
  2335        while( dialogCancel )
  2312            {
  2336            {
  2313            value = preferences.HomePageType();
  2337            value = preferences.HomePageType();
  2314            if( !useCurrent )
  2338            if( !useCurrent )
  2315            		{
  2339                 {
  2316 	            // 'Use current' is not shown as current item
  2340                 // 'Use current' is not shown as current item
  2317            		if( (TWmlSettingsHomePage)value == EWmlSettingsHomePageUseCurrent )
  2341                 if( (TWmlSettingsHomePage)value == EWmlSettingsHomePageUseCurrent )
  2318            			{
  2342                     {
  2319 		            value = EWmlSettingsHomePageAddress;
  2343                     value = EWmlSettingsHomePageAddress;
  2320            			}
  2344                     }
  2321            		// items behind UseCurrent must be shifted below
  2345                 // items behind UseCurrent must be shifted below
  2322            		else if( (TWmlSettingsHomePage)value > EWmlSettingsHomePageUseCurrent )
  2346                 else if( (TWmlSettingsHomePage)value > EWmlSettingsHomePageUseCurrent )
  2323            			{
  2347                     {
  2324            			--value;
  2348                     --value;
  2325            			}
  2349                     }
  2326            		}
  2350                 }
  2327            // sanity check
  2351            // sanity check
  2328            if( value >= 7 + useCurrent )
  2352            if( value >= 7 + useCurrent )
  2329                {
  2353                {
  2330                value = 7 + useCurrent;
  2354                value = 7 + useCurrent;
  2331                }
  2355                }
  2395            }
  2419            }
  2396        CleanupStack::PopAndDestroy( url );  // url
  2420        CleanupStack::PopAndDestroy( url );  // url
  2397        break;
  2421        break;
  2398        }
  2422        }
  2399 
  2423 
  2400 	case EWmlSettingsAutomaticUpdatingAP:
  2424     case EWmlSettingsAutomaticUpdatingAP:
  2401 		{
  2425         {
  2402         TUint32 id = preferences.AutomaticUpdatingAP();
  2426         TUint32 id = preferences.AutomaticUpdatingAP();
  2403         SelectUserDefinedAPL( id );
  2427         SelectUserDefinedAPL( id );
  2404 
  2428 
  2405         preferences.SetAutomaticUpdatingApL( id );
  2429         preferences.SetAutomaticUpdatingApL( id );
  2406         BROWSER_LOG( ( _L( "EWmlSettingsAutomaticUpdatingAP SetAutomaticUpdatingApL()" ) ) );
  2430         BROWSER_LOG( ( _L( "EWmlSettingsAutomaticUpdatingAP SetAutomaticUpdatingApL()" ) ) );
  2407 
  2431 
  2408         DisplayWebFeedsSettingsL();
  2432         DisplayWebFeedsSettingsL();
  2409 	    BROWSER_LOG( ( _L( "EWmlSettingsAutomaticUpdatingAP DisplayWebFeedsSettingsL()" ) ) );
  2433         BROWSER_LOG( ( _L( "EWmlSettingsAutomaticUpdatingAP DisplayWebFeedsSettingsL()" ) ) );
  2410 		break;
  2434         break;
  2411 		}
  2435         }
  2412 
  2436 
  2413 	case EWmlSettingsMediaVolume:
  2437     case EWmlSettingsMediaVolume:
  2414 		{
  2438         {
  2415 		// Add option list items
  2439         // Add option list items
  2416 		values->AppendL( R_WMLBROWSER_SETTINGS_MEDIA_VOLUME_4 );
  2440         values->AppendL( R_WMLBROWSER_SETTINGS_MEDIA_VOLUME_4 );
  2417 		values->AppendL( R_WMLBROWSER_SETTINGS_MEDIA_VOLUME_3 );
  2441         values->AppendL( R_WMLBROWSER_SETTINGS_MEDIA_VOLUME_3 );
  2418 		values->AppendL( R_WMLBROWSER_SETTINGS_MEDIA_VOLUME_2 );
  2442         values->AppendL( R_WMLBROWSER_SETTINGS_MEDIA_VOLUME_2 );
  2419 		values->AppendL( R_WMLBROWSER_SETTINGS_MEDIA_VOLUME_1 );
  2443         values->AppendL( R_WMLBROWSER_SETTINGS_MEDIA_VOLUME_1 );
  2420 		values->AppendL( R_WMLBROWSER_SETTINGS_MEDIA_VOLUME_MUTED );
  2444         values->AppendL( R_WMLBROWSER_SETTINGS_MEDIA_VOLUME_MUTED );
  2421 
  2445 
  2422 		TInt itemcount = values->Count();
  2446         TInt itemcount = values->Count();
  2423 
  2447 
  2424 		// Get Media Volume Value
  2448         // Get Media Volume Value
  2425 		value = preferences.MediaVolume();
  2449         value = preferences.MediaVolume();
  2426 
  2450 
  2427 		// Convert volume to list index
  2451         // Convert volume to list index
  2428 		switch ( value )
  2452         switch ( value )
  2429 			{
  2453             {
  2430 			case EWmlSettingsVolumeMuted:
  2454             case EWmlSettingsVolumeMuted:
  2431 				value = EVolumeMute;
  2455                 value = EVolumeMute;
  2432 				break;
  2456                 break;
  2433 			case EWmlSettingsVolume1:
  2457             case EWmlSettingsVolume1:
  2434 				value = EVolumeLevel1;
  2458                 value = EVolumeLevel1;
  2435 				break;
  2459                 break;
  2436 			case EWmlSettingsVolume2:
  2460             case EWmlSettingsVolume2:
  2437 				value = EVolumeLevel2;
  2461                 value = EVolumeLevel2;
  2438 				break;
  2462                 break;
  2439 			case EWmlSettingsVolume3:
  2463             case EWmlSettingsVolume3:
  2440 				value = EVolumeLevel3;
  2464                 value = EVolumeLevel3;
  2441 				break;
  2465                 break;
  2442 			case EWmlSettingsVolume4:
  2466             case EWmlSettingsVolume4:
  2443 				value = EVolumeLevel4;
  2467                 value = EVolumeLevel4;
  2444 				break;
  2468                 break;
  2445 			default:
  2469             default:
  2446 				break;
  2470                 break;
  2447 			}
  2471             }
  2448 
  2472 
  2449 		// Open Volume Option List Page
  2473         // Open Volume Option List Page
  2450 		value = ShowRadioButtonSettingPageL(
  2474         value = ShowRadioButtonSettingPageL(
  2451 					R_WMLBROWSER_SETTINGS_MEDIA_VOLUME,	values,
  2475                     R_WMLBROWSER_SETTINGS_MEDIA_VOLUME, values,
  2452 						( itemcount - 1 ) - value );
  2476                         ( itemcount - 1 ) - value );
  2453 
  2477 
  2454 		// Reconvert list index to volume
  2478         // Reconvert list index to volume
  2455 		value = ( itemcount - 1 ) - value;
  2479         value = ( itemcount - 1 ) - value;
  2456 		switch ( value )
  2480         switch ( value )
  2457 			{
  2481             {
  2458 			case EVolumeMute:
  2482             case EVolumeMute:
  2459 				value = EWmlSettingsVolumeMuted;
  2483                 value = EWmlSettingsVolumeMuted;
  2460 				break;
  2484                 break;
  2461 			case EVolumeLevel1:
  2485             case EVolumeLevel1:
  2462 				value = EWmlSettingsVolume1;
  2486                 value = EWmlSettingsVolume1;
  2463 				break;
  2487                 break;
  2464 			case EVolumeLevel2:
  2488             case EVolumeLevel2:
  2465 				value = EWmlSettingsVolume2;
  2489                 value = EWmlSettingsVolume2;
  2466 				break;
  2490                 break;
  2467 			case EVolumeLevel3:
  2491             case EVolumeLevel3:
  2468 				value = EWmlSettingsVolume3;
  2492                 value = EWmlSettingsVolume3;
  2469 				break;
  2493                 break;
  2470 			case EVolumeLevel4:
  2494             case EVolumeLevel4:
  2471 				value = EWmlSettingsVolume4;
  2495                 value = EWmlSettingsVolume4;
  2472 				break;
  2496                 break;
  2473 			default:
  2497             default:
  2474 				break;
  2498                 break;
  2475 			}
  2499             }
  2476 
  2500 
  2477 		// Save Media Volume Value
  2501         // Save Media Volume Value
  2478 		preferences.SetMediaVolumeL( value );
  2502         preferences.SetMediaVolumeL( value );
  2479         DisplayPageSettingsL();
  2503         DisplayPageSettingsL();
  2480 		break;
  2504         break;
  2481 		}
  2505         }
  2482 
  2506 
  2483         case EWmlSettingsCookies:
  2507         case EWmlSettingsCookies:
  2484             {
  2508             {
  2485             values->AppendL( R_WMLBROWSER_SETTINGS_C_VALUE_REJECT );
  2509             values->AppendL( R_WMLBROWSER_SETTINGS_C_VALUE_REJECT );
  2486             values->AppendL( R_WMLBROWSER_SETTINGS_C_VALUE_ALLOW );
  2510             values->AppendL( R_WMLBROWSER_SETTINGS_C_VALUE_ALLOW );
  2487             value = preferences.Cookies();
  2511             value = preferences.Cookies();
  2488             value = aSelectKeyWasPressed ? 1 - value : ShowRadioButtonSettingPageL(
  2512             value = aSelectKeyWasPressed ? 1 - value : ShowRadioButtonSettingPageL(
  2489             	R_WMLBROWSER_SETTINGS_COOKIES,
  2513                 R_WMLBROWSER_SETTINGS_COOKIES,
  2490             	values,
  2514                 values,
  2491             	value );
  2515                 value );
  2492             preferences.SetCookiesL( ( TWmlSettingsCookies )value );
  2516             preferences.SetCookiesL( ( TWmlSettingsCookies )value );
  2493             DisplayPrivacySettingsL();
  2517             DisplayPrivacySettingsL();
  2494             break;
  2518             break;
  2495             }
  2519             }
  2496 
  2520 
  2506             preferences.SetEcmaL( ( TWmlSettingsECMA ) value );
  2530             preferences.SetEcmaL( ( TWmlSettingsECMA ) value );
  2507             DisplayGeneralSettingsL();
  2531             DisplayGeneralSettingsL();
  2508             break;
  2532             break;
  2509             }
  2533             }
  2510 
  2534 
  2511 		case EWmlSettingsScriptLog:
  2535         case EWmlSettingsScriptLog:
  2512 			{
  2536             {
  2513     		value = 3 - preferences.ScriptLog();
  2537             value = 3 - preferences.ScriptLog();
  2514     		
  2538             
  2515     		values->AppendL( R_WMLBROWSER_SETTINGS_SCRIPTLOG_VALUE_TO_CONSOLE_FILE );
  2539             values->AppendL( R_WMLBROWSER_SETTINGS_SCRIPTLOG_VALUE_TO_CONSOLE_FILE );
  2516             values->AppendL( R_WMLBROWSER_SETTINGS_SCRIPTLOG_VALUE_TO_CONSOLE );
  2540             values->AppendL( R_WMLBROWSER_SETTINGS_SCRIPTLOG_VALUE_TO_CONSOLE );
  2517     	    values->AppendL( R_WMLBROWSER_SETTINGS_SCRIPTLOG_VALUE_TO_FILE );
  2541             values->AppendL( R_WMLBROWSER_SETTINGS_SCRIPTLOG_VALUE_TO_FILE );
  2518     		values->AppendL( R_WMLBROWSER_SETTINGS_SCRIPTLOG_VALUE_DISABLE );
  2542             values->AppendL( R_WMLBROWSER_SETTINGS_SCRIPTLOG_VALUE_DISABLE );
  2519     		
  2543             
  2520         	value = 3 - (ShowRadioButtonSettingPageL(R_WMLBROWSER_SETTINGS_SCRIPTLOG,
  2544             value = 3 - (ShowRadioButtonSettingPageL(R_WMLBROWSER_SETTINGS_SCRIPTLOG,
  2521                                                         values,
  2545                                                         values,
  2522                                                         value ));
  2546                                                         value ));
  2523 			preferences.SetScriptLogL( value );
  2547             preferences.SetScriptLogL( value );
  2524             DisplayGeneralSettingsL();
  2548             DisplayGeneralSettingsL();
  2525 
  2549 
  2526 			break;
  2550             break;
  2527 			}
  2551             }
  2528 
  2552 
  2529 	    case EWmlSettingsDownloadsOpen:
  2553         case EWmlSettingsDownloadsOpen:
  2530             {
  2554             {
  2531             values->AppendL( R_WMLBROWSER_SETTINGS_DOWNLOAD_OPEN_YES );
  2555             values->AppendL( R_WMLBROWSER_SETTINGS_DOWNLOAD_OPEN_YES );
  2532             values->AppendL( R_WMLBROWSER_SETTINGS_DOWNLOAD_OPEN_NO );
  2556             values->AppendL( R_WMLBROWSER_SETTINGS_DOWNLOAD_OPEN_NO );
  2533             value = preferences.DownloadsOpen();
  2557             value = preferences.DownloadsOpen();
  2534             value = aSelectKeyWasPressed ? value :
  2558             value = aSelectKeyWasPressed ? value :
  2539             preferences.SetDownloadsOpenL( 1 - value ); 
  2563             preferences.SetDownloadsOpenL( 1 - value ); 
  2540             DisplayGeneralSettingsL();
  2564             DisplayGeneralSettingsL();
  2541             break;
  2565             break;
  2542             }
  2566             }
  2543 
  2567 
  2544     	case EWmlSettingsHttpSecurityWarnings:
  2568         case EWmlSettingsHttpSecurityWarnings:
  2545     		{
  2569             {
  2546             values->AppendL( R_WMLBROWSER_SETTINGS_WRN_VALUE_SHOW );
  2570             values->AppendL( R_WMLBROWSER_SETTINGS_WRN_VALUE_SHOW );
  2547             values->AppendL( R_WMLBROWSER_SETTINGS_WRN_VALUE_HIDE );
  2571             values->AppendL( R_WMLBROWSER_SETTINGS_WRN_VALUE_HIDE );
  2548             value = preferences.HttpSecurityWarnings();
  2572             value = preferences.HttpSecurityWarnings();
  2549             value = aSelectKeyWasPressed ? value :
  2573             value = aSelectKeyWasPressed ? value :
  2550             ShowRadioButtonSettingPageL(
  2574             ShowRadioButtonSettingPageL(
  2552                   values,
  2576                   values,
  2553                   1 - value );
  2577                   1 - value );
  2554             preferences.SetHttpSecurityWarningsL( 1 - value ); // show=1, hide=0 in preferences
  2578             preferences.SetHttpSecurityWarningsL( 1 - value ); // show=1, hide=0 in preferences
  2555             DisplayGeneralSettingsL();
  2579             DisplayGeneralSettingsL();
  2556             break;
  2580             break;
  2557     		}
  2581             }
  2558     		
  2582             
  2559         case EWmlSettingsSearchProvider:
  2583         case EWmlSettingsSearchProvider:
  2560         	{
  2584             {
  2561  			RunSearchSettingsL();
  2585             RunSearchSettingsL();
  2562         	break;
  2586             break;
  2563         	}
  2587             }
  2564 
  2588 
  2565 
  2589 
  2566 
  2590 
  2567     	case EWmlSettingsIMEINotification:
  2591         case EWmlSettingsIMEINotification:
  2568     		{
  2592             {
  2569     		if ( IMEI_NOTIFICATION )
  2593             if ( IMEI_NOTIFICATION )
  2570     			{
  2594                 {
  2571     			values->AppendL( R_WMLBROWSER_SETTINGS_IMEI_VALUE_DISABLED );
  2595                 values->AppendL( R_WMLBROWSER_SETTINGS_IMEI_VALUE_DISABLED );
  2572     			values->AppendL( R_WMLBROWSER_SETTINGS_IMEI_VALUE_ENABLED );
  2596                 values->AppendL( R_WMLBROWSER_SETTINGS_IMEI_VALUE_ENABLED );
  2573     			value = preferences.IMEINotification();
  2597                 value = preferences.IMEINotification();
  2574     			//items need to be appended in reverse order
  2598                 //items need to be appended in reverse order
  2575     			value = aSelectKeyWasPressed ? 1 - value :
  2599                 value = aSelectKeyWasPressed ? 1 - value :
  2576             			        ShowRadioButtonSettingPageL(
  2600                                 ShowRadioButtonSettingPageL(
  2577                                 				R_WMLBROWSER_SETTINGS_IMEI,
  2601                                                 R_WMLBROWSER_SETTINGS_IMEI,
  2578                                 				values,
  2602                                                 values,
  2579                                 				value );
  2603                                                 value );
  2580     			preferences.SetIMEINotificationL( ( TWmlSettingsIMEI ) value );
  2604                 preferences.SetIMEINotificationL( ( TWmlSettingsIMEI ) value );
  2581                 DisplayPrivacySettingsL();
  2605                 DisplayPrivacySettingsL();
  2582     			}
  2606                 }
  2583     		break;
  2607             break;
  2584     		}
  2608             }
  2585 
  2609 
  2586         case EWmlSettingsSendReferrer:
  2610         case EWmlSettingsSendReferrer:
  2587     		{
  2611             {
  2588     		values->AppendL( R_WMLBROWSER_SETTINGS_SEND_REFERRER_OFF );
  2612             values->AppendL( R_WMLBROWSER_SETTINGS_SEND_REFERRER_OFF );
  2589     		values->AppendL( R_WMLBROWSER_SETTINGS_SEND_REFERRER_ON );
  2613             values->AppendL( R_WMLBROWSER_SETTINGS_SEND_REFERRER_ON );
  2590     		value = preferences.SendReferrer();
  2614             value = preferences.SendReferrer();
  2591     		value = aSelectKeyWasPressed ? 1 - value : ShowRadioButtonSettingPageL(
  2615             value = aSelectKeyWasPressed ? 1 - value : ShowRadioButtonSettingPageL(
  2592     		  R_WMLBROWSER_SETTINGS_SEND_REFERRER,
  2616               R_WMLBROWSER_SETTINGS_SEND_REFERRER,
  2593     		  values,
  2617               values,
  2594     		  value );
  2618               value );
  2595             DisplayPrivacySettingsL();
  2619             DisplayPrivacySettingsL();
  2596     		break;
  2620             break;
  2597 		}
  2621         }
  2598 
  2622 
  2599         case EWmlSettingsPopupBlocking:
  2623         case EWmlSettingsPopupBlocking:
  2600     	    {
  2624             {
  2601     	    values->AppendL( R_WMLBROWSER_SETTINGS_POPUP_BLOCKING_OFF );
  2625             values->AppendL( R_WMLBROWSER_SETTINGS_POPUP_BLOCKING_OFF );
  2602     	    values->AppendL( R_WMLBROWSER_SETTINGS_POPUP_BLOCKING_ON );
  2626             values->AppendL( R_WMLBROWSER_SETTINGS_POPUP_BLOCKING_ON );
  2603     	    value = preferences.PopupBlocking();
  2627             value = preferences.PopupBlocking();
  2604     	    value = aSelectKeyWasPressed ? 1 - value : ShowRadioButtonSettingPageL(
  2628             value = aSelectKeyWasPressed ? 1 - value : ShowRadioButtonSettingPageL(
  2605     	            R_WMLBROWSER_SETTINGS_POPUP_BLOCKING,
  2629                     R_WMLBROWSER_SETTINGS_POPUP_BLOCKING,
  2606     	            values,
  2630                     values,
  2607     	            value );
  2631                     value );
  2608     	    preferences.SetPopupBlockingL( value );
  2632             preferences.SetPopupBlockingL( value );
  2609             DisplayPageSettingsL();
  2633             DisplayPageSettingsL();
  2610     	    break;
  2634             break;
  2611     	    }
  2635             }
  2612 
  2636 
  2613 
  2637 
  2614     	case EWmlSettingsAutomaticUpdatingWhileRoaming:
  2638         case EWmlSettingsAutomaticUpdatingWhileRoaming:
  2615     		{
  2639             {
  2616     		values->AppendL( R_WMLBROWSER_SETTINGS_AUTOUPDATING_ROAMING_OFF );
  2640             values->AppendL( R_WMLBROWSER_SETTINGS_AUTOUPDATING_ROAMING_OFF );
  2617     		values->AppendL( R_WMLBROWSER_SETTINGS_AUTOUPDATING_ROAMING_ON );
  2641             values->AppendL( R_WMLBROWSER_SETTINGS_AUTOUPDATING_ROAMING_ON );
  2618 
  2642 
  2619     		value = preferences.AutomaticUpdatingWhileRoaming();
  2643             value = preferences.AutomaticUpdatingWhileRoaming();
  2620     		value = aSelectKeyWasPressed ?
  2644             value = aSelectKeyWasPressed ?
  2621     		1 - value :
  2645             1 - value :
  2622     		ShowRadioButtonSettingPageL(
  2646             ShowRadioButtonSettingPageL(
  2623     			R_WMLBROWSER_SETTINGS_AUTOUPDATING_ROAMING,
  2647                 R_WMLBROWSER_SETTINGS_AUTOUPDATING_ROAMING,
  2624     			values,
  2648                 values,
  2625     			value );
  2649                 value );
  2626     		preferences.SetAutomaticUpdatingWhileRoamingL( value );    		
  2650             preferences.SetAutomaticUpdatingWhileRoamingL( value );         
  2627 
  2651 
  2628 			DisplayWebFeedsSettingsL();
  2652             DisplayWebFeedsSettingsL();
  2629     		break;
  2653             break;
  2630     		}
  2654             }
  2631 
  2655 
  2632 
  2656 
  2633     	case EWmlSettingsToolbarOnOff:
  2657         case EWmlSettingsToolbarOnOff:
  2634     		{
  2658             {
  2635     		values->AppendL( R_BROWSER_SETTING_TOOLBAR_OFF );
  2659             values->AppendL( R_BROWSER_SETTING_TOOLBAR_OFF );
  2636     		values->AppendL( R_BROWSER_SETTING_TOOLBAR_ON );
  2660             values->AppendL( R_BROWSER_SETTING_TOOLBAR_ON );
  2637 
  2661 
  2638     		value = preferences.ShowToolbarOnOff();
  2662             value = preferences.ShowToolbarOnOff();
  2639     		value = aSelectKeyWasPressed ?
  2663             value = aSelectKeyWasPressed ?
  2640     		1 - value :
  2664             1 - value :
  2641     		ShowRadioButtonSettingPageL(
  2665             ShowRadioButtonSettingPageL(
  2642     			R_BROWSER_SETTING_TOOLBAR_ON_OFF,
  2666                 R_BROWSER_SETTING_TOOLBAR_ON_OFF,
  2643     			values,
  2667                 values,
  2644     			value );
  2668                 value );
  2645     		preferences.SetToolbarOnOffL( value );    		
  2669             preferences.SetToolbarOnOffL( value );          
  2646 
  2670 
  2647             DisplayToolbarSettingsL();
  2671             DisplayToolbarSettingsL();
  2648     		break;
  2672             break;
  2649     		}
  2673             }
  2650 
  2674 
  2651 
  2675 
  2652     	case EWmlSettingsToolbarButton1Cmd:
  2676         case EWmlSettingsToolbarButton1Cmd:
  2653             {
  2677             {
  2654             value = preferences.ShowToolbarButton1Cmd();
  2678             value = preferences.ShowToolbarButton1Cmd();
  2655             // set toolbar values will build values into an array to be displayed to the user
  2679             // set toolbar values will build values into an array to be displayed to the user
  2656             // this may mean filtering out some items, so we have to know the mapping between our 
  2680             // this may mean filtering out some items, so we have to know the mapping between our 
  2657             // fixed array of commands as well as the current value from settings
  2681             // fixed array of commands as well as the current value from settings
  2658             value = SetToolbarButtonValues(values, value, valueDisplayMapping);
  2682             value = SetToolbarButtonValues(values, value, valueDisplayMapping);
  2659  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_TOOLBAR_BUTTON1,
  2683             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_TOOLBAR_BUTTON1,
  2660  			                                        values,
  2684                                                     values,
  2661  			                                        value );
  2685                                                     value );
  2662  			                                            
  2686                                                         
  2663  		    preferences.SetToolbarButton1CmdL( valueDisplayMapping->At(value) );
  2687             preferences.SetToolbarButton1CmdL( valueDisplayMapping->At(value) );
  2664             DisplayToolbarSettingsL();
  2688             DisplayToolbarSettingsL();
  2665             break;
  2689             break;
  2666             }
  2690             }
  2667 
  2691 
  2668     	case EWmlSettingsToolbarButton2Cmd:
  2692         case EWmlSettingsToolbarButton2Cmd:
  2669             {
  2693             {
  2670             value = preferences.ShowToolbarButton2Cmd();
  2694             value = preferences.ShowToolbarButton2Cmd();
  2671             // set toolbar values will build values into an array to be displayed to the user
  2695             // set toolbar values will build values into an array to be displayed to the user
  2672             // this may mean filtering out some items, so we have to know the mapping between our 
  2696             // this may mean filtering out some items, so we have to know the mapping between our 
  2673             // fixed array of commands as well as the current value from settings
  2697             // fixed array of commands as well as the current value from settings
  2674             value = SetToolbarButtonValues(values, value, valueDisplayMapping);            
  2698             value = SetToolbarButtonValues(values, value, valueDisplayMapping);            
  2675  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_TOOLBAR_BUTTON2,
  2699             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_TOOLBAR_BUTTON2,
  2676  			                                        values,
  2700                                                     values,
  2677  			                                        value );
  2701                                                     value );
  2678  			                                        
  2702                                                     
  2679  		    preferences.SetToolbarButton2CmdL( valueDisplayMapping->At(value) );
  2703             preferences.SetToolbarButton2CmdL( valueDisplayMapping->At(value) );
  2680             DisplayToolbarSettingsL();
  2704             DisplayToolbarSettingsL();
  2681             break;
  2705             break;
  2682             }
  2706             }
  2683 
  2707 
  2684     	case EWmlSettingsToolbarButton3Cmd:
  2708         case EWmlSettingsToolbarButton3Cmd:
  2685             {
  2709             {
  2686             value = preferences.ShowToolbarButton3Cmd();
  2710             value = preferences.ShowToolbarButton3Cmd();
  2687             // set toolbar values will build values into an array to be displayed to the user
  2711             // set toolbar values will build values into an array to be displayed to the user
  2688             // this may mean filtering out some items, so we have to know the mapping between our 
  2712             // this may mean filtering out some items, so we have to know the mapping between our 
  2689             // fixed array of commands as well as the current value from settings
  2713             // fixed array of commands as well as the current value from settings
  2690             value = SetToolbarButtonValues(values, value, valueDisplayMapping);             
  2714             value = SetToolbarButtonValues(values, value, valueDisplayMapping);             
  2691  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_TOOLBAR_BUTTON3,
  2715             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_TOOLBAR_BUTTON3,
  2692  			                                        values,
  2716                                                     values,
  2693  			                                        value );
  2717                                                     value );
  2694  			                                        
  2718                                                     
  2695  		    preferences.SetToolbarButton3CmdL( valueDisplayMapping->At(value) );
  2719             preferences.SetToolbarButton3CmdL( valueDisplayMapping->At(value) );
  2696             DisplayToolbarSettingsL();
  2720             DisplayToolbarSettingsL();
  2697             break;
  2721             break;
  2698             }
  2722             }
  2699 
  2723 
  2700     	case EWmlSettingsToolbarButton4Cmd:
  2724         case EWmlSettingsToolbarButton4Cmd:
  2701             {
  2725             {
  2702             value = preferences.ShowToolbarButton4Cmd();
  2726             value = preferences.ShowToolbarButton4Cmd();
  2703             // set toolbar values will build values into an array to be displayed to the user
  2727             // set toolbar values will build values into an array to be displayed to the user
  2704             // this may mean filtering out some items, so we have to know the mapping between our 
  2728             // this may mean filtering out some items, so we have to know the mapping between our 
  2705             // fixed array of commands as well as the current value from settings
  2729             // fixed array of commands as well as the current value from settings
  2706             value = SetToolbarButtonValues(values, value, valueDisplayMapping);              
  2730             value = SetToolbarButtonValues(values, value, valueDisplayMapping);              
  2707  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_TOOLBAR_BUTTON4,
  2731             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_TOOLBAR_BUTTON4,
  2708  			                                        values,
  2732                                                     values,
  2709  			                                        value );
  2733                                                     value );
  2710  			                                        
  2734                                                     
  2711  		    preferences.SetToolbarButton4CmdL( valueDisplayMapping->At(value) );
  2735             preferences.SetToolbarButton4CmdL( valueDisplayMapping->At(value) );
  2712             DisplayToolbarSettingsL();
  2736             DisplayToolbarSettingsL();
  2713             break;
  2737             break;
  2714             }
  2738             }
  2715 
  2739 
  2716     	case EWmlSettingsToolbarButton5Cmd:
  2740         case EWmlSettingsToolbarButton5Cmd:
  2717             {
  2741             {
  2718             value = preferences.ShowToolbarButton5Cmd();
  2742             value = preferences.ShowToolbarButton5Cmd();
  2719             // set toolbar values will build values into an array to be displayed to the user
  2743             // set toolbar values will build values into an array to be displayed to the user
  2720             // this may mean filtering out some items, so we have to know the mapping between our 
  2744             // this may mean filtering out some items, so we have to know the mapping between our 
  2721             // fixed array of commands as well as the current value from settings
  2745             // fixed array of commands as well as the current value from settings
  2722             value = SetToolbarButtonValues(values, value, valueDisplayMapping); 
  2746             value = SetToolbarButtonValues(values, value, valueDisplayMapping); 
  2723              
  2747              
  2724  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_TOOLBAR_BUTTON5,
  2748             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_TOOLBAR_BUTTON5,
  2725  			                                        values,
  2749                                                     values,
  2726  			                                        value );
  2750                                                     value );
  2727  			                                        
  2751                                                     
  2728  		    preferences.SetToolbarButton5CmdL( valueDisplayMapping->At(value) );
  2752             preferences.SetToolbarButton5CmdL( valueDisplayMapping->At(value) );
  2729             DisplayToolbarSettingsL();
  2753             DisplayToolbarSettingsL();
  2730             break;
  2754             break;
  2731             }
  2755             }
  2732 
  2756 
  2733     	case EWmlSettingsToolbarButton6Cmd:
  2757         case EWmlSettingsToolbarButton6Cmd:
  2734             {
  2758             {
  2735             value = preferences.ShowToolbarButton6Cmd();
  2759             value = preferences.ShowToolbarButton6Cmd();
  2736             // set toolbar values will build values into an array to be displayed to the user
  2760             // set toolbar values will build values into an array to be displayed to the user
  2737             // this may mean filtering out some items, so we have to know the mapping between our 
  2761             // this may mean filtering out some items, so we have to know the mapping between our 
  2738             // fixed array of commands as well as the current value from settings
  2762             // fixed array of commands as well as the current value from settings
  2739             value = SetToolbarButtonValues(values, value, valueDisplayMapping); 
  2763             value = SetToolbarButtonValues(values, value, valueDisplayMapping); 
  2740              
  2764              
  2741  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_TOOLBAR_BUTTON6,
  2765             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_TOOLBAR_BUTTON6,
  2742  			                                        values,
  2766                                                     values,
  2743  			                                        value );
  2767                                                     value );
  2744  			                                        
  2768                                                     
  2745  		    preferences.SetToolbarButton6CmdL( valueDisplayMapping->At(value) );
  2769             preferences.SetToolbarButton6CmdL( valueDisplayMapping->At(value) );
  2746             DisplayToolbarSettingsL();
  2770             DisplayToolbarSettingsL();
  2747             break;
  2771             break;
  2748             }
  2772             }
  2749 
  2773 
  2750     	case EWmlSettingsToolbarButton7Cmd:
  2774         case EWmlSettingsToolbarButton7Cmd:
  2751             {
  2775             {
  2752             value = preferences.ShowToolbarButton7Cmd();
  2776             value = preferences.ShowToolbarButton7Cmd();
  2753             // set toolbar values will build values into an array to be displayed to the user
  2777             // set toolbar values will build values into an array to be displayed to the user
  2754             // this may mean filtering out some items, so we have to know the mapping between our 
  2778             // this may mean filtering out some items, so we have to know the mapping between our 
  2755             // fixed array of commands as well as the current value from settings
  2779             // fixed array of commands as well as the current value from settings
  2756             value = SetToolbarButtonValues(values, value, valueDisplayMapping); 
  2780             value = SetToolbarButtonValues(values, value, valueDisplayMapping); 
  2757              
  2781              
  2758  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_TOOLBAR_BUTTON7,
  2782             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_TOOLBAR_BUTTON7,
  2759  			                                        values,
  2783                                                     values,
  2760  			                                        value );
  2784                                                     value );
  2761  			                                        
  2785                                                     
  2762  		    preferences.SetToolbarButton7CmdL( valueDisplayMapping->At(value) );
  2786             preferences.SetToolbarButton7CmdL( valueDisplayMapping->At(value) );
  2763             DisplayToolbarSettingsL();
  2787             DisplayToolbarSettingsL();
  2764             break;
  2788             break;
  2765             }
  2789             }
  2766 
  2790 
  2767     	case EWmlSettingsShortCutKey1Cmd:
  2791         case EWmlSettingsShortCutKey1Cmd:
  2768             {
  2792             {
  2769             value = preferences.ShortcutKey1Cmd();
  2793             value = preferences.ShortcutKey1Cmd();
  2770             // set toolbar values will build values into an array to be displayed to the user
  2794             // set toolbar values will build values into an array to be displayed to the user
  2771             // this may mean filtering out some items, so we have to know the mapping between our 
  2795             // this may mean filtering out some items, so we have to know the mapping between our 
  2772             // fixed array of commands as well as the current value from settings
  2796             // fixed array of commands as well as the current value from settings
  2773             value = SetShortcutKeysValues(values, value, valueDisplayMapping); 
  2797             value = SetShortcutKeysValues(values, value, valueDisplayMapping); 
  2774  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY1,
  2798             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY1,
  2775  			                                        values,
  2799                                                     values,
  2776  			                                        value );
  2800                                                     value );
  2777  		    preferences.SetShortcutKey1CmdL( valueDisplayMapping->At(value) );
  2801             preferences.SetShortcutKey1CmdL( valueDisplayMapping->At(value) );
  2778             DisplayShortcutsSettingsL();
  2802             DisplayShortcutsSettingsL();
  2779             break;
  2803             break;
  2780             }
  2804             }
  2781 
  2805 
  2782     	case EWmlSettingsShortCutKey2Cmd:
  2806         case EWmlSettingsShortCutKey2Cmd:
  2783             {
  2807             {
  2784             value = preferences.ShortcutKey2Cmd();
  2808             value = preferences.ShortcutKey2Cmd();
  2785             // set toolbar values will build values into an array to be displayed to the user
  2809             // set toolbar values will build values into an array to be displayed to the user
  2786             // this may mean filtering out some items, so we have to know the mapping between our 
  2810             // this may mean filtering out some items, so we have to know the mapping between our 
  2787             // fixed array of commands as well as the current value from settings
  2811             // fixed array of commands as well as the current value from settings
  2788             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2812             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2789  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY2,
  2813             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY2,
  2790  			                                        values,
  2814                                                     values,
  2791  			                                        value );
  2815                                                     value );
  2792  		    preferences.SetShortcutKey2CmdL( valueDisplayMapping->At(value) );
  2816             preferences.SetShortcutKey2CmdL( valueDisplayMapping->At(value) );
  2793             DisplayShortcutsSettingsL();
  2817             DisplayShortcutsSettingsL();
  2794             break;
  2818             break;
  2795             }
  2819             }
  2796 
  2820 
  2797     	case EWmlSettingsShortCutKey3Cmd:
  2821         case EWmlSettingsShortCutKey3Cmd:
  2798             {
  2822             {
  2799             value = preferences.ShortcutKey3Cmd();
  2823             value = preferences.ShortcutKey3Cmd();
  2800             // set toolbar values will build values into an array to be displayed to the user
  2824             // set toolbar values will build values into an array to be displayed to the user
  2801             // this may mean filtering out some items, so we have to know the mapping between our 
  2825             // this may mean filtering out some items, so we have to know the mapping between our 
  2802             // fixed array of commands as well as the current value from settings
  2826             // fixed array of commands as well as the current value from settings
  2803             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2827             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2804  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY3,
  2828             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY3,
  2805  			                                        values,
  2829                                                     values,
  2806  			                                        value );
  2830                                                     value );
  2807  		    preferences.SetShortcutKey3CmdL( valueDisplayMapping->At(value) );
  2831             preferences.SetShortcutKey3CmdL( valueDisplayMapping->At(value) );
  2808             DisplayShortcutsSettingsL();
  2832             DisplayShortcutsSettingsL();
  2809             break;
  2833             break;
  2810             }
  2834             }
  2811 
  2835 
  2812     	case EWmlSettingsShortCutKey4Cmd:
  2836         case EWmlSettingsShortCutKey4Cmd:
  2813             {
  2837             {
  2814             value = preferences.ShortcutKey4Cmd();
  2838             value = preferences.ShortcutKey4Cmd();
  2815             // set toolbar values will build values into an array to be displayed to the user
  2839             // set toolbar values will build values into an array to be displayed to the user
  2816             // this may mean filtering out some items, so we have to know the mapping between our 
  2840             // this may mean filtering out some items, so we have to know the mapping between our 
  2817             // fixed array of commands as well as the current value from settings
  2841             // fixed array of commands as well as the current value from settings
  2818             value = SetShortcutKeysValues(values, value, valueDisplayMapping);             
  2842             value = SetShortcutKeysValues(values, value, valueDisplayMapping);             
  2819  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY4,
  2843             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY4,
  2820  			                                        values,
  2844                                                     values,
  2821  			                                        value );
  2845                                                     value );
  2822  		    preferences.SetShortcutKey4CmdL( valueDisplayMapping->At(value) );
  2846             preferences.SetShortcutKey4CmdL( valueDisplayMapping->At(value) );
  2823             DisplayShortcutsSettingsL();
  2847             DisplayShortcutsSettingsL();
  2824             break;
  2848             break;
  2825             }
  2849             }
  2826 
  2850 
  2827     	case EWmlSettingsShortCutKey5Cmd:
  2851         case EWmlSettingsShortCutKey5Cmd:
  2828             {
  2852             {
  2829             value = preferences.ShortcutKey5Cmd();
  2853             value = preferences.ShortcutKey5Cmd();
  2830             // set toolbar values will build values into an array to be displayed to the user
  2854             // set toolbar values will build values into an array to be displayed to the user
  2831             // this may mean filtering out some items, so we have to know the mapping between our 
  2855             // this may mean filtering out some items, so we have to know the mapping between our 
  2832             // fixed array of commands as well as the current value from settings
  2856             // fixed array of commands as well as the current value from settings
  2833             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2857             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2834  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY5,
  2858             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY5,
  2835  			                                        values,
  2859                                                     values,
  2836  			                                        value );
  2860                                                     value );
  2837  		    preferences.SetShortcutKey5CmdL( valueDisplayMapping->At(value) );
  2861             preferences.SetShortcutKey5CmdL( valueDisplayMapping->At(value) );
  2838             DisplayShortcutsSettingsL();
  2862             DisplayShortcutsSettingsL();
  2839             break;
  2863             break;
  2840             }
  2864             }
  2841 
  2865 
  2842     	case EWmlSettingsShortCutKey6Cmd:
  2866         case EWmlSettingsShortCutKey6Cmd:
  2843             {
  2867             {
  2844             value = preferences.ShortcutKey6Cmd();
  2868             value = preferences.ShortcutKey6Cmd();
  2845             // set toolbar values will build values into an array to be displayed to the user
  2869             // set toolbar values will build values into an array to be displayed to the user
  2846             // this may mean filtering out some items, so we have to know the mapping between our 
  2870             // this may mean filtering out some items, so we have to know the mapping between our 
  2847             // fixed array of commands as well as the current value from settings
  2871             // fixed array of commands as well as the current value from settings
  2848             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2872             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2849  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY6,
  2873             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY6,
  2850  			                                        values,
  2874                                                     values,
  2851  			                                        value );
  2875                                                     value );
  2852  		    preferences.SetShortcutKey6CmdL( valueDisplayMapping->At(value) );
  2876             preferences.SetShortcutKey6CmdL( valueDisplayMapping->At(value) );
  2853             DisplayShortcutsSettingsL();
  2877             DisplayShortcutsSettingsL();
  2854             break;
  2878             break;
  2855             }
  2879             }
  2856 
  2880 
  2857     	case EWmlSettingsShortCutKey7Cmd:
  2881         case EWmlSettingsShortCutKey7Cmd:
  2858             {
  2882             {
  2859             value = preferences.ShortcutKey7Cmd();
  2883             value = preferences.ShortcutKey7Cmd();
  2860             // set toolbar values will build values into an array to be displayed to the user
  2884             // set toolbar values will build values into an array to be displayed to the user
  2861             // this may mean filtering out some items, so we have to know the mapping between our 
  2885             // this may mean filtering out some items, so we have to know the mapping between our 
  2862             // fixed array of commands as well as the current value from settings
  2886             // fixed array of commands as well as the current value from settings
  2863             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2887             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2864  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY7,
  2888             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY7,
  2865  			                                        values,
  2889                                                     values,
  2866  			                                        value );
  2890                                                     value );
  2867  		    preferences.SetShortcutKey7CmdL( valueDisplayMapping->At(value) );
  2891             preferences.SetShortcutKey7CmdL( valueDisplayMapping->At(value) );
  2868             DisplayShortcutsSettingsL();
  2892             DisplayShortcutsSettingsL();
  2869             break;
  2893             break;
  2870             }
  2894             }
  2871 
  2895 
  2872     	case EWmlSettingsShortCutKey8Cmd:
  2896         case EWmlSettingsShortCutKey8Cmd:
  2873             {
  2897             {
  2874             value = preferences.ShortcutKey8Cmd();
  2898             value = preferences.ShortcutKey8Cmd();
  2875             // set toolbar values will build values into an array to be displayed to the user
  2899             // set toolbar values will build values into an array to be displayed to the user
  2876             // this may mean filtering out some items, so we have to know the mapping between our 
  2900             // this may mean filtering out some items, so we have to know the mapping between our 
  2877             // fixed array of commands as well as the current value from settings
  2901             // fixed array of commands as well as the current value from settings
  2878             value = SetShortcutKeysValues(values, value, valueDisplayMapping); 
  2902             value = SetShortcutKeysValues(values, value, valueDisplayMapping); 
  2879  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY8,
  2903             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY8,
  2880  			                                        values,
  2904                                                     values,
  2881  			                                        value );
  2905                                                     value );
  2882  		    preferences.SetShortcutKey8CmdL( valueDisplayMapping->At(value) );
  2906             preferences.SetShortcutKey8CmdL( valueDisplayMapping->At(value) );
  2883             DisplayShortcutsSettingsL();
  2907             DisplayShortcutsSettingsL();
  2884             break;
  2908             break;
  2885             }
  2909             }
  2886 
  2910 
  2887     	case EWmlSettingsShortCutKey9Cmd:
  2911         case EWmlSettingsShortCutKey9Cmd:
  2888             {
  2912             {
  2889             value = preferences.ShortcutKey9Cmd();
  2913             value = preferences.ShortcutKey9Cmd();
  2890             // set toolbar values will build values into an array to be displayed to the user
  2914             // set toolbar values will build values into an array to be displayed to the user
  2891             // this may mean filtering out some items, so we have to know the mapping between our 
  2915             // this may mean filtering out some items, so we have to know the mapping between our 
  2892             // fixed array of commands as well as the current value from settings
  2916             // fixed array of commands as well as the current value from settings
  2893             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2917             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2894  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY9,
  2918             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY9,
  2895  			                                        values,
  2919                                                     values,
  2896  			                                        value );
  2920                                                     value );
  2897  		    preferences.SetShortcutKey9CmdL( valueDisplayMapping->At(value) );
  2921             preferences.SetShortcutKey9CmdL( valueDisplayMapping->At(value) );
  2898             DisplayShortcutsSettingsL();
  2922             DisplayShortcutsSettingsL();
  2899             break;
  2923             break;
  2900             }
  2924             }
  2901 
  2925 
  2902     	case EWmlSettingsShortCutKey0Cmd:
  2926         case EWmlSettingsShortCutKey0Cmd:
  2903             {
  2927             {
  2904             value = preferences.ShortcutKey0Cmd();
  2928             value = preferences.ShortcutKey0Cmd();
  2905             // set toolbar values will build values into an array to be displayed to the user
  2929             // set toolbar values will build values into an array to be displayed to the user
  2906             // this may mean filtering out some items, so we have to know the mapping between our 
  2930             // this may mean filtering out some items, so we have to know the mapping between our 
  2907             // fixed array of commands as well as the current value from settings
  2931             // fixed array of commands as well as the current value from settings
  2908             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2932             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2909  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY0,
  2933             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEY0,
  2910  			                                        values,
  2934                                                     values,
  2911  			                                        value );
  2935                                                     value );
  2912  		    preferences.SetShortcutKey0CmdL( valueDisplayMapping->At(value) );
  2936             preferences.SetShortcutKey0CmdL( valueDisplayMapping->At(value) );
  2913             DisplayShortcutsSettingsL();
  2937             DisplayShortcutsSettingsL();
  2914             break;
  2938             break;
  2915             }
  2939             }
  2916 
  2940 
  2917     	case EWmlSettingsShortCutKeyStarCmd:
  2941         case EWmlSettingsShortCutKeyStarCmd:
  2918             {
  2942             {
  2919             value = preferences.ShortcutKeyStarCmd();
  2943             value = preferences.ShortcutKeyStarCmd();
  2920             // set toolbar values will build values into an array to be displayed to the user
  2944             // set toolbar values will build values into an array to be displayed to the user
  2921             // this may mean filtering out some items, so we have to know the mapping between our 
  2945             // this may mean filtering out some items, so we have to know the mapping between our 
  2922             // fixed array of commands as well as the current value from settings
  2946             // fixed array of commands as well as the current value from settings
  2923             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2947             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2924  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEYSTAR,
  2948             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEYSTAR,
  2925  			                                        values,
  2949                                                     values,
  2926  			                                        value );
  2950                                                     value );
  2927  		    preferences.SetShortcutKeyStarCmdL( valueDisplayMapping->At(value) );
  2951             preferences.SetShortcutKeyStarCmdL( valueDisplayMapping->At(value) );
  2928             DisplayShortcutsSettingsL();
  2952             DisplayShortcutsSettingsL();
  2929             break;
  2953             break;
  2930             }
  2954             }
  2931 
  2955 
  2932     	case EWmlSettingsShortCutKeyHashCmd:
  2956         case EWmlSettingsShortCutKeyHashCmd:
  2933             {
  2957             {
  2934             value = preferences.ShortcutKeyHashCmd();
  2958             value = preferences.ShortcutKeyHashCmd();
  2935             // set toolbar values will build values into an array to be displayed to the user
  2959             // set toolbar values will build values into an array to be displayed to the user
  2936             // this may mean filtering out some items, so we have to know the mapping between our 
  2960             // this may mean filtering out some items, so we have to know the mapping between our 
  2937             // fixed array of commands as well as the current value from settings
  2961             // fixed array of commands as well as the current value from settings
  2938             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2962             value = SetShortcutKeysValues(values, value, valueDisplayMapping);              
  2939  		    value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEYHASH,
  2963             value = ShowRadioButtonSettingPageL(    R_BROWSER_SETTING_SHORTCUT_KEYHASH,
  2940  			                                        values,
  2964                                                     values,
  2941  			                                        value );
  2965                                                     value );
  2942  		    preferences.SetShortcutKeyHashCmdL( valueDisplayMapping->At(value) );
  2966             preferences.SetShortcutKeyHashCmdL( valueDisplayMapping->At(value) );
  2943             DisplayShortcutsSettingsL();
  2967             DisplayShortcutsSettingsL();
  2944             break;
  2968             break;
  2945             }
  2969             }
  2946 
  2970 
  2947 		default:
  2971         default:
  2948         	break;
  2972             break;
  2949 	    }
  2973         }
  2950 	CleanupStack::PopAndDestroy(2); // values, valueDisplayMapping
  2974     CleanupStack::PopAndDestroy(2); // values, valueDisplayMapping
  2951 	}
  2975     }
  2952 
  2976 
  2953 
  2977 
  2954 // -----------------------------------------------------------------------------
  2978 // -----------------------------------------------------------------------------
  2955 // CSettingsContainer::SetToolbarButtonValues
  2979 // CSettingsContainer::SetToolbarButtonValues
  2956 // -----------------------------------------------------------------------------
  2980 // -----------------------------------------------------------------------------
  3074 // -----------------------------------------------------------------------------
  3098 // -----------------------------------------------------------------------------
  3075 // CSettingsContainer::ShowRadioButtonSettingPageL
  3099 // CSettingsContainer::ShowRadioButtonSettingPageL
  3076 // -----------------------------------------------------------------------------
  3100 // -----------------------------------------------------------------------------
  3077 //
  3101 //
  3078 TInt CSettingsContainer::ShowRadioButtonSettingPageL(
  3102 TInt CSettingsContainer::ShowRadioButtonSettingPageL(
  3079 													 TInt aTitle,
  3103                                                      TInt aTitle,
  3080 													 CArrayFixFlat<TInt>* aValues,
  3104                                                      CArrayFixFlat<TInt>* aValues,
  3081 													 TInt aCurrentItem )
  3105                                                      TInt aCurrentItem )
  3082     {
  3106     {
  3083     // title of the dialog
  3107     // title of the dialog
  3084     HBufC* title = iCoeEnv->AllocReadResourceLC( aTitle );
  3108     HBufC* title = iCoeEnv->AllocReadResourceLC( aTitle );
  3085 
  3109 
  3086 	__ASSERT_DEBUG( (aValues != NULL), Util::Panic( Util::EUninitializedData ));
  3110     __ASSERT_DEBUG( (aValues != NULL), Util::Panic( Util::EUninitializedData ));
  3087 
  3111 
  3088 
  3112 
  3089     // options array
  3113     // options array
  3090     CDesCArrayFlat* values = new( ELeave )CDesCArrayFlat(1);
  3114     CDesCArrayFlat* values = new( ELeave )CDesCArrayFlat(1);
  3091     CleanupStack::PushL( values );
  3115     CleanupStack::PushL( values );
  3107     CleanupStack::PushL( dlg );
  3131     CleanupStack::PushL( dlg );
  3108     dlg->SetSettingTextL( *title );
  3132     dlg->SetSettingTextL( *title );
  3109     //dlg->ConstructL();
  3133     //dlg->ConstructL();
  3110     //dlg->ListBoxControl()->SetCurrentItemIndex( newItem );
  3134     //dlg->ListBoxControl()->SetCurrentItemIndex( newItem );
  3111     CleanupStack::Pop(); // dlg
  3135     CleanupStack::Pop(); // dlg
  3112 	iActionCancelled = EFalse;
  3136     iActionCancelled = EFalse;
  3113     if ( !dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
  3137     if ( !dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
  3114         {
  3138         {
  3115         // Changes confirmed
  3139         // Changes confirmed
  3116         newItem = aCurrentItem;
  3140         newItem = aCurrentItem;
  3117         iActionCancelled = ETrue;
  3141         iActionCancelled = ETrue;
  3127 // -----------------------------------------------------------------------------
  3151 // -----------------------------------------------------------------------------
  3128 // CSettingsContainer::ShowRadioButtonSettingPageL
  3152 // CSettingsContainer::ShowRadioButtonSettingPageL
  3129 // -----------------------------------------------------------------------------
  3153 // -----------------------------------------------------------------------------
  3130 //
  3154 //
  3131 TBool CSettingsContainer::ShowRadioButtonSettingPageBoolL(
  3155 TBool CSettingsContainer::ShowRadioButtonSettingPageBoolL(
  3132 													 TInt aTitle,
  3156                                                      TInt aTitle,
  3133 													 CArrayFixFlat<TInt>* aValues,
  3157                                                      CArrayFixFlat<TInt>* aValues,
  3134 													 TInt* aCurrentItem )
  3158                                                      TInt* aCurrentItem )
  3135     {
  3159     {
  3136     // title of the dialog
  3160     // title of the dialog
  3137     HBufC* title = iCoeEnv->AllocReadResourceLC( aTitle );
  3161     HBufC* title = iCoeEnv->AllocReadResourceLC( aTitle );
  3138 
  3162 
  3139 	__ASSERT_DEBUG( (aValues != NULL), Util::Panic( Util::EUninitializedData ));
  3163     __ASSERT_DEBUG( (aValues != NULL), Util::Panic( Util::EUninitializedData ));
  3140 	__ASSERT_DEBUG( (aCurrentItem != NULL), Util::Panic( Util::EUninitializedData ));
  3164     __ASSERT_DEBUG( (aCurrentItem != NULL), Util::Panic( Util::EUninitializedData ));
  3141 
  3165 
  3142 
  3166 
  3143     // options array
  3167     // options array
  3144     CDesCArrayFlat* values = new( ELeave )CDesCArrayFlat(1);
  3168     CDesCArrayFlat* values = new( ELeave )CDesCArrayFlat(1);
  3145     CleanupStack::PushL( values );
  3169     CleanupStack::PushL( values );
  3180     // settings should only be relayed once the settings page is closed
  3204     // settings should only be relayed once the settings page is closed
  3181     MPreferences& preferences = ApiProvider().Preferences();
  3205     MPreferences& preferences = ApiProvider().Preferences();
  3182 
  3206 
  3183     if ( iFontSize != preferences.FontSize() )
  3207     if ( iFontSize != preferences.FontSize() )
  3184         {
  3208         {
  3185 	preferences.SetFontSizeL( iFontSize );
  3209     preferences.SetFontSizeL( iFontSize );
  3186         }
  3210         }
  3187 
  3211 
  3188     if ( iEncoding != preferences.Encoding() )
  3212     if ( iEncoding != preferences.Encoding() )
  3189         {
  3213         {
  3190         preferences.SetEncodingL( iEncoding );
  3214         preferences.SetEncodingL( iEncoding );
  3192 
  3216 
  3193     if ( iTextWrap != preferences.TextWrap() )
  3217     if ( iTextWrap != preferences.TextWrap() )
  3194         {
  3218         {
  3195         preferences.SetTextWrapL( iTextWrap );
  3219         preferences.SetTextWrapL( iTextWrap );
  3196         }
  3220         }
  3197 	preferences.FlushSD();
  3221     preferences.FlushSD();
  3198 
  3222 
  3199 	preferences.NotifyObserversL( EPreferencesDeactivate, TBrCtlDefs::ESettingsUnknown );
  3223     preferences.NotifyObserversL( EPreferencesDeactivate, TBrCtlDefs::ESettingsUnknown );
  3200     }
  3224     }
  3201 
  3225 
  3202 
  3226 
  3203 // -----------------------------------------------------------------------------
  3227 // -----------------------------------------------------------------------------
  3204 // CSettingsContainer::OfferKeyEventL
  3228 // CSettingsContainer::OfferKeyEventL
  3205 // -----------------------------------------------------------------------------
  3229 // -----------------------------------------------------------------------------
  3206 //
  3230 //
  3207 TKeyResponse CSettingsContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType )
  3231 TKeyResponse CSettingsContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType )
  3208 	{
  3232     {
  3209 	TKeyResponse ret = EKeyWasNotConsumed;
  3233     TKeyResponse ret = EKeyWasNotConsumed;
  3210 	TKeyEvent keyEvent(aKeyEvent);
  3234     TKeyEvent keyEvent(aKeyEvent);
  3211 	
  3235     
  3212 	// Special case for MSK enabled mode - turn MSK KeyUp to MSK KeyEvent to process Settings toggle function
  3236     // Special case for MSK enabled mode - turn MSK KeyUp to MSK KeyEvent to process Settings toggle function
  3213     // This is what is done in BookmarksContainer::OfferKeyEventL
  3237     // This is what is done in BookmarksContainer::OfferKeyEventL
  3214     if (( keyEvent.iScanCode == EStdKeyDevice3 ) || (keyEvent.iScanCode == EStdKeyEnter))
  3238     if (( keyEvent.iScanCode == EStdKeyDevice3 ) || (keyEvent.iScanCode == EStdKeyEnter))
  3215         {
  3239         {
  3216         if( aType == EEventKeyDown )
  3240         if( aType == EEventKeyDown )
  3217     	    {
  3241             {
  3218             iSelectionKeyDownPressed = ETrue;
  3242             iSelectionKeyDownPressed = ETrue;
  3219     		ret = EKeyWasConsumed;
  3243             ret = EKeyWasConsumed;
  3220     	    }
  3244             }
  3221         else if( aType == EEventKeyUp )
  3245         else if( aType == EEventKeyUp )
  3222 	        {
  3246             {
  3223 	        if( iSelectionKeyDownPressed )
  3247             if( iSelectionKeyDownPressed )
  3224 	            {
  3248                 {
  3225                 keyEvent.iCode = EKeyOK;
  3249                 keyEvent.iCode = EKeyOK;
  3226                 ret = EKeyWasNotConsumed;
  3250                 ret = EKeyWasNotConsumed;
  3227                 iSelectionKeyDownPressed = EFalse;
  3251                 iSelectionKeyDownPressed = EFalse;
  3228     	        }
  3252                 }
  3229     	    else
  3253             else
  3230     	        {
  3254                 {
  3231     	        // long press of Selection key was already processed
  3255                 // long press of Selection key was already processed
  3232                 ret = EKeyWasConsumed;
  3256                 ret = EKeyWasConsumed;
  3233                 }
  3257                 }
  3234     	    }
  3258             }
  3235         }
  3259         }
  3236 
  3260 
  3237 
  3261 
  3238 	switch ( keyEvent.iCode )
  3262     switch ( keyEvent.iCode )
  3239 		{
  3263         {
  3240         // Open List Box item
  3264         // Open List Box item
  3241 		case EKeyEnter:
  3265         case EKeyEnter:
  3242 			{
  3266             {
  3243             switch ( iSettingIndex->At( iSettingListBox->CurrentItemIndex() ) )
  3267             switch ( iSettingIndex->At( iSettingListBox->CurrentItemIndex() ) )
  3244             	{
  3268                 {
  3245                	case EWmlSettingsGeneral:
  3269                 case EWmlSettingsGeneral:
  3246                 case EWmlSettingsPrivacy:
  3270                 case EWmlSettingsPrivacy:
  3247                 case EWmlSettingsPage:
  3271                 case EWmlSettingsPage:
  3248                 case EWmlSettingsWebFeeds:
  3272                 case EWmlSettingsWebFeeds:
  3249             	case EWmlSettingsToolbar:
  3273                 case EWmlSettingsToolbar:
  3250             	case EWmlSettingsShortcuts:
  3274                 case EWmlSettingsShortcuts:
  3251                 {
  3275                 {
  3252                 	DisplayCorrectSettingCategoryListL();
  3276                     DisplayCorrectSettingCategoryListL();
  3253                     break;
  3277                     break;
  3254             	}
  3278                 }
  3255                 
  3279                 
  3256                 // Individual Settings
  3280                 // Individual Settings
  3257                 case EWmlSettingsAccesspoint:
  3281                 case EWmlSettingsAccesspoint:
  3258                 case EWmlSettingsHomePage:
  3282                 case EWmlSettingsHomePage:
  3259                 case EWmlSettingsBackList:
  3283                 case EWmlSettingsBackList:
  3260                 case EWmlSettingsHttpSecurityWarnings:
  3284                 case EWmlSettingsHttpSecurityWarnings:
  3261                 case EWmlSettingsEcma:
  3285                 case EWmlSettingsEcma:
  3262 				case EWmlSettingsScriptLog:
  3286                 case EWmlSettingsScriptLog:
  3263                 case EWmlSettingsDownloadsOpen:
  3287                 case EWmlSettingsDownloadsOpen:
  3264                 case EWmlSettingsAutoLoadContent:
  3288                 case EWmlSettingsAutoLoadContent:
  3265                 case EWmlSettingsFullScreen:
  3289                 case EWmlSettingsFullScreen:
  3266                 case EWmlSettingsPageOverview:
  3290                 case EWmlSettingsPageOverview:
  3267                 case EWmlSettingsMediaVolume:
  3291                 case EWmlSettingsMediaVolume:
  3274                 case EWmlSettingsSaveReceipt:
  3298                 case EWmlSettingsSaveReceipt:
  3275 #endif
  3299 #endif
  3276                 case EWmlSettingsCookies:
  3300                 case EWmlSettingsCookies:
  3277                 case EWmlSettingsIMEINotification:
  3301                 case EWmlSettingsIMEINotification:
  3278                 case EWmlSettingsAutomaticUpdatingAP:
  3302                 case EWmlSettingsAutomaticUpdatingAP:
  3279 				case EWmlSettingsAutomaticUpdatingWhileRoaming:
  3303                 case EWmlSettingsAutomaticUpdatingWhileRoaming:
  3280 	            case EWmlSettingsUrlSuffix:
  3304                 case EWmlSettingsUrlSuffix:
  3281                 case EWmlSettingsFontSize:
  3305                 case EWmlSettingsFontSize:
  3282             	case EWmlSettingsToolbarButton1Cmd:
  3306                 case EWmlSettingsToolbarButton1Cmd:
  3283             	case EWmlSettingsToolbarButton2Cmd:
  3307                 case EWmlSettingsToolbarButton2Cmd:
  3284             	case EWmlSettingsToolbarButton3Cmd:
  3308                 case EWmlSettingsToolbarButton3Cmd:
  3285             	case EWmlSettingsToolbarButton4Cmd:
  3309                 case EWmlSettingsToolbarButton4Cmd:
  3286             	case EWmlSettingsToolbarButton5Cmd:
  3310                 case EWmlSettingsToolbarButton5Cmd:
  3287             	case EWmlSettingsToolbarButton6Cmd:
  3311                 case EWmlSettingsToolbarButton6Cmd:
  3288             	case EWmlSettingsToolbarButton7Cmd:
  3312                 case EWmlSettingsToolbarButton7Cmd:
  3289             	case EWmlSettingsShortCutKey1Cmd:
  3313                 case EWmlSettingsShortCutKey1Cmd:
  3290             	case EWmlSettingsShortCutKey2Cmd:
  3314                 case EWmlSettingsShortCutKey2Cmd:
  3291             	case EWmlSettingsShortCutKey3Cmd:
  3315                 case EWmlSettingsShortCutKey3Cmd:
  3292             	case EWmlSettingsShortCutKey4Cmd:
  3316                 case EWmlSettingsShortCutKey4Cmd:
  3293             	case EWmlSettingsShortCutKey5Cmd:
  3317                 case EWmlSettingsShortCutKey5Cmd:
  3294             	case EWmlSettingsShortCutKey6Cmd:
  3318                 case EWmlSettingsShortCutKey6Cmd:
  3295             	case EWmlSettingsShortCutKey7Cmd:
  3319                 case EWmlSettingsShortCutKey7Cmd:
  3296             	case EWmlSettingsShortCutKey8Cmd:
  3320                 case EWmlSettingsShortCutKey8Cmd:
  3297             	case EWmlSettingsShortCutKey9Cmd:
  3321                 case EWmlSettingsShortCutKey9Cmd:
  3298             	case EWmlSettingsShortCutKey0Cmd:
  3322                 case EWmlSettingsShortCutKey0Cmd:
  3299             	case EWmlSettingsShortCutKeyStarCmd:
  3323                 case EWmlSettingsShortCutKeyStarCmd:
  3300             	case EWmlSettingsShortCutKeyHashCmd:
  3324                 case EWmlSettingsShortCutKeyHashCmd:
  3301             	case EWmlSettingsSearchProvider:
  3325                 case EWmlSettingsSearchProvider:
  3302                 {
  3326                 {
  3303                 	ChangeItemL( ETrue );
  3327                     ChangeItemL( ETrue );
  3304                     ret = EKeyWasConsumed;
  3328                     ret = EKeyWasConsumed;
  3305                     break;
  3329                     break;
  3306                 }
  3330                 }
  3307                 default:
  3331                 default:
  3308                     break;
  3332                     break;
  3309                 }
  3333                 }
  3310 			break;
  3334             break;
  3311 			}
  3335             }
  3312 			
  3336             
  3313 		case EKeyOK:
  3337         case EKeyOK:
  3314             {
  3338             {
  3315             // MSK command handles the commands - no need for key handling
  3339             // MSK command handles the commands - no need for key handling
  3316             ret = EKeyWasConsumed;
  3340             ret = EKeyWasConsumed;
  3317             break; 
  3341             break; 
  3318             }
  3342             }
  3319 			
  3343             
  3320           default:
  3344           default:
  3321           	break;
  3345             break;
  3322 		}
  3346         }
  3323 
  3347 
  3324     if ( iSettingListBox && ( ret == EKeyWasNotConsumed || iSettingListBox ) )
  3348     if ( iSettingListBox && ( ret == EKeyWasNotConsumed || iSettingListBox ) )
  3325         {
  3349         {
  3326         ret = iSettingListBox->OfferKeyEventL( keyEvent, aType );
  3350         ret = iSettingListBox->OfferKeyEventL( keyEvent, aType );
  3327         }
  3351         }
  3365 // -----------------------------------------------------------------------------
  3389 // -----------------------------------------------------------------------------
  3366 // CSettingsContainer::HandleGainingForegroundL
  3390 // CSettingsContainer::HandleGainingForegroundL
  3367 // -----------------------------------------------------------------------------
  3391 // -----------------------------------------------------------------------------
  3368 //
  3392 //
  3369 void CSettingsContainer::HandleGainingForegroundL()
  3393 void CSettingsContainer::HandleGainingForegroundL()
  3370 	{
  3394     {
  3371 	switch(iCurrentSettingCategory)
  3395     switch(iCurrentSettingCategory)
  3372 		{
  3396         {
  3373 		case EGeneral:
  3397         case EGeneral:
  3374 			DisplayGeneralSettingsL();
  3398             DisplayGeneralSettingsL();
  3375 			break;
  3399             break;
  3376 		default: // do nothing
  3400         default: // do nothing
  3377 			break;
  3401             break;
  3378 		}
  3402         }
  3379 	}
  3403     }
  3380 
  3404 
  3381 // -----------------------------------------------------------------------------
  3405 // -----------------------------------------------------------------------------
  3382 // CSettingsContainer::CreateItemFromTwoStringsL
  3406 // CSettingsContainer::CreateItemFromTwoStringsL
  3383 // -----------------------------------------------------------------------------
  3407 // -----------------------------------------------------------------------------
  3384 //
  3408 //
  3424     RFs fsSession;
  3448     RFs fsSession;
  3425     User::LeaveIfError( fsSession.Connect() );
  3449     User::LeaveIfError( fsSession.Connect() );
  3426     CleanupClosePushL<RFs>( fsSession );
  3450     CleanupClosePushL<RFs>( fsSession );
  3427 
  3451 
  3428     CCnvCharacterSetConverter* charConv;
  3452     CCnvCharacterSetConverter* charConv;
  3429 	charConv = CCnvCharacterSetConverter::NewLC();
  3453     charConv = CCnvCharacterSetConverter::NewLC();
  3430 
  3454 
  3431     CArrayFix<CCnvCharacterSetConverter::SCharacterSet>* charSets;
  3455     CArrayFix<CCnvCharacterSetConverter::SCharacterSet>* charSets;
  3432 	charSets = charConv->CreateArrayOfCharacterSetsAvailableLC(fsSession);
  3456     charSets = charConv->CreateArrayOfCharacterSetsAvailableLC(fsSession);
  3433 
  3457 
  3434     TInt lastIndex = iEncodingArray->Count()-1;
  3458     TInt lastIndex = iEncodingArray->Count()-1;
  3435 
  3459 
  3436     for ( int i = lastIndex; i >= 0; i-- )
  3460     for ( int i = lastIndex; i >= 0; i-- )
  3437         {
  3461         {
  3482     AddEncodingL( KCharacterSetIdentifierWindows1250,   R_WMLBROWSER_SETTINGS_ENCODING_WINDOWS_1250 );
  3506     AddEncodingL( KCharacterSetIdentifierWindows1250,   R_WMLBROWSER_SETTINGS_ENCODING_WINDOWS_1250 );
  3483     AddEncodingL( KCharacterSetIdentifierWindows1251,   R_WMLBROWSER_SETTINGS_ENCODING_WINDOWS_1251 );
  3507     AddEncodingL( KCharacterSetIdentifierWindows1251,   R_WMLBROWSER_SETTINGS_ENCODING_WINDOWS_1251 );
  3484     AddEncodingL( KCharacterSetIdentifierWindows1253,   R_WMLBROWSER_SETTINGS_ENCODING_WINDOWS_1253 );
  3508     AddEncodingL( KCharacterSetIdentifierWindows1253,   R_WMLBROWSER_SETTINGS_ENCODING_WINDOWS_1253 );
  3485     AddEncodingL( KCharacterSetIdentifierWindows1254,   R_WMLBROWSER_SETTINGS_ENCODING_WINDOWS_1254 );
  3509     AddEncodingL( KCharacterSetIdentifierWindows1254,   R_WMLBROWSER_SETTINGS_ENCODING_WINDOWS_1254 );
  3486     AddEncodingL( KCharacterSetIdentifierWindows1257,   R_WMLBROWSER_SETTINGS_ENCODING_WINDOWS_1257 );
  3510     AddEncodingL( KCharacterSetIdentifierWindows1257,   R_WMLBROWSER_SETTINGS_ENCODING_WINDOWS_1257 );
  3487 	AddEncodingL( KCharacterSetIdentifierWindows1258,   R_WMLBROWSER_SETTINGS_ENCODING_WINDOWS_1258 );
  3511     AddEncodingL( KCharacterSetIdentifierWindows1258,   R_WMLBROWSER_SETTINGS_ENCODING_WINDOWS_1258 );
  3488 	AddEncodingL( KCharacterSetIdentifierTis620,        R_WMLBROWSER_SETTINGS_ENCODING_TIS_620 );		// Thai
  3512     AddEncodingL( KCharacterSetIdentifierTis620,        R_WMLBROWSER_SETTINGS_ENCODING_TIS_620 );       // Thai
  3489 	AddEncodingL( KCharacterSetIdentifierWindows874,	R_WMLBROWSER_SETTINGS_ENCODING_WINDOWS_874 );	// Thai
  3513     AddEncodingL( KCharacterSetIdentifierWindows874,    R_WMLBROWSER_SETTINGS_ENCODING_WINDOWS_874 );   // Thai
  3490 	AddEncodingL( KCharacterSetIdentifierEucJpPacked,	R_WMLBROWSER_SETTINGS_ENCODING_EUC_JP );
  3514     AddEncodingL( KCharacterSetIdentifierEucJpPacked,   R_WMLBROWSER_SETTINGS_ENCODING_EUC_JP );
  3491 	AddEncodingL( KCharacterSetIdentifierJis,			R_WMLBROWSER_SETTINGS_ENCODING_ISO_2022_JP );
  3515     AddEncodingL( KCharacterSetIdentifierJis,           R_WMLBROWSER_SETTINGS_ENCODING_ISO_2022_JP );
  3492 	AddEncodingL( KCharacterSetIdentifierShiftJis,	    R_WMLBROWSER_SETTINGS_ENCODING_SHIFT_JIS );
  3516     AddEncodingL( KCharacterSetIdentifierShiftJis,      R_WMLBROWSER_SETTINGS_ENCODING_SHIFT_JIS );
  3493     AddEncodingL( KCharacterSetIdentifierKoi8_r,        R_WMLBROWSER_SETTINGS_ENCODING_KOI8_R );
  3517     AddEncodingL( KCharacterSetIdentifierKoi8_r,        R_WMLBROWSER_SETTINGS_ENCODING_KOI8_R );
  3494     AddEncodingL( KCharacterSetIdentifierKoi8_u,        R_WMLBROWSER_SETTINGS_ENCODING_KOI8_U );
  3518     AddEncodingL( KCharacterSetIdentifierKoi8_u,        R_WMLBROWSER_SETTINGS_ENCODING_KOI8_U );
  3495 	AddEncodingL( KCharacterSetIdentifierIscii,			R_WMLBROWSER_SETTINGS_ENCODING_ISCII);
  3519 	AddEncodingL( KCharacterSetIdentifierIscii,			R_WMLBROWSER_SETTINGS_ENCODING_ISCII);
       
  3520     AddEncodingL( KCharacterSetIdentifierEucKr,         R_WMLBROWSER_SETTINGS_ENCODING_EUC_KR );
       
  3521     AddEncodingL( KCharacterSetIdentifierKsc5601,       R_WMLBROWSER_SETTINGS_ENCODING_KSC_5601 );
  3496     AddEncodingL( KCharacterSetIdentifierAutomatic,     R_WMLBROWSER_SETTINGS_ENCODING_AUTOMATIC );
  3522     AddEncodingL( KCharacterSetIdentifierAutomatic,     R_WMLBROWSER_SETTINGS_ENCODING_AUTOMATIC );
  3497     }
  3523     }
  3498 
  3524 
  3499 #ifdef __SERIES60_HELP
  3525 #ifdef __SERIES60_HELP
  3500 // -----------------------------------------------------------------------------
  3526 // -----------------------------------------------------------------------------
  3505     {
  3531     {
  3506     aContext.iMajor = KUidBrowserApplication;
  3532     aContext.iMajor = KUidBrowserApplication;
  3507     /*
  3533     /*
  3508     context is dependent on what Category we are in
  3534     context is dependent on what Category we are in
  3509     enum TSettingCategory
  3535     enum TSettingCategory
  3510 	        {
  3536             {
  3511 	        EMain = 0,
  3537             EMain = 0,
  3512 	        EGeneral,
  3538             EGeneral,
  3513 	        EPrivacy,
  3539             EPrivacy,
  3514 	        EPage,
  3540             EPage,
  3515 	        EWebFeeds,
  3541             EWebFeeds,
  3516 	        EToolbar,
  3542             EToolbar,
  3517 	        EShortCuts,
  3543             EShortCuts,
  3518 	        ENone
  3544             ENone
  3519 	        };
  3545             };
  3520     */
  3546     */
  3521     switch ( iCurrentSettingCategory )
  3547     switch ( iCurrentSettingCategory )
  3522         {
  3548         {
  3523         case EMain:
  3549         case EMain:
  3524             aContext.iContext = KOSS_HLP_SETTINGS_FOLDERS;
  3550             aContext.iContext = KOSS_HLP_SETTINGS_FOLDERS;
  3582 // -----------------------------------------------------------------------------
  3608 // -----------------------------------------------------------------------------
  3583 // CSettingsContainer::SizeChanged
  3609 // CSettingsContainer::SizeChanged
  3584 // -----------------------------------------------------------------------------
  3610 // -----------------------------------------------------------------------------
  3585 //
  3611 //
  3586 void CSettingsContainer::SizeChanged()
  3612 void CSettingsContainer::SizeChanged()
  3587 	{
  3613     {
  3588 	if ( iSettingListBox )
  3614     if ( iSettingListBox )
  3589 	    {
  3615         {
  3590 	    iSettingListBox->SetRect( Rect() );
  3616         iSettingListBox->SetRect( Rect() );
  3591 	    }
  3617         }
  3592 	}
  3618     }
  3593 
  3619 
  3594 
  3620 
  3595 // ----------------------------------------------------------------------------
  3621 // ----------------------------------------------------------------------------
  3596 // CSettingsContainer::FocusChanged
  3622 // CSettingsContainer::FocusChanged
  3597 // ----------------------------------------------------------------------------
  3623 // ----------------------------------------------------------------------------
  3693         }
  3719         }
  3694 
  3720 
  3695     CApSelect* ApSel = CApSelect::NewLC(
  3721     CApSelect* ApSel = CApSelect::NewLC(
  3696                 iApiProvider.CommsModel().CommsDb(),
  3722                 iApiProvider.CommsModel().CommsDb(),
  3697                 KEApIspTypeAll, //KEApIspTypeWAPMandatory,
  3723                 KEApIspTypeAll, //KEApIspTypeWAPMandatory,
  3698 		        EApBearerTypeAll,
  3724                 EApBearerTypeAll,
  3699 			    KEApSortNameAscending,
  3725                 KEApSortNameAscending,
  3700 		        EIPv4 | EIPv6 );
  3726                 EIPv4 | EIPv6 );
  3701 	TInt apSelCount = ApSel->Count();
  3727     TInt apSelCount = ApSel->Count();
  3702     BROWSER_LOG( ( _L( " ApSel->Count(): %d" ), apSelCount ) );
  3728     BROWSER_LOG( ( _L( " ApSel->Count(): %d" ), apSelCount ) );
  3703     CleanupStack::PopAndDestroy( ApSel ); //ApSel
  3729     CleanupStack::PopAndDestroy( ApSel ); //ApSel
  3704 
  3730 
  3705     CApUtils* au = CApUtils::NewLC( iApiProvider.CommsModel().CommsDb() );
  3731     CApUtils* au = CApUtils::NewLC( iApiProvider.CommsModel().CommsDb() );
  3706     TBool apExist = au->WapApExistsL( id );
  3732     TBool apExist = au->WapApExistsL( id );