textinput/GSLangPlugin/src/GSLangContainer.cpp
branchRCL_3
changeset 3 f5a1e66df979
parent 0 eb1f2e154e89
child 12 5e18d8c489d6
equal deleted inserted replaced
0:eb1f2e154e89 3:f5a1e66df979
  1278         iListboxItemArray->SetItemVisibilityL( EGSLangIdPredictiveOptions,
  1278         iListboxItemArray->SetItemVisibilityL( EGSLangIdPredictiveOptions,
  1279                 CGSListBoxItemTextArray::EInvisible );
  1279                 CGSListBoxItemTextArray::EInvisible );
  1280         }
  1280         }
  1281     else
  1281     else
  1282         {
  1282         {
       
  1283 #ifndef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__
  1283         iListboxItemArray->SetItemVisibilityL( EGSLangIdPredictiveOptions,
  1284         iListboxItemArray->SetItemVisibilityL( EGSLangIdPredictiveOptions,
  1284                 CGSListBoxItemTextArray::EVisible );
  1285                 CGSListBoxItemTextArray::EVisible );
       
  1286 #endif //__ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__   
  1285         }
  1287         }
  1286     }
  1288     }
  1287 
  1289 
  1288 void CGSLangContainer::HandleResourceChange( TInt aType )
  1290 void CGSLangContainer::HandleResourceChange( TInt aType )
       
  1291     {
       
  1292     TRAP_IGNORE( HandleResourceChangeL( aType ));
       
  1293     }
       
  1294 
       
  1295 void CGSLangContainer::HandleResourceChangeL( TInt aType )
  1289     {
  1296     {
  1290     CGSBaseContainer::HandleResourceChange(aType);
  1297     CGSBaseContainer::HandleResourceChange(aType);
  1291     TInt keyboardLayout = 0;
  1298     TInt keyboardLayout = 0;
  1292         RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardLayout);
  1299     RProperty::Get(KCRUidAvkon, KAknKeyBoardLayout, keyboardLayout);
  1293         TPtiKeyboardType layout = (TPtiKeyboardType)keyboardLayout;
  1300     TPtiKeyboardType layout = (TPtiKeyboardType)keyboardLayout;
  1294         TBool isPredictionSupport = EFalse;
  1301     TBool isPredictionSupport = EFalse;
  1295         switch(layout)
  1302     switch(layout)
  1296             {
  1303         {
  1297             case EPtiKeyboardHalfQwerty:
  1304         case EPtiKeyboardHalfQwerty:
  1298                 isPredictionSupport = iModel->CheckT9FromPtiLForPredictionL((TPtiEngineInputMode)EPtiEngineHalfQwertyPredictive);
  1305             isPredictionSupport = iModel->CheckT9FromPtiLForPredictionL((TPtiEngineInputMode)EPtiEngineHalfQwertyPredictive);
  1299                 break;
  1306             break;
  1300             case EPtiKeyboardQwerty4x12:
  1307         case EPtiKeyboardQwerty4x12:
  1301             case EPtiKeyboardQwerty4x10:  
  1308         case EPtiKeyboardQwerty4x10:  
  1302             case EPtiKeyboardQwerty3x11:
  1309         case EPtiKeyboardQwerty3x11:
  1303             case EPtiKeyboardCustomQwerty:
  1310         case EPtiKeyboardCustomQwerty:
  1304                 isPredictionSupport = iModel->CheckT9FromPtiLForPredictionL((TPtiEngineInputMode)EPtiEngineQwertyPredictive);
  1311             isPredictionSupport = iModel->CheckT9FromPtiLForPredictionL((TPtiEngineInputMode)EPtiEngineQwertyPredictive);
  1305                 break;
  1312             break;
  1306             case EPtiKeyboardNone:
  1313         case EPtiKeyboardNone:
  1307             case EPtiKeyboard12Key:
  1314         case EPtiKeyboard12Key:
  1308                 // Commenting out the below function call as ITI is not supported for Touch Input.
  1315             // Commenting out the below function call as ITI is not supported for Touch Input.
  1309     #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__
  1316 #ifdef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__
  1310                 //isPredictionSupport = iModel->CheckT9FromPtiLForPredictionL((TPtiEngineInputMode)EPtiEnginePredictive);
  1317             //isPredictionSupport = iModel->CheckT9FromPtiLForPredictionL((TPtiEngineInputMode)EPtiEnginePredictive);
  1311     #else
  1318 #else
  1312                 isPredictionSupport = iModel->CheckT9FromPtiLForPredictionL((TPtiEngineInputMode)EPtiEnginePredictive);
  1319             isPredictionSupport = iModel->CheckT9FromPtiLForPredictionL((TPtiEngineInputMode)EPtiEnginePredictive);
  1313     #endif //__ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__
  1320 #endif //__ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__
  1314                 break;
  1321             break;
  1315             default:
  1322         default:
  1316                 isPredictionSupport = iModel->CheckT9FromPtiLForPredictionL((TPtiEngineInputMode)EPtiEnginePredictive);
  1323             isPredictionSupport = iModel->CheckT9FromPtiLForPredictionL((TPtiEngineInputMode)EPtiEnginePredictive);
  1317                 break;     
  1324             break;     
  1318             }
  1325         }
  1319         if (isPredictionSupport == EFalse)
  1326     if (isPredictionSupport == EFalse)
  1320             {
  1327         {
  1321             iListboxItemArray->SetItemVisibilityL( EGSLangIdPredictiveOptions,
  1328         iListboxItemArray->SetItemVisibilityL( EGSLangIdPredictiveOptions,
  1322                     CGSListBoxItemTextArray::EInvisible );
  1329                 CGSListBoxItemTextArray::EInvisible );
  1323             }
  1330         }
  1324         else
  1331     else
  1325             {
  1332         {
  1326             iListboxItemArray->SetItemVisibilityL( EGSLangIdPredictiveOptions,
  1333 #ifndef __ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__
  1327                     CGSListBoxItemTextArray::EVisible );
  1334         iListboxItemArray->SetItemVisibilityL( EGSLangIdPredictiveOptions,
  1328             }
  1335                 CGSListBoxItemTextArray::EVisible );
  1329         iListBox->HandleItemAdditionL();
  1336 #endif //__ITI_VIRTUAL_TOUCH_FIRST_GENERATION_SUPPORT__   
  1330         MakeT9LItemL();
  1337         }
       
  1338     iListBox->HandleItemAdditionL();
       
  1339     MakeT9LItemL();
  1331     }
  1340     }
  1332 #endif
  1341 #endif
  1333 // End of File
  1342 // End of File