fep/aknfep/src/AknFepManager.cpp
branchRCL_3
changeset 3 f5a1e66df979
parent 0 eb1f2e154e89
child 5 a47de9135b21
--- a/fep/aknfep/src/AknFepManager.cpp	Tue Feb 02 01:02:04 2010 +0200
+++ b/fep/aknfep/src/AknFepManager.cpp	Fri Feb 19 23:09:27 2010 +0200
@@ -3361,7 +3361,7 @@
          (keyScanCode == EPtiKeyQwertyApostrophe) )
          && !( iFepPluginManager && iFepPluginManager->EnableITIOnFSQ() ) )          
         {
-        SendEventsToPluginManL( EPluginCloseMode, EFalse );
+        //SendEventsToPluginManL( EPluginCloseMode, EFalse );
         //iFepPluginManager->ClosePluginInputModeL(ETrue);
         }
     else if( keyHandled )
@@ -3728,6 +3728,7 @@
             case EAknClosePenInputRequest:
                 if ( iFepPluginManager )
                     {
+                    // Fix bug ou1cimx1#225126, editor team asks that the parameter is EFalse.
                     iFepPluginManager->ClosePluginInputModeL( EFalse );
                     }
                 break;
@@ -3752,6 +3753,27 @@
                 break;
             }
         }
+#ifdef RD_SCALABLE_UI_V2
+    else
+        {
+        // Close touch input when inMenu is opened. When inMenu is opened, 
+        // editor loses focus, and inMenu gets focus. After touch input has 
+        // been force closed, menu state should be restored and last focused
+        // window ,which launches touch input, should be removed.
+        if( aEventType == EAknClosePenInputRequest  
+                && iFepPluginManager  
+                && iFepPluginManager->IsInMenuOpen() )
+            {
+            CCoeEnv* env = CCoeEnv::Static();
+            TKeyEvent keyEvent = {EKeyCBA2, EStdKeyNull, 0, 0};
+            env->SimulateKeyEventL(keyEvent,EEventKey);            
+            iFepPluginManager->ResetMenuState();            
+            iFepPluginManager->RemoveLastFocusedWinFromOpenList();
+            // Fix bug ou1cimx1#225126, editor team asks that the parameter is EFalse.
+            iFepPluginManager->ClosePluginInputModeL( EFalse );
+            }
+        }
+#endif // RD_SCALABLE_UI_V2  
     }
 
 
@@ -4067,6 +4089,7 @@
 #ifdef RD_SCALABLE_UI_V2        		    
     if (iFepPluginManager->IsSpellVisible())
         {
+        CommitInlineEditL();
         HBufC* spell = iFepPluginManager->SpellTextInput();
         
         iFepPluginManager->SetITUTSpellingStateL(EFalse); 
@@ -8720,7 +8743,8 @@
 	    iSpellInitCurSel = aTextSpanToReplace;
 
         iFepPluginManager->SetCaseUpdatesSupressed(isCaseUpdatesSupressed);
-        iFepPluginManager->SetITUTSpellingStateL(ETrue);    
+		//add to avoid text update late when open spell.
+        //iFepPluginManager->SetITUTSpellingStateL(ETrue);    
         iFepPluginManager->SetCursorSelection(aTextSpanToReplace);
         CleanupStack::PopAndDestroy();
         
@@ -12011,7 +12035,7 @@
     	// When FSQ is opened with the ITI-supported input language, 
     	// if switch to another language which doesn't support ITI, such as Korean,
     	// need to restore the previous configuration on FEP
-        if ( iFepPluginManager )
+        if ( iFepPluginManager && !iFepPluginManager->IsSupportITIOnFSQ() )
         	{    	
         	iFepPluginManager->ResetItiStateL();
         	}    	
@@ -15568,10 +15592,10 @@
     CleanupStack::Pop( icons );	// iUiInterface->LaunchListPopupL takes ownership immediately
 #ifdef RD_SCALABLE_UI_V2 
     /* tp teleca fix 17.9.2009 to IKIM-7VK8GG*/
-    /*if( iFepFullyConstructed && iFepPluginManager)
+    if( iFepFullyConstructed && iFepPluginManager)
             {
             iFepPluginManager->SetMenuState();            
-            }*/
+            }
     // tp teleca fix end
 #endif              
     // Fire up the dialog
@@ -20597,27 +20621,29 @@
 	if (!iPtiEngine)
 		return;
 		
-    CPtiCoreLanguage* lang = (CPtiCoreLanguage*)iPtiEngine->GetLanguage(iLanguageCapabilities.iInputLanguageCode);
-    TPtiEngineInputMode inputMode = iPtiEngine->InputMode();
-    
+    CPtiCoreLanguage* lang = (CPtiCoreLanguage*)iPtiEngine->GetLanguage(iLanguageCapabilities.iInputLanguageCode);    
     if (!lang)
         return;
 
     const TBool vietnamese = (iLanguageCapabilities.iInputLanguageCode == ELangVietnamese);
-
+    
     MPtiKeyMappings* map;
-    if (inputMode == EPtiEngineQwerty || inputMode == EPtiEngineQwertyPredictive)
-        {
-        map = lang->GetQwertyKeymappings();
-        }
-    else if( inputMode == EPtiEngineHalfQwerty || inputMode == EPtiEngineHalfQwertyPredictive )
-        {
-        map = lang->GetHalfQwertyKeymappings();
-        }
-    else    
-        {
-        map = lang->GetKeymappings();
-        }
+    TPtiKeyboardType keyboardLayout = KeyboardLayout();
+	if ( keyboardLayout == EPtiKeyboardQwerty4x12 
+		 || keyboardLayout == EPtiKeyboardQwerty4x10
+		 || keyboardLayout == EPtiKeyboardQwerty3x11
+		 || keyboardLayout == EPtiKeyboardCustomQwerty )
+		{
+		map = lang->GetQwertyKeymappings();
+		}
+	else if( keyboardLayout == EPtiKeyboardHalfQwerty )
+		{
+		map = lang->GetHalfQwertyKeymappings();
+		}
+	else    
+		{
+		map = lang->GetKeymappings();
+		}          
 
     if (!map)
         {
@@ -20626,7 +20652,8 @@
 
     TUint16 ch;
     ch = (TUint16)map->KeyForCharacter(aChar); 
-    if (!ch && vietnamese)
+    if ( !ch && vietnamese 
+         && !( iFepPluginManager && iFepPluginManager->IsSupportITIOnFSQ() ) )
         {
         // This may be Vietnamese tone mark or an accented character which isn't listed
         // in keymappings.