fep/aknfep/UiPlugins/AknFepUiInterface/AvkonImpl/src/AknFepPredictiveSettingDialog.cpp
equal
deleted
inserted
replaced
36 #include <AknQueryDialog.h> |
36 #include <AknQueryDialog.h> |
37 #include <AknFepInternalCRKeys.h> |
37 #include <AknFepInternalCRKeys.h> |
38 #include <PtiDefs.h> |
38 #include <PtiDefs.h> |
39 #include <e32property.h> |
39 #include <e32property.h> |
40 #include <AvkonInternalCRKeys.h> |
40 #include <AvkonInternalCRKeys.h> |
|
41 #include <AknFepInternalPSKeys.h> |
41 #include <AknFepGlobalEnums.h> |
42 #include <AknFepGlobalEnums.h> |
42 #include "AknFepPredictiveSettingDialog.h" |
43 #include "AknFepPredictiveSettingDialog.h" |
43 #include <aknnotewrappers.h> |
44 #include <aknnotewrappers.h> |
44 #include <AknFep.rsg> |
45 #include <AknFep.rsg> |
45 #include <hlplch.h> |
46 #include <hlplch.h> |
79 iLastTitle(NULL), |
80 iLastTitle(NULL), |
80 iStatusTitle(NULL), |
81 iStatusTitle(NULL), |
81 iTitlePaneResId(aTitlePaneResId), |
82 iTitlePaneResId(aTitlePaneResId), |
82 iSettingItemInEditingState(EFalse) |
83 iSettingItemInEditingState(EFalse) |
83 { |
84 { |
84 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
|
85 RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, iOriginalKeyboardLayout); |
|
86 #endif //__ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
|
87 } |
85 } |
88 |
86 |
89 CAknFepPredictiveSettingDialog::~CAknFepPredictiveSettingDialog() |
87 CAknFepPredictiveSettingDialog::~CAknFepPredictiveSettingDialog() |
90 { |
88 { |
91 TRAP_IGNORE(RestoreStatusPaneL()); |
89 TRAP_IGNORE(RestoreStatusPaneL()); |
104 SEikControlInfo CAknFepPredictiveSettingDialog::CreateCustomControlL(TInt /*aControlType*/) |
102 SEikControlInfo CAknFepPredictiveSettingDialog::CreateCustomControlL(TInt /*aControlType*/) |
105 { |
103 { |
106 |
104 |
107 // construct the data object the settings list will use |
105 // construct the data object the settings list will use |
108 iSettingsData = CAknFepPredictiveSettingData::NewL(); |
106 iSettingsData = CAknFepPredictiveSettingData::NewL(); |
|
107 |
|
108 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
|
109 iOriginalKeyboardLayout = iSettingsData->OwnerKeyboardType(); |
|
110 #endif //__ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
|
111 |
109 iAknFepRepository = CRepository::NewL(KCRUidAknFep); |
112 iAknFepRepository = CRepository::NewL(KCRUidAknFep); |
110 ReadSettingsDataL(); |
113 ReadSettingsDataL(); |
111 |
114 |
112 iSettingsList = CAknFepPredictiveSettingList::NewL(*iSettingsData, *this); |
115 iSettingsList = CAknFepPredictiveSettingList::NewL(*iSettingsData, *this); |
113 |
116 |
219 iAknFepRepository->Get(KAknFepPrimaryCandidateFlag, primaryCandidate); |
222 iAknFepRepository->Get(KAknFepPrimaryCandidateFlag, primaryCandidate); |
220 iAknFepRepository->Get(KAknFepPhysicalKeyboards, physicalKeyboards); |
223 iAknFepRepository->Get(KAknFepPhysicalKeyboards, physicalKeyboards); |
221 } |
224 } |
222 |
225 |
223 // Parse keyboard dependent settings for current keyboard from bitmask |
226 // Parse keyboard dependent settings for current keyboard from bitmask |
224 TInt keyboardLayout = 0; |
227 TPtiKeyboardType layout = iSettingsData->OwnerKeyboardType(); |
225 RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardLayout); |
|
226 TPtiKeyboardType layout = (TPtiKeyboardType)keyboardLayout; |
|
227 TInt autoTmp = autoWordCompl; |
228 TInt autoTmp = autoWordCompl; |
228 |
229 |
229 // This part of code for error fixing: |
230 // This part of code for error fixing: |
230 // IF ITI is off for QWERTY/ITU-T iPredictiveTextFlag = 0 |
231 // IF ITI is off for QWERTY/ITU-T iPredictiveTextFlag = 0 |
231 // IF ITI is on for ITU-T iPredictiveTextFlag = 1 |
232 // IF ITI is on for ITU-T iPredictiveTextFlag = 1 |
270 iAknFepRepository->Get(KAknFepAutoCompleteFlag, autoFlag); |
271 iAknFepRepository->Get(KAknFepAutoCompleteFlag, autoFlag); |
271 TInt predFlag = 0; |
272 TInt predFlag = 0; |
272 iAknFepRepository->Get(KAknFepPredTxtFlagExtension, predFlag); |
273 iAknFepRepository->Get(KAknFepPredTxtFlagExtension, predFlag); |
273 |
274 |
274 // Parse keyboard dependent settings for current keyboard from bitmask |
275 // Parse keyboard dependent settings for current keyboard from bitmask |
275 TInt keyboardLayout = 0; |
276 TPtiKeyboardType layout = iSettingsData->OwnerKeyboardType(); |
276 RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardLayout); |
|
277 TPtiKeyboardType layout = (TPtiKeyboardType)keyboardLayout; |
|
278 switch(layout) |
277 switch(layout) |
279 { |
278 { |
280 case EPtiKeyboardNone: |
279 case EPtiKeyboardNone: |
281 break; |
280 break; |
282 case EPtiKeyboard12Key: |
281 case EPtiKeyboard12Key: |
341 iAknFepRepository->Get(KAknFepAutoCompleteFlag, autoFlag); |
340 iAknFepRepository->Get(KAknFepAutoCompleteFlag, autoFlag); |
342 TInt predFlag = 0; |
341 TInt predFlag = 0; |
343 iAknFepRepository->Get(KAknFepPredTxtFlagExtension, predFlag); |
342 iAknFepRepository->Get(KAknFepPredTxtFlagExtension, predFlag); |
344 |
343 |
345 // Parse keyboard dependent settings for current keyboard from bitmask |
344 // Parse keyboard dependent settings for current keyboard from bitmask |
346 TInt keyboardLayout = 0; |
345 TPtiKeyboardType layout = iSettingsData->OwnerKeyboardType(); |
347 RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardLayout); |
|
348 TPtiKeyboardType layout = (TPtiKeyboardType)keyboardLayout; |
|
349 switch(layout) |
346 switch(layout) |
350 { |
347 { |
351 case EPtiKeyboardNone: |
348 case EPtiKeyboardNone: |
352 break; |
349 break; |
353 case EPtiKeyboard12Key: |
350 case EPtiKeyboard12Key: |
437 { |
434 { |
438 if(iAknFepRepository) |
435 if(iAknFepRepository) |
439 { |
436 { |
440 iAknFepRepository->Get(KAknFepPredTxtFlagExtension,iPredictiveTextFlag); |
437 iAknFepRepository->Get(KAknFepPredTxtFlagExtension,iPredictiveTextFlag); |
441 } |
438 } |
442 TInt keyboardLayout = 0; |
439 TPtiKeyboardType layout = iSettingsData->OwnerKeyboardType(); |
443 RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardLayout); |
|
444 TPtiKeyboardType layout = (TPtiKeyboardType)keyboardLayout; |
|
445 TBool QueryNeeded = EFalse; |
440 TBool QueryNeeded = EFalse; |
446 if(iSettingsList->DeviceHasMultipleKeyboards()) |
441 if(iSettingsList->DeviceHasMultipleKeyboards()) |
447 { |
442 { |
448 TInt activateITIForKbd = 0; |
443 TInt activateITIForKbd = 0; |
449 if(EAutoWordCompletion == iSettingsList->ListBox()->CurrentItemIndex() && |
444 if(EAutoWordCompletion == iSettingsList->ListBox()->CurrentItemIndex() && |
642 { |
637 { |
643 iAknFepRepository->Get(KAknFepPredTxtFlagExtension, iPredictiveTextFlag); |
638 iAknFepRepository->Get(KAknFepPredTxtFlagExtension, iPredictiveTextFlag); |
644 } |
639 } |
645 |
640 |
646 // Adjust predictive flag after layout switch |
641 // Adjust predictive flag after layout switch |
647 TInt keyboardLayout = EPtiKeyboardNone; |
642 TPtiKeyboardType keyboardLayout = iSettingsData->ActiveKeyboardType(); |
648 RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardLayout); |
|
649 //settings page not to be retained on change of keyboard layout for Touch Input. |
643 //settings page not to be retained on change of keyboard layout for Touch Input. |
650 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
644 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__ |
651 if (iOriginalKeyboardLayout != keyboardLayout) |
645 |
|
646 if ( iOriginalKeyboardLayout != keyboardLayout ) |
652 { |
647 { |
653 if(iSettingItemInEditingState) |
648 if(iSettingItemInEditingState) |
654 { |
649 { |
655 // If we are currently editing the settings item then generate a cancel event |
650 // If we are currently editing the settings item then generate a cancel event |
656 // and start the scheduler so as to close the settings page |
651 // and start the scheduler so as to close the settings page |