fep/aknfep/peninputplugins/PeninputPluginKr/src/PeninputPluginKr.cpp
branchRCL_3
changeset 9 e6a39382bb9c
parent 7 6defe5d1bd39
child 12 5e18d8c489d6
equal deleted inserted replaced
8:4eb1ae11334f 9:e6a39382bb9c
    39 #include "PeninputPluginKr.pan"	  	// panic codes
    39 #include "PeninputPluginKr.pan"	  	// panic codes
    40 #include "PluginKrFepManagerBase.h"     // panic codes
    40 #include "PluginKrFepManagerBase.h"     // panic codes
    41 #include "PluginKrFepManagerHwr.h"
    41 #include "PluginKrFepManagerHwr.h"
    42 #include "PluginKrFepManagerVkb.h"
    42 #include "PluginKrFepManagerVkb.h"
    43 #include "PluginKrFepManagerItut.h"
    43 #include "PluginKrFepManagerItut.h"
       
    44 #include "peninputpluginkrcombinelistquerydialog.h"
    44 
    45 
    45 //_LIT(KFscImeName, "Korean FSC");
    46 //_LIT(KFscImeName, "Korean FSC");
    46 //_LIT(KHwrImeName, "Korean HWR");
    47 //_LIT(KHwrImeName, "Korean HWR");
    47 _LIT(KVkbImeName, "Korean VKB");
    48 _LIT(KVkbImeName, "Korean VKB");
    48 _LIT(KFsqImeName, "Korean FSQ");
    49 _LIT(KFsqImeName, "Korean FSQ");
   125     TFileName resourceName(KPeninputPluginKrResourceFileName);
   126     TFileName resourceName(KPeninputPluginKrResourceFileName);
   126     CCoeEnv* coeEnv = CCoeEnv::Static();
   127     CCoeEnv* coeEnv = CCoeEnv::Static();
   127     BaflUtils::NearestLanguageFile(coeEnv->FsSession(), resourceName);
   128     BaflUtils::NearestLanguageFile(coeEnv->FsSession(), resourceName);
   128     iResId = coeEnv->AddResourceFileL(resourceName);
   129     iResId = coeEnv->AddResourceFileL(resourceName);
   129     
   130     
   130     iRepository=CRepository::NewL(KCRUidAknFep);
       
   131     
       
   132     }
   131     }
   133 
   132 
   134 CPeninputPluginKr::~CPeninputPluginKr()
   133 CPeninputPluginKr::~CPeninputPluginKr()
   135     {
   134     {
   136     delete iRepository;
   135 	
   137     CCoeEnv::Static()->DeleteResourceFile(iResId);
   136     CCoeEnv::Static()->DeleteResourceFile(iResId);
   138     DeActivate();
   137     DeActivate();
   139     iUiLayoutImpIdList.Close();
   138     iUiLayoutImpIdList.Close();
   140     delete iPluginKrFepManager;
   139     delete iPluginKrFepManager;
   141     iAllUiManagers.ResetAndDestroy();
   140     iAllUiManagers.ResetAndDestroy();
   320 
   319 
   321 TBool CPeninputPluginKr::HandleMenuCommandL(TInt aCommandId)
   320 TBool CPeninputPluginKr::HandleMenuCommandL(TInt aCommandId)
   322     {
   321     {
   323     LOG("FEP.IMEPLG.KR.HandleMenuCommandL");
   322     LOG("FEP.IMEPLG.KR.HandleMenuCommandL");
   324     TInt ret(EFalse);
   323     TInt ret(EFalse);
       
   324     CRepository* repository = CRepository::NewLC(KCRUidAknFep);
   325     if (aCommandId==EPeninputPluginKrDoubleConsonentCmd)
   325     if (aCommandId==EPeninputPluginKrDoubleConsonentCmd)
   326         {
   326         {
   327         TInt settingValue;
   327         TInt settingValue;
   328         iRepository->Get(KAknFepKoreanCombineWordFlag,settingValue);
   328         repository ->Get(KAknFepKoreanCombineWordFlag,settingValue);
   329         settingValue |= EKoreanWordCombineConsonantOnSetting;
   329         settingValue |= EKoreanWordCombineConsonantOnSetting;
   330         iRepository->Set(EKoreanWordCombineConsonantOnSetting,settingValue);
   330         repository ->Set(EKoreanWordCombineConsonantOnSetting,settingValue);
   331         TRAP_IGNORE(ShowListQueryL(R_AKNEXQUERY_MULTI_SELECTION_LIST_QUERY));
   331         TRAP_IGNORE(ShowListQueryL(R_AKNEXQUERY_MULTI_SELECTION_LIST_QUERY,repository ));
   332         iRepository->Get(KAknFepKoreanCombineWordFlag,settingValue);
   332         repository ->Get(KAknFepKoreanCombineWordFlag,settingValue);
   333         settingValue &= 0xFFFFFEFF;
   333         settingValue &= 0xFFFFFEFF;
   334         iRepository->Set(EKoreanWordCombineConsonantOnSetting,settingValue);
   334         repository ->Set(EKoreanWordCombineConsonantOnSetting,settingValue);
   335         ret=ETrue;
   335         ret=ETrue;
   336         }
   336         }
       
   337     
       
   338     CleanupStack::PopAndDestroy(repository);
   337     return ret;
   339     return ret;
   338     }
   340     }
   339 
   341 
   340 void CPeninputPluginKr::DynInitMenuPaneL(
   342 void CPeninputPluginKr::DynInitMenuPaneL(
   341         CAknFepUiInterfaceMenuPane* aMenuPane)
   343         CAknFepUiInterfaceMenuPane* aMenuPane)
   573 		{
   575 		{
   574 		return iAllUiManagers[KFSQUiIndex];
   576 		return iAllUiManagers[KFSQUiIndex];
   575 		}
   577 		}
   576     }
   578     }
   577 
   579 
   578 void CPeninputPluginKr::ShowListQueryL(const TInt aResourceId)
   580 void CPeninputPluginKr::ShowListQueryL(const TInt aResourceId, CRepository* aRepository)
   579     {
   581     {
   580     CArrayFixFlat<TInt>* arraySelected=
   582     CArrayFixFlat<TInt>* arraySelected=
   581         new (ELeave) CArrayFixFlat<TInt>(7);
   583         new (ELeave) CArrayFixFlat<TInt>(7);
   582     CleanupStack::PushL(arraySelected);
   584     CleanupStack::PushL(arraySelected);
   583     CAknListQueryDialog* dlg=
   585    
   584         new (ELeave) CAknListQueryDialog(arraySelected);
   586     CPeninputPluginKrCombineListQueryDialog* dlg = 
       
   587     		new(ELeave)CPeninputPluginKrCombineListQueryDialog(arraySelected);
   585     dlg->PrepareLC(aResourceId);
   588     dlg->PrepareLC(aResourceId);
   586     
   589     
   587 
   590 
   588     TInt settingValue;
   591     TInt settingValue;
   589 
   592 
   590     if( iRepository->Get( KAknFepKoreanCombineWordFlag, settingValue ) == KErrNone )
   593     if( aRepository->Get( KAknFepKoreanCombineWordFlag, settingValue ) == KErrNone )
   591         {
   594         {
   592         if( settingValue & EKoreanWordCombineConsonantSsangKiyeok )
   595         if( settingValue & EKoreanWordCombineConsonantSsangKiyeok )
   593             {
   596             {
   594             arraySelected->AppendL(0);
   597             arraySelected->AppendL(0);
   595             }
   598             }
   634     
   637     
   635     if (dlg->RunLD())
   638     if (dlg->RunLD())
   636         {
   639         {
   637 
   640 
   638         settingValue &= 0xFFFFFF01; 
   641         settingValue &= 0xFFFFFF01; 
   639         iRepository->Set( KAknFepKoreanCombineWordFlag, settingValue );
   642         
       
   643         aRepository->Set( KAknFepKoreanCombineWordFlag, settingValue );
   640         for (TInt i=0;i<arraySelected->Count();i++)
   644         for (TInt i=0;i<arraySelected->Count();i++)
   641             {
   645             {
   642             switch (arraySelected->At(i))
   646             switch (arraySelected->At(i))
   643                 {
   647                 {
   644                 case 0:
   648                 case 0:
   664                     break;
   668                     break;
   665                 default:
   669                 default:
   666                     break;
   670                     break;
   667                 }
   671                 }
   668             }
   672             }
   669         }
   673 
   670 
   674 
   671     iRepository->Set( KAknFepKoreanCombineWordFlag, settingValue );
   675         aRepository->Set( KAknFepKoreanCombineWordFlag, settingValue );
       
   676         }
       
   677     
   672     CleanupStack::PopAndDestroy(arraySelected);
   678     CleanupStack::PopAndDestroy(arraySelected);
   673     }
   679     }
   674 
   680 
   675 //End Of File
   681 //End Of File