508 { |
508 { |
509 ptrBuffer = (*iInputModeItems)[index]; |
509 ptrBuffer = (*iInputModeItems)[index]; |
510 } |
510 } |
511 |
511 |
512 // Finally, set the dynamic text |
512 // Finally, set the dynamic text |
513 iListboxItemArray->SetDynamicTextL(EGSDefaultChineseOnscreenKeyboard, ptrBuffer); |
513 |
|
514 if( iListboxItemArray != NULL ) |
|
515 { |
|
516 iListboxItemArray->SetDynamicTextL(EGSDefaultChineseOnscreenKeyboard, ptrBuffer); |
|
517 } |
514 CleanupStack::PopAndDestroy(dynamicText); |
518 CleanupStack::PopAndDestroy(dynamicText); |
515 |
519 |
516 // And add to listbox |
520 // And add to listbox |
517 iListboxItemArray->SetItemVisibilityL( |
521 if( iListboxItemArray != NULL ) |
|
522 { |
|
523 iListboxItemArray->SetItemVisibilityL( |
518 EGSDefaultChineseOnscreenKeyboard, |
524 EGSDefaultChineseOnscreenKeyboard, |
519 bVisible ? CGSItemTextArray::EVisible : CGSItemTextArray::EInvisible); |
525 bVisible ? CGSItemTextArray::EVisible : CGSItemTextArray::EInvisible); |
|
526 } |
520 } |
527 } |
521 |
528 |
522 // --------------------------------------------------------- |
529 // --------------------------------------------------------- |
523 // Create listbox writing speed item |
530 // Create listbox writing speed item |
524 // --------------------------------------------------------- |
531 // --------------------------------------------------------- |
748 if (iModel->IsSettingItemAvailable(EGSInputpenIdChineseFindMethod)) |
755 if (iModel->IsSettingItemAvailable(EGSInputpenIdChineseFindMethod)) |
749 { |
756 { |
750 HBufC* dynamicText = HBufC::NewLC(KGSBufSize); |
757 HBufC* dynamicText = HBufC::NewLC(KGSBufSize); |
751 TPtr ptrBuffer(dynamicText->Des()); |
758 TPtr ptrBuffer(dynamicText->Des()); |
752 const TInt chineseFindMethod = iModel->ChineseFindMethod(); |
759 const TInt chineseFindMethod = iModel->ChineseFindMethod(); |
753 |
760 |
754 ptrBuffer = (*iChineseFindMethodItems)[chineseFindMethod]; |
761 if( iChineseFindMethodItems != NULL ) |
755 |
762 { |
756 if (!ptrBuffer.Length() && iChineseFindMethodItems->Count() > 0) |
763 ptrBuffer = (*iChineseFindMethodItems)[chineseFindMethod]; |
|
764 } |
|
765 |
|
766 if ( !ptrBuffer.Length() && iChineseFindMethodItems != NULL && |
|
767 iChineseFindMethodItems->Count() > 0 ) |
757 { |
768 { |
758 ptrBuffer = (*iChineseFindMethodItems)[0]; |
769 ptrBuffer = (*iChineseFindMethodItems)[0]; |
759 } |
770 } |
760 |
771 |
761 // Finally, set the dynamic text |
772 // Finally, set the dynamic text |
1152 // --------------------------------------------------------- |
1163 // --------------------------------------------------------- |
1153 // |
1164 // |
1154 void CGSPenInputContainer::ShowRecognitionWithDictionaryL() |
1165 void CGSPenInputContainer::ShowRecognitionWithDictionaryL() |
1155 { |
1166 { |
1156 TInt currentItem = iModel->RecognitionWithDictionary(); |
1167 TInt currentItem = iModel->RecognitionWithDictionary(); |
1157 |
1168 currentItem = ( 0 == currentItem ) ? 1 : 0; |
1158 if (currentItem == 1) |
1169 iModel->SetRecognitionWithDictionary(currentItem); |
1159 { |
1170 UpdateListBoxL(EGSInputpenIdRecognitionWithDictionary); |
1160 currentItem = 0; |
1171 |
1161 } |
|
1162 else |
|
1163 { |
|
1164 currentItem = 1; |
|
1165 } |
|
1166 |
|
1167 CAknRadioButtonSettingPage* dlg = new (ELeave) CAknRadioButtonSettingPage( |
|
1168 R_GS_RECOGNITIONWITHDICTIONARY_TEXT_SETTING_PAGE, |
|
1169 currentItem, |
|
1170 iRecognitionWithDictionaryItems); |
|
1171 |
|
1172 CleanupStack::PushL(dlg); |
|
1173 |
|
1174 if (dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged)) |
|
1175 { |
|
1176 if(currentItem == iModel->RecognitionWithDictionary()) |
|
1177 { |
|
1178 iModel->SetRecognitionWithDictionary(currentItem == 0? 1:0); |
|
1179 UpdateListBoxL(EGSInputpenIdRecognitionWithDictionary); |
|
1180 } |
|
1181 } |
|
1182 |
|
1183 CleanupStack::Pop(dlg); |
|
1184 } |
1172 } |
1185 |
1173 |
1186 // --------------------------------------------------------- |
1174 // --------------------------------------------------------- |
1187 // Display input method for find setting page |
1175 // Display input method for find setting page |
1188 // --------------------------------------------------------- |
1176 // --------------------------------------------------------- |