textinput/GSLangPlugin/src/GSLangPlugin.cpp
branchRCL_3
changeset 7 6defe5d1bd39
parent 0 eb1f2e154e89
child 8 4eb1ae11334f
equal deleted inserted replaced
6:6ceef9a83b1a 7:6defe5d1bd39
   732             Container()->UpdateListBoxL( EGSLangIdITL );
   732             Container()->UpdateListBoxL( EGSLangIdITL );
   733             Container()->UpdateListBoxL( EGSLangIdT9L );
   733             Container()->UpdateListBoxL( EGSLangIdT9L );
   734             Container()->UpdateListBoxL( EGSLangIdPredictiveMode );
   734             Container()->UpdateListBoxL( EGSLangIdPredictiveMode );
   735             }
   735             }
   736         TInt current = Container()->Model()->LanguageL( CGSLangModel::EGSInputLanguage );
   736         TInt current = Container()->Model()->LanguageL( CGSLangModel::EGSInputLanguage );
       
   737         
   737         if ( ( (current == ELangPrcChinese || current == ELangHongKongChinese
   738         if ( ( (current == ELangPrcChinese || current == ELangHongKongChinese
   738             || current == ELangTaiwanChinese) && previous != current)
   739             || current == ELangTaiwanChinese) && previous != current)
   739             || ( (current != ELangPrcChinese || current != ELangHongKongChinese
   740             || ( (current != ELangPrcChinese || current != ELangHongKongChinese ) 
   740             || current != ELangTaiwanChinese) && previous != current) )
   741                  && previous != current) )
   741             {
   742             {
   742             if (current == ELangPrcChinese )
   743             if (current == ELangPrcChinese )
   743                 {
   744                 {
   744                 Container()->Model()->SetDefaultInputMethodL( EPinyin );
   745                 Container()->Model()->SetDefaultInputMethodL( EPinyin );
   745                 }
   746                 }
   951 
   952 
   952     // Execute the setting page and check if the setting value was changed:
   953     // Execute the setting page and check if the setting value was changed:
   953     if (dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged))
   954     if (dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged))
   954         {
   955         {
   955         TInt newInputMethodCode=EPinyin;
   956         TInt newInputMethodCode=EPinyin;
   956 
   957         
   957         for (TInt j = 0; j < KGSMapSize; j++)
   958         for (TInt j = 0; j < itemsNum && j < KGSMapSize; j++)
   958             {
   959             {
   959             TInt val = 0;
   960             TInt val = 0;
   960             if ( lang == ELangPrcChinese )      { val = methodMap[j].index0; }
   961             if ( lang == ELangPrcChinese )      { val = methodMap[j].index0; }
   961             if ( lang == ELangHongKongChinese ) { val = methodMap[j].index1; }
   962             if ( lang == ELangHongKongChinese ) { val = methodMap[j].index1; }
   962             if ( lang == ELangTaiwanChinese )   { val = methodMap[j].index2; }
   963             if ( lang == ELangTaiwanChinese )   { val = methodMap[j].index2; }