287 { |
279 { |
288 if( !iPenInputSvrConnected || !iPenInputServer.IsVisible() || iPenInputServer.IsDimmed() ) |
280 if( !iPenInputSvrConnected || !iPenInputServer.IsVisible() || iPenInputServer.IsDimmed() ) |
289 { |
281 { |
290 if( iFepMan.FepAwareTextEditor() ) |
282 if( iFepMan.FepAwareTextEditor() ) |
291 { |
283 { |
|
284 iPreferredUiMode = ETrue; |
292 TryChangePluginInputModeByModeL((TPluginInputMode)(iSharedData.PluginInputMode()), |
285 TryChangePluginInputModeByModeL((TPluginInputMode)(iSharedData.PluginInputMode()), |
293 EPenInputOpenManually, |
286 EPenInputOpenManually, |
294 ERangeInvalid); |
287 ERangeInvalid); |
295 } |
288 } |
296 } |
289 } |
297 iFepMan.PtiEngine()->CancelTimerActivity(); |
290 iFepMan.PtiEngine()->CancelTimerActivity(); |
298 } |
291 } |
299 |
292 |
300 |
|
301 // --------------------------------------------------------------------------- |
293 // --------------------------------------------------------------------------- |
302 // CAknFepPluginManager::DeactivatePenInputL |
294 // CAknFepPluginManager::DeactivatePenInputL |
303 // (other items were commented in a header) |
295 // (other items were commented in a header) |
304 // --------------------------------------------------------------------------- |
296 // --------------------------------------------------------------------------- |
305 // |
297 // |
1098 iIndicatorTextID = 0; |
1089 iIndicatorTextID = 0; |
1099 } |
1090 } |
1100 |
1091 |
1101 iPluginInputMode = (TPluginInputMode)iLangMan.CurrentImePlugin()->CurrentMode(); |
1092 iPluginInputMode = (TPluginInputMode)iLangMan.CurrentImePlugin()->CurrentMode(); |
1102 |
1093 |
|
1094 //following codes is used to tell MFNE editor the Touch Input |
|
1095 //has been opened. Because MFNE editor has no editorstate, so |
|
1096 //use this way to implement this. |
|
1097 if ( iFepMan.IsMfneEditor() ) |
|
1098 { |
|
1099 MCoeFepAwareTextEditor* mfne( iFepMan.FepAwareTextEditor() ); |
|
1100 iMfneChanged = ( iMfne != mfne ); |
|
1101 iMfne = mfne; |
|
1102 InformMfneUiStatusL( ETrue ); |
|
1103 } |
1103 |
1104 |
1104 // Addition for ITI features on FSQ |
1105 // Addition for ITI features on FSQ |
1105 // Before open touch window, need to set iPluginPrimaryRange = 0 |
1106 // Before open touch window, need to set iPluginPrimaryRange = 0 |
1106 // which means use the default range. |
1107 // which means use the default range. |
1107 iPluginPrimaryRange = 0; |
1108 iPluginPrimaryRange = 0; |
1108 |
1109 |
1109 InitializePluginInputL(aOpenMode, aSuggestRange, cleanContent); |
1110 InitializePluginInputL(aOpenMode, aSuggestRange, cleanContent); |
1110 |
|
1111 //following codes is used to tell MFNE editor the Touch Input |
|
1112 //has been opened. Because MFNE editor has no editorstate, so |
|
1113 //use this way to implement this. |
|
1114 if ( iFepMan.IsMfneEditor() ) |
|
1115 { |
|
1116 MCoeFepAwareTextEditor* mfne( iFepMan.FepAwareTextEditor() ); |
|
1117 iMfneChanged = ( iMfne != mfne ); |
|
1118 iMfne = mfne; |
|
1119 InformMfneUiStatusL( ETrue ); |
|
1120 } |
|
1121 |
1111 |
1122 //save plugin input mode to repository |
1112 //save plugin input mode to repository |
1123 if( iPenInputServer.PreferredUiMode() == EPluginInputModeNone ) |
1113 if( iPenInputServer.PreferredUiMode() == EPluginInputModeNone ) |
1124 { |
1114 { |
1125 //do not remember application set input mode |
1115 //do not remember application set input mode |
1126 iSharedData.SetPluginInputMode(iPluginInputMode); |
1116 iSharedData.SetPluginInputMode(iPluginInputMode); |
1127 } |
1117 } |
1128 |
1118 |
1129 if (CurrentFepInputUI()) |
1119 if (CurrentFepInputUI()) |
1130 { |
1120 { |
|
1121 CurrentFepInputUI()->SetInputLanguageL((TLanguage)inputLang); |
1131 CurrentFepInputUI()->SetMode(iFepMan.InputMode(), ETrue, EFalse); |
1122 CurrentFepInputUI()->SetMode(iFepMan.InputMode(), ETrue, EFalse); |
1132 } |
1123 } |
1133 |
1124 |
1134 if(!iOrientationChangedfromUI) |
1125 if(!iOrientationChangedfromUI) |
1135 { |
1126 { |
2685 // --------------------------------------------------------------------------- |
2674 // --------------------------------------------------------------------------- |
2686 // CAknFepPluginManager::LaunchPenInputLanguageSelectionL |
2675 // CAknFepPluginManager::LaunchPenInputLanguageSelectionL |
2687 // (other items were commented in a header) |
2676 // (other items were commented in a header) |
2688 // --------------------------------------------------------------------------- |
2677 // --------------------------------------------------------------------------- |
2689 // |
2678 // |
2690 void CAknFepPluginManager::LaunchPenInputLanguageSelectionL( TBool aLaunchedByTouchWin ) |
2679 void CAknFepPluginManager::LaunchPenInputLanguageSelectionL( TBool /*aLaunchedByTouchWin*/ ) |
2691 { |
2680 { |
2692 //record langauge |
2681 //record langauge |
2693 TInt oldLang = iSharedData.InputTextLanguage(); |
2682 // TInt oldLang = iSharedData.InputTextLanguage(); |
2694 CPenInputGSInterface* setting = CPenInputGSInterface::NewL(); |
2683 // CPenInputGSInterface* setting = CPenInputGSInterface::NewL(); |
2695 CleanupStack::PushL(setting); |
2684 // CleanupStack::PushL(setting); |
2696 iFepMan.SetCancelPopupInQwerty( aLaunchedByTouchWin ); |
2685 // iFepMan.SetCancelPopupInQwerty( aLaunchedByTouchWin ); |
2697 setting->ShowInputLanguagePageL(); |
2686 // setting->ShowInputLanguagePageL(); |
2698 iFepMan.SetCancelPopupInQwerty( EFalse ); |
2687 // iFepMan.SetCancelPopupInQwerty( EFalse ); |
2699 CleanupStack::PopAndDestroy(setting); |
2688 // CleanupStack::PopAndDestroy(setting); |
2700 TInt inputLanguage = iSharedData.InputTextLanguage(); |
2689 // TInt inputLanguage = iSharedData.InputTextLanguage(); |
2701 if( oldLang != inputLanguage) |
2690 // if( oldLang != inputLanguage) |
2702 { |
2691 // { |
2703 iSharedData.SetInputTextLanguage(inputLanguage); |
2692 // iSharedData.SetInputTextLanguage(inputLanguage); |
2704 iFepMan.ChangeInputLanguageL(inputLanguage); |
2693 // iFepMan.ChangeInputLanguageL(inputLanguage); |
2705 iFepMan.SetFlag( CAknFepManager::EFlagNewSharedDataInputLanguage |
2694 // iFepMan.SetFlag( CAknFepManager::EFlagNewSharedDataInputLanguage |
2706 | CAknFepManager::EFlagNewSharedDataInputMode ); |
2695 // | CAknFepManager::EFlagNewSharedDataInputMode ); |
2707 |
2696 // |
2708 } |
2697 // } |
2709 } |
2698 } |
2710 |
2699 |
2711 // --------------------------------------------------------------------------- |
2700 // --------------------------------------------------------------------------- |
2712 // CAknFepPluginManager::LaunchPenInputRecognitionWithDictionarySelectionL |
2701 // CAknFepPluginManager::LaunchPenInputRecognitionWithDictionarySelectionL |
2713 // (other items were commented in a header) |
2702 // (other items were commented in a header) |
2714 // --------------------------------------------------------------------------- |
2703 // --------------------------------------------------------------------------- |
2715 // |
2704 // |
2716 void CAknFepPluginManager::LaunchPenInputRecognitionWithDictionarySelectionL() |
2705 void CAknFepPluginManager::LaunchPenInputRecognitionWithDictionarySelectionL() |
2717 { |
2706 { |
2718 //record langauge |
2707 //record langauge |
2719 CPenInputGSInterface* setting = CPenInputGSInterface::NewL(); |
2708 // CPenInputGSInterface* setting = CPenInputGSInterface::NewL(); |
2720 CleanupStack::PushL(setting); |
2709 // CleanupStack::PushL(setting); |
2721 setting->ShowRecognitionWithDictionaryL(); |
2710 // setting->ShowRecognitionWithDictionaryL(); |
2722 CleanupStack::PopAndDestroy(setting); |
2711 // CleanupStack::PopAndDestroy(setting); |
2723 TInt inputLanguage = iSharedData.InputTextLanguage(); |
2712 // TInt inputLanguage = iSharedData.InputTextLanguage(); |
2724 } |
2713 } |
2725 |
2714 |
2726 // --------------------------------------------------------------------------- |
2715 // --------------------------------------------------------------------------- |
2727 // CAknFepPluginManager::LaunchPenInputSettingL |
2716 // CAknFepPluginManager::LaunchPenInputSettingL |
2728 // (other items were commented in a header) |
2717 // (other items were commented in a header) |
2729 // --------------------------------------------------------------------------- |
2718 // --------------------------------------------------------------------------- |
2730 // |
2719 // |
2731 void CAknFepPluginManager::LaunchPenInputSettingL() |
2720 void CAknFepPluginManager::LaunchPenInputSettingL() |
2732 { |
2721 { |
2733 //record langauge |
2722 //record langauge |
2734 TInt oldLang = iSharedData.InputTextLanguage(); |
2723 // TInt oldLang = iSharedData.InputTextLanguage(); |
2735 if ( !iGsInterface ) |
2724 // if ( !iGsInterface ) |
2736 { |
2725 // { |
2737 iGsInterface = CPenInputGSInterface::NewL(); |
2726 // iGsInterface = CPenInputGSInterface::NewL(); |
2738 } |
2727 // } |
2739 iGsInterface->ShowMainViewL(); |
2728 // iGsInterface->ShowMainViewL(); |
2740 TInt inputLanguage = iSharedData.InputTextLanguage(); |
2729 // TInt inputLanguage = iSharedData.InputTextLanguage(); |
2741 if( oldLang != inputLanguage) |
2730 // if( oldLang != inputLanguage) |
2742 { |
2731 // { |
2743 iFepMan.ChangeInputLanguageL(inputLanguage); |
2732 // iFepMan.ChangeInputLanguageL(inputLanguage); |
2744 } |
2733 // } |
2745 |
2734 |
2746 } |
2735 } |
2747 |
2736 |
2748 // ----------------------------------------------------------------------------- |
2737 // ----------------------------------------------------------------------------- |
2749 // CAknFepManager::ParseInputContextContent |
2738 // CAknFepManager::ParseInputContextContent |
3730 //read resource from resource |
3723 //read resource from resource |
3731 HBufC* keymapRes = HBufC::NewL(2); |
3724 HBufC* keymapRes = HBufC::NewL(2); |
3732 TLocale locale; |
3725 TLocale locale; |
3733 TChar decimalSep = locale.DecimalSeparator(); |
3726 TChar decimalSep = locale.DecimalSeparator(); |
3734 TChar minusSign ='-'; |
3727 TChar minusSign ='-'; |
3735 |
3728 |
3736 keymapRes->Des().Append(decimalSep); |
3729 keymapRes->Des().Append(decimalSep); |
3737 keymapRes->Des().Append(minusSign); |
3730 keymapRes->Des().Append(minusSign); |
3738 |
3731 |
3739 if( keymapRes ) |
3732 CleanupStack::PushL(keymapRes); |
3740 { |
3733 iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputEditorCustomNumericKeyMap, |
3741 CleanupStack::PushL(keymapRes); |
|
3742 iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputEditorCustomNumericKeyMap, |
|
3743 reinterpret_cast<TInt>(keymapRes) ); |
3734 reinterpret_cast<TInt>(keymapRes) ); |
3744 CleanupStack::PopAndDestroy(keymapRes); |
3735 CleanupStack::PopAndDestroy(keymapRes); |
3745 return; |
3736 return; |
3746 } |
|
3747 } |
3737 } |
3748 |
3738 |
3749 iCurrentPluginInputFepUI->SetNumberModeKeyMappingL(EAknEditorPlainNumberModeKeymap); |
3739 iCurrentPluginInputFepUI->SetNumberModeKeyMappingL(EAknEditorPlainNumberModeKeymap); |
3750 } |
3740 } |
3751 } |
3741 } |