textinput/peninputcommonlayout/src/peninputlayoutwindow.cpp
branchRCL_3
changeset 7 6defe5d1bd39
parent 0 eb1f2e154e89
child 9 e6a39382bb9c
--- a/textinput/peninputcommonlayout/src/peninputlayoutwindow.cpp	Mon Mar 15 12:42:02 2010 +0200
+++ b/textinput/peninputcommonlayout/src/peninputlayoutwindow.cpp	Wed Mar 31 22:08:20 2010 +0300
@@ -2075,16 +2075,19 @@
     {
     CAknFepCtrlEventButton* switchToHwrBtn = static_cast<CAknFepCtrlEventButton*>
         ( iCtrlPool->Control( EPeninutWindowCtrlIdSwitchToHwrBtn ) );
-
-    if ( aEnable )    
+    
+    if( switchToHwrBtn != NULL )
         {
-        switchToHwrBtn->SetDimmed(EFalse);
+        if ( aEnable )    
+            {
+            switchToHwrBtn->SetDimmed(EFalse);
+            }
+        else
+            {
+            switchToHwrBtn->SetDimmed(ETrue);
+            switchToHwrBtn->SetActive(EFalse);
+            }
         }
-    else
-        {
-        switchToHwrBtn->SetDimmed(ETrue);
-        switchToHwrBtn->SetActive(EFalse);
-        } 
     }
 
 // ---------------------------------------------------------------------------
@@ -2097,18 +2100,22 @@
     CAknFepCtrlEventButton* langSetBtn = static_cast<CAknFepCtrlEventButton*>
         ( iCtrlPool->Control( EPeninutWindowCtrlIdInputLangSwitcherBtn ) );
         
-    if ( aEnable )    
+    
+    if( langSetBtn != NULL )
         {
-        langSetBtn->SetDimmed(EFalse);
-        iTouchInputOptionButton->SetDimmed(EFalse);
+        if ( aEnable )    
+            {
+            langSetBtn->SetDimmed(EFalse);
+            iTouchInputOptionButton->SetDimmed(EFalse);
+            }
+        else
+            {
+            langSetBtn->SetDimmed(ETrue);
+            langSetBtn->SetActive(EFalse);
+            iTouchInputOptionButton->SetDimmed(ETrue);
+            iTouchInputOptionButton->SetActive(EFalse);
+            }
         }
-    else
-        {
-        langSetBtn->SetDimmed(ETrue);
-        langSetBtn->SetActive(EFalse);
-        iTouchInputOptionButton->SetDimmed(ETrue);
-        iTouchInputOptionButton->SetActive(EFalse);
-        } 
     }
         
 // ---------------------------------------------------------------------------