textinput/peninputgenericitut/src/peninputgenericitutlayout.cpp
branchRCL_3
changeset 15 6c2c2d3ab788
parent 7 6defe5d1bd39
child 19 ac7e4d1d9209
--- a/textinput/peninputgenericitut/src/peninputgenericitutlayout.cpp	Tue May 25 13:03:44 2010 +0300
+++ b/textinput/peninputgenericitut/src/peninputgenericitutlayout.cpp	Wed Jun 09 10:03:19 2010 +0300
@@ -170,7 +170,6 @@
         case ECmdPenInputLanguage:
             {
             TRAP_IGNORE(SetInputLanguageL(*data));
-            
             }
             break;
         case ECmdPenInputRange:
@@ -206,10 +205,10 @@
         case ECmdPenInputFingerSpelling:
             {
 
-            if (UiMgr())
+            if ( iWesternUiMgr )
                 {
                 TInt handled = KErrNone;
-                TRAP_IGNORE(handled = UiMgr()->HandleCommandL(aCmd, aData));
+                TRAP_IGNORE( handled = iWesternUiMgr->HandleCommandL( aCmd, aData ));
                 return handled;
                 }
             }
@@ -385,14 +384,21 @@
     
 void CGenericItutUiLayout::SetInputModeL(TInt aMode)
     {
-		TBool numericOnlyChanged = iDataMgr->IsCharFlagChanged() ? ETrue : EFalse;
-		//only number mode need judge it
+	// Input mode can not be set to EnativeNumber in Thai
+    TInt inputLanguage = iDataMgr->InputLanguage();
+    if ( aMode ==  ENativeNumber && inputLanguage == ELangThai )
+        {
+        aMode = ENumber;
+        }
+    
+    TBool numericOnlyChanged = iDataMgr->IsCharFlagChanged() ? ETrue : EFalse;
+    //only number mode need judge it
 
-		//  both EStrokeFind and EStroke will be stored as Estroke  ///// 
-		if ( aMode != iDataMgr->InputMode() || 
-			 aMode == EStroke || aMode == EStrokeFind || 
-			 aMode == EZhuyin || aMode == EZhuyinFind || 
-			 numericOnlyChanged )
+    //  both EStrokeFind and EStroke will be stored as Estroke  ///// 
+    if ( aMode != iDataMgr->InputMode() || 
+        aMode == EStroke || aMode == EStrokeFind || 
+        aMode == EZhuyin || aMode == EZhuyinFind || 
+        numericOnlyChanged )
         {
         // deactivate original uimgr first
         if (iCurrentUiMgr