filebrowser/engine/engine.cpp
changeset 34 e0ec97ec3cc4
parent 17 4f2773374eff
child 31 e7a04a6385be
equal deleted inserted replaced
23:c9bf25a20c9f 34:e0ec97ec3cc4
    29 #include <coeutils.h>
    29 #include <coeutils.h>
    30 #include <bautils.h>
    30 #include <bautils.h>
    31 #include <apaid.h>
    31 #include <apaid.h>
    32 #include <s32file.h>
    32 #include <s32file.h>
    33 
    33 
    34 // hash key selection related includes
       
    35 #ifndef __SERIES60_30__
       
    36   #include <centralrepository.h>
       
    37   #include <AknFepInternalCRKeys.h>
       
    38   #include <AvkonInternalCRKeys.h>
       
    39   #include <e32property.h> 
       
    40 #endif
       
    41 
       
    42 // CONSTANTS
    34 // CONSTANTS
    43 // UID of the application
    35 // UID of the application
    44 const TUid KUidFileBrowser = { 0x102828D6 };
    36 const TUid KUidFileBrowser = { 0x102828D6 };
    45 
    37 
    46 const TInt KSettingsDrive = EDriveC;
    38 const TInt KSettingsDrive = EDriveC;
    88 void CEngine::ActivateEngineL()
    80 void CEngine::ActivateEngineL()
    89     {
    81     {
    90     TRAP_IGNORE( LoadSettingsL() );
    82     TRAP_IGNORE( LoadSettingsL() );
    91 
    83 
    92     iFileUtils = CFileBrowserFileUtils::NewL(this);
    84     iFileUtils = CFileBrowserFileUtils::NewL(this);
    93 
       
    94     // get hash key selection value
       
    95     GetHashKeySelectionStatus();
       
    96     }
    85     }
    97 
    86 
    98 // ---------------------------------------------------------------------------
    87 // ---------------------------------------------------------------------------
    99 
    88 
   100 void CEngine::DeActivateEngineL()
    89 void CEngine::DeActivateEngineL()
   101     {
    90     {
   102     }
    91     }
   103 	
    92 	
   104 // --------------------------------------------------------------------------------------------
       
   105 
       
   106 //void CEngine::SetFileListContainer(CFileBrowserFileListContainer* aFileListContainer)
       
   107 //    {
       
   108 //    iFileListContainer = aFileListContainer;
       
   109 //    }
       
   110 
       
   111 // ---------------------------------------------------------------------------
    93 // ---------------------------------------------------------------------------
   112 
    94 
   113 void CEngine::LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TInt& aValue)
    95 void CEngine::LoadDFSValueL(CDictionaryFileStore* aDicFS, const TUid& aUid, TInt& aValue)
   114     {
    96     {
   115     if (aDicFS->IsPresentL(aUid))
    97     if (aDicFS->IsPresentL(aUid))
   272 			}
   254 			}
   273         //iFileListContainer->HandleSettingsChangeL();
   255         //iFileListContainer->HandleSettingsChangeL();
   274         }
   256         }
   275     }
   257     }
   276 
   258 
   277 // --------------------------------------------------------------------------------------------
       
   278 
       
   279 void CEngine::GetHashKeySelectionStatus()
       
   280     {
       
   281     TBool hashKeySelectionInUse(EFalse);
       
   282     
       
   283 #ifndef __SERIES60_30__
       
   284     
       
   285     // get hash key selection value
       
   286     TRAP_IGNORE(
       
   287         CRepository* repository = CRepository::NewLC(KCRUidAknFep);
       
   288         repository->Get(KAknFepHashKeySelection, hashKeySelectionInUse);
       
   289         CleanupStack::PopAndDestroy();
       
   290     );
       
   291     
       
   292     // even if hash key selection is in use, ignore the value in qwerty mode
       
   293     if (hashKeySelectionInUse)
       
   294         {
       
   295         TBool qwertyMode(EFalse);
       
   296         RProperty qwertyModeStatusProperty;
       
   297         qwertyModeStatusProperty.Attach(KCRUidAvkon, KAknQwertyInputModeActive);
       
   298         qwertyModeStatusProperty.Get(qwertyMode);
       
   299         qwertyModeStatusProperty.Close();
       
   300         
       
   301         if (qwertyMode)
       
   302             hashKeySelectionInUse = EFalse;        
       
   303         }
       
   304 
       
   305 #endif
       
   306 
       
   307     iIsHashKeySelectionInUse = hashKeySelectionInUse;
       
   308     }
       
   309     	
       
   310 // --------------------------------------------------------------------------------------------
   259 // --------------------------------------------------------------------------------------------
   311 
   260 
   312 TInt CEngine::LaunchSettingsDialogL()
   261 TInt CEngine::LaunchSettingsDialogL()
   313     {
   262     {
   314 	TInt retValue = KErrNone;
   263 	TInt retValue = KErrNone;