browserui/browser/BrowserAppSrc/BrowserPreferences.cpp
branchRCL_3
changeset 40 3154c14a33db
parent 39 08ffbd51e3fd
equal deleted inserted replaced
39:08ffbd51e3fd 40:3154c14a33db
    61 #include "CmApplicationSettingsUi.h"
    61 #include "CmApplicationSettingsUi.h"
    62 #include <cmmanager.h>
    62 #include <cmmanager.h>
    63 #include <cmdestination.h>
    63 #include <cmdestination.h>
    64 
    64 
    65 // CONSTANTS
    65 // CONSTANTS
    66 
    66 #define KSearchAppUid 0x2001f3a9
    67 //Shared data values for Full Screen setting
    67 //Shared data values for Full Screen setting
    68 const TInt KBrowserFullScreenSettingDataSoftkeysOff			 = 0; //full screen
    68 const TInt KBrowserFullScreenSettingDataSoftkeysOff			 = 0; //full screen
    69 const TInt KBrowserFullScreenSettingDataSoftkeysOn			 = 1; //softkeys displayed
    69 const TInt KBrowserFullScreenSettingDataSoftkeysOn			 = 1; //softkeys displayed
    70 
    70 
    71 //Shared data values for Adaptive Bookmarks setting
    71 //Shared data values for Adaptive Bookmarks setting
   746     iAllPreferences.iZoomLevelMax = GetIntValue( KBrowserNGZoomMax );
   746     iAllPreferences.iZoomLevelMax = GetIntValue( KBrowserNGZoomMax );
   747     iAllPreferences.iZoomLevelDefault = GetIntValue( KBrowserNGZoomDefault );
   747     iAllPreferences.iZoomLevelDefault = GetIntValue( KBrowserNGZoomDefault );
   748 
   748 
   749     iAllPreferences.iMaxRecentUrlsToShow = GetIntValue( KBrowserNGMaxRecentUrls );
   749     iAllPreferences.iMaxRecentUrlsToShow = GetIntValue( KBrowserNGMaxRecentUrls );
   750 
   750 
   751     iAllPreferences.iSearch = GetIntValue( KBrowserSearch );
   751     RApaLsSession aLs;
   752     iAllPreferences.iService = GetIntValue( KBrowserServices );
   752     User::LeaveIfError(aLs.Connect());
       
   753     CleanupClosePushL(aLs);
       
   754     iAllPreferences.iSearch = GetSearchFeatureStatusL( KBrowserSearch, aLs );
       
   755     iAllPreferences.iService = GetSearchFeatureStatusL( KBrowserServices, aLs );
       
   756     CleanupStack::PopAndDestroy(&aLs);
       
   757 
   753     iAllPreferences.iCursorShowMode = (TBrCtlDefs::TCursorSettings)GetIntValue( KBrowserCursorShowMode );
   758     iAllPreferences.iCursorShowMode = (TBrCtlDefs::TCursorSettings)GetIntValue( KBrowserCursorShowMode );
   754     iAllPreferences.iEnterKeyMode = (TBrCtlDefs::TEnterKeySettings)GetIntValue( KBrowserEnterKeyMode );
   759     iAllPreferences.iEnterKeyMode = (TBrCtlDefs::TEnterKeySettings)GetIntValue( KBrowserEnterKeyMode );
   755     }
   760     }
   756 
   761 
   757 
   762 
  2267 
  2272 
  2268     TPtr ptr = iAllPreferences.iUrlSuffixList->Des();
  2273     TPtr ptr = iAllPreferences.iUrlSuffixList->Des();
  2269     ptr.Copy( aSetting->Des() );
  2274     ptr.Copy( aSetting->Des() );
  2270     }
  2275     }
  2271 
  2276 
       
  2277 //Following function is specific for Search application.
       
  2278 //It will check if search application present in device and will turn the feature ON.
       
  2279 TInt CBrowserPreferences::GetSearchFeatureStatusL( TUint32 aKey, RApaLsSession& aLs)
       
  2280 {
       
  2281     TInt aVal = EFalse;
       
  2282     //Search for 'Search' application. If its there then only enable feature, otherwise disable.
       
  2283     TApaAppInfo aInfo;
       
  2284     aLs.GetAppInfo(aInfo, TUid::Uid( KSearchAppUid ));
       
  2285     if(aInfo.iUid == TUid::Uid( KSearchAppUid ))
       
  2286     {
       
  2287         //Now, Turn on the Search feature.
       
  2288         aVal = ETrue;
       
  2289     }
       
  2290     //Set value to key;
       
  2291     SetIntValueL(aKey, aVal);
       
  2292     //Again Read if feature is enabled.
       
  2293     return GetIntValue(aKey);
       
  2294 }
  2272 // End of File
  2295 // End of File