40 #include <AvkonInternalCRKeys.h> |
40 #include <AvkonInternalCRKeys.h> |
41 #include <AknFepInternalPSKeys.h> |
41 #include <AknFepInternalPSKeys.h> |
42 #include <AknFepGlobalEnums.h> |
42 #include <AknFepGlobalEnums.h> |
43 #include "AknFepPredictiveSettingDialog.h" |
43 #include "AknFepPredictiveSettingDialog.h" |
44 #include <aknnotewrappers.h> |
44 #include <aknnotewrappers.h> |
45 #include <AknFep.rsg> |
45 #include <aknfep.rsg> |
46 #include <hlplch.h> |
46 #include <hlplch.h> |
47 #include <csxhelp/cp.hlp.hrh> |
47 #include <csxhelp/cp.hlp.hrh> |
48 #include <akntitle.h> //CAknTitlePane |
48 #include <akntitle.h> //CAknTitlePane |
49 #include <StringLoader.h> |
49 #include <StringLoader.h> |
50 #include <aknnavide.h> |
50 #include <aknnavide.h> |
67 void CAknFepPredictiveSettingDialog::ConstructL( TInt aMenuTitleResourceId ) |
67 void CAknFepPredictiveSettingDialog::ConstructL( TInt aMenuTitleResourceId ) |
68 { |
68 { |
69 CAknDialog::ConstructL(aMenuTitleResourceId); |
69 CAknDialog::ConstructL(aMenuTitleResourceId); |
70 PrepareStatusPaneL(); |
70 PrepareStatusPaneL(); |
71 iItemCloseEventCheck = CIdle::NewL(CActive::EPriorityStandard); |
71 iItemCloseEventCheck = CIdle::NewL(CActive::EPriorityStandard); |
|
72 iSimuKey = EFalse; |
72 } |
73 } |
73 |
74 |
74 CAknFepPredictiveSettingDialog ::CAknFepPredictiveSettingDialog(TInt aConfirmationQueryResId, TInt aTitlePaneResId): |
75 CAknFepPredictiveSettingDialog ::CAknFepPredictiveSettingDialog(TInt aConfirmationQueryResId, TInt aTitlePaneResId): |
75 iConfirmationQueryResId(aConfirmationQueryResId), |
76 iConfirmationQueryResId(aConfirmationQueryResId), |
76 iPredictiveSettingOffQueryNotShown(ETrue), |
77 iPredictiveSettingOffQueryNotShown(ETrue), |
645 |
646 |
646 if ( iOriginalKeyboardLayout != keyboardLayout ) |
647 if ( iOriginalKeyboardLayout != keyboardLayout ) |
647 { |
648 { |
648 if(iSettingItemInEditingState) |
649 if(iSettingItemInEditingState) |
649 { |
650 { |
650 // If we are currently editing the settings item then generate a cancel event |
651 if (!iSimuKey) |
651 // and start the scheduler so as to close the settings page |
652 { |
652 // when the blocking call completes. |
653 // If we are currently editing the settings item then generate a cancel event |
653 RWsSession& wsSession = CEikonEnv::Static()->WsSession(); |
654 // and start the scheduler so as to close the settings page |
654 TKeyEvent escapeEvent = {EKeyEscape, EStdKeyEscape, 0, 0}; |
655 // when the blocking call completes. |
655 TRAP_IGNORE(CEikonEnv::Static()->SimulateKeyEventL(escapeEvent, EEventKey)); |
656 RWsSession& wsSession = CEikonEnv::Static()->WsSession(); |
656 wsSession.Flush(); |
657 TKeyEvent escapeEvent = {EKeyEscape, EStdKeyEscape, 0, 0}; |
657 iItemCloseEventCheck->Start( TCallBack(EventCheckCallback, this) ); |
658 TRAP_IGNORE(CEikonEnv::Static()->SimulateKeyEventL(escapeEvent, EEventKey)); |
|
659 iSimuKey = ETrue; |
|
660 wsSession.Flush(); |
|
661 iItemCloseEventCheck->Start( TCallBack(EventCheckCallback, this) ); |
|
662 } |
658 } |
663 } |
659 else |
664 else |
660 { |
665 { |
661 // In case the current settings item is not in editing state then directly |
666 // In case the current settings item is not in editing state then directly |
662 // close the settings page. |
667 // close the settings page. |