27 #include <StringLoader.h> |
27 #include <StringLoader.h> |
28 |
28 |
29 #include <peninputcmd.h> |
29 #include <peninputcmd.h> |
30 #include <PeninputPluginKrRes.rsg> |
30 #include <PeninputPluginKrRes.rsg> |
31 #include <peninputclient.h> |
31 #include <peninputclient.h> |
32 |
32 #include <AknFepInternalCRKeys.h> |
33 #include <PtiKoreanQwertyCoreCRDefs.h> |
33 |
|
34 |
34 |
35 |
35 #include "PeninputPluginKrDbg.h" |
36 #include "PeninputPluginKrDbg.h" |
36 #include "PeninputPluginKr.hrh" // CPeninputPluginKr |
37 #include "PeninputPluginKr.hrh" // CPeninputPluginKr |
37 #include "PeninputPluginKr.h" // CPeninputPluginKr |
38 #include "PeninputPluginKr.h" // CPeninputPluginKr |
38 #include "PeninputPluginKr.pan" // panic codes |
39 #include "PeninputPluginKr.pan" // panic codes |
53 const TInt KItutUiIndex = 0; |
54 const TInt KItutUiIndex = 0; |
54 const TInt KVkbUiIndex = 1; |
55 const TInt KVkbUiIndex = 1; |
55 const TInt KFSQUiIndex = 2; |
56 const TInt KFSQUiIndex = 2; |
56 //const TInt KFSQUiEngIndex = 3; |
57 //const TInt KFSQUiEngIndex = 3; |
57 const TInt KInvalidImplId = 0; |
58 const TInt KInvalidImplId = 0; |
|
59 |
|
60 enum TPeninputKoreanWordCombineFlags |
|
61 { |
|
62 EKoreanWordCombineVersion = 0x00000001, |
|
63 EKoreanWordCombineConsonantSsangKiyeok = 0x00000002, |
|
64 EKoreanWordCombineConsonantSsangTikeut = 0x00000004, |
|
65 EKoreanWordCombineConsonantSsangPieup = 0x00000008, |
|
66 EKoreanWordCombineConsonantSsangSios = 0x00000010, |
|
67 EKoreanWordCombineConsonantCieuc = 0x00000020, |
|
68 EKoreanWordCombineConsonantYaPlusI = 0x00000040, |
|
69 EKoreanWordCombineConsonantYuPlusI = 0x00000080, |
|
70 EKoreanWordCombineConsonantOnSetting = 0x00000100 |
|
71 }; |
58 |
72 |
59 LOCAL_C void Cleanup( TAny* aAny ) |
73 LOCAL_C void Cleanup( TAny* aAny ) |
60 { |
74 { |
61 RImplInfoPtrArray* implArray = |
75 RImplInfoPtrArray* implArray = |
62 reinterpret_cast< RImplInfoPtrArray*> ( aAny ); |
76 reinterpret_cast< RImplInfoPtrArray*> ( aAny ); |
306 { |
320 { |
307 LOG("FEP.IMEPLG.KR.HandleMenuCommandL"); |
321 LOG("FEP.IMEPLG.KR.HandleMenuCommandL"); |
308 TInt ret(EFalse); |
322 TInt ret(EFalse); |
309 if (aCommandId==EPeninputPluginKrDoubleConsonentCmd) |
323 if (aCommandId==EPeninputPluginKrDoubleConsonentCmd) |
310 { |
324 { |
311 iRepository->Set(EDblConsonentOnSetting,1); |
325 TInt settingValue; |
|
326 iRepository->Get(KAknFepKoreanCombineWordFlag,settingValue); |
|
327 settingValue |= EKoreanWordCombineConsonantOnSetting; |
|
328 iRepository->Set(EKoreanWordCombineConsonantOnSetting,settingValue); |
312 TRAP_IGNORE(ShowListQueryL(R_AKNEXQUERY_MULTI_SELECTION_LIST_QUERY)); |
329 TRAP_IGNORE(ShowListQueryL(R_AKNEXQUERY_MULTI_SELECTION_LIST_QUERY)); |
313 iRepository->Set(EDblConsonentOnSetting,0); |
330 iRepository->Get(KAknFepKoreanCombineWordFlag,settingValue); |
|
331 settingValue &= 0xFFFFFEFF; |
|
332 iRepository->Set(EKoreanWordCombineConsonantOnSetting,settingValue); |
314 ret=ETrue; |
333 ret=ETrue; |
315 } |
334 } |
316 return ret; |
335 return ret; |
317 } |
336 } |
318 |
337 |
561 CleanupStack::PushL(arraySelected); |
580 CleanupStack::PushL(arraySelected); |
562 CAknListQueryDialog* dlg= |
581 CAknListQueryDialog* dlg= |
563 new (ELeave) CAknListQueryDialog(arraySelected); |
582 new (ELeave) CAknListQueryDialog(arraySelected); |
564 dlg->PrepareLC(aResourceId); |
583 dlg->PrepareLC(aResourceId); |
565 |
584 |
566 TInt set; |
585 |
567 if (iRepository->Get(EDblConsonentSsangKiyeok,set)==KErrNone) |
586 TInt settingValue; |
568 { |
587 |
569 if (set) arraySelected->AppendL(0); |
588 if( iRepository->Get( KAknFepKoreanCombineWordFlag, settingValue ) == KErrNone ) |
570 } |
589 { |
571 if (iRepository->Get(EDblConsonentSsangTikeut,set)==KErrNone) |
590 if( settingValue & EKoreanWordCombineConsonantSsangKiyeok ) |
572 { |
591 { |
573 if (set) arraySelected->AppendL(1); |
592 arraySelected->AppendL(0); |
574 } |
593 } |
575 if (iRepository->Get(EDblConsonentSsangPieup,set)==KErrNone) |
594 |
576 { |
595 |
577 if (set) arraySelected->AppendL(2); |
596 if( settingValue & EKoreanWordCombineConsonantSsangTikeut ) |
578 } |
597 { |
579 if (iRepository->Get(EDblConsonentSsangSios,set)==KErrNone) |
598 arraySelected->AppendL(1); |
580 { |
599 } |
581 if (set) arraySelected->AppendL(3); |
600 |
582 } |
601 |
583 if (iRepository->Get(EDblConsonentSsangCieuc,set)==KErrNone) |
602 if( settingValue & EKoreanWordCombineConsonantSsangPieup ) |
584 { |
603 { |
585 if (set) arraySelected->AppendL(4); |
604 arraySelected->AppendL(2); |
586 } |
605 } |
587 if (iRepository->Get(EDblConsonentYaPlusI,set)==KErrNone) |
606 |
588 { |
607 |
589 if (set) arraySelected->AppendL(5); |
608 if( settingValue & EKoreanWordCombineConsonantSsangSios ) |
590 } |
609 { |
591 if (iRepository->Get(EDblConsonentYuPlusI,set)==KErrNone) |
610 arraySelected->AppendL(3); |
592 { |
611 } |
593 if (set) arraySelected->AppendL(6); |
612 |
|
613 |
|
614 if( settingValue & EKoreanWordCombineConsonantCieuc ) |
|
615 { |
|
616 arraySelected->AppendL(4); |
|
617 } |
|
618 |
|
619 |
|
620 if( settingValue & EKoreanWordCombineConsonantYaPlusI ) |
|
621 { |
|
622 arraySelected->AppendL(5); |
|
623 } |
|
624 |
|
625 |
|
626 if( settingValue & EKoreanWordCombineConsonantYuPlusI ) |
|
627 { |
|
628 arraySelected->AppendL(6); |
|
629 } |
594 } |
630 } |
595 dlg->ListBox()->SetSelectionIndexesL(arraySelected); |
631 dlg->ListBox()->SetSelectionIndexesL(arraySelected); |
596 |
632 |
597 if (dlg->RunLD()) |
633 if (dlg->RunLD()) |
598 { |
634 { |
599 iRepository->Set(EDblConsonentSsangKiyeok,0); |
635 |
600 iRepository->Set(EDblConsonentSsangTikeut,0); |
636 settingValue &= 0xFFFFFF01; |
601 iRepository->Set(EDblConsonentSsangPieup,0); |
637 iRepository->Set( KAknFepKoreanCombineWordFlag, settingValue ); |
602 iRepository->Set(EDblConsonentSsangSios,0); |
|
603 iRepository->Set(EDblConsonentSsangCieuc,0); |
|
604 iRepository->Set(EDblConsonentYaPlusI,0); |
|
605 iRepository->Set(EDblConsonentYuPlusI,0); |
|
606 |
|
607 for (TInt i=0;i<arraySelected->Count();i++) |
638 for (TInt i=0;i<arraySelected->Count();i++) |
608 { |
639 { |
609 switch (arraySelected->At(i)) |
640 switch (arraySelected->At(i)) |
610 { |
641 { |
611 case 0: |
642 case 0: |
612 iRepository->Set(EDblConsonentSsangKiyeok,1); |
643 settingValue |= EKoreanWordCombineConsonantSsangKiyeok; |
613 break; |
644 break; |
614 case 1: |
645 case 1: |
615 iRepository->Set(EDblConsonentSsangTikeut,1); |
646 settingValue |= EKoreanWordCombineConsonantSsangTikeut; |
616 break; |
647 break; |
617 case 2: |
648 case 2: |
618 iRepository->Set(EDblConsonentSsangPieup,1); |
649 settingValue |= EKoreanWordCombineConsonantSsangPieup; |
619 break; |
650 break; |
620 case 3: |
651 case 3: |
621 iRepository->Set(EDblConsonentSsangSios,1); |
652 settingValue |= EKoreanWordCombineConsonantSsangSios; |
622 break; |
653 break; |
623 case 4: |
654 case 4: |
624 iRepository->Set(EDblConsonentSsangCieuc,1); |
655 settingValue |= EKoreanWordCombineConsonantCieuc; |
625 break; |
656 break; |
626 case 5: |
657 case 5: |
627 iRepository->Set(EDblConsonentYaPlusI,1); |
658 settingValue |= EKoreanWordCombineConsonantYaPlusI; |
628 break; |
659 break; |
629 case 6: |
660 case 6: |
630 iRepository->Set(EDblConsonentYuPlusI,1); |
661 settingValue |= EKoreanWordCombineConsonantYuPlusI; |
631 break; |
662 break; |
632 default: |
663 default: |
633 break; |
664 break; |
634 } |
665 } |
635 } |
666 } |
636 } |
667 } |
|
668 |
|
669 iRepository->Set( KAknFepKoreanCombineWordFlag, settingValue ); |
637 CleanupStack::PopAndDestroy(arraySelected); |
670 CleanupStack::PopAndDestroy(arraySelected); |
638 } |
671 } |
639 |
672 |
640 //End Of File |
673 //End Of File |