diff -r 6ceef9a83b1a -r 6defe5d1bd39 textinput/peninputarc/gsplugin/gspeninputplugin/src/gspeninputcontainer.cpp --- a/textinput/peninputarc/gsplugin/gspeninputplugin/src/gspeninputcontainer.cpp Mon Mar 15 12:42:02 2010 +0200 +++ b/textinput/peninputarc/gsplugin/gspeninputplugin/src/gspeninputcontainer.cpp Wed Mar 31 22:08:20 2010 +0300 @@ -510,13 +510,20 @@ } // Finally, set the dynamic text - iListboxItemArray->SetDynamicTextL(EGSDefaultChineseOnscreenKeyboard, ptrBuffer); + + if( iListboxItemArray != NULL ) + { + iListboxItemArray->SetDynamicTextL(EGSDefaultChineseOnscreenKeyboard, ptrBuffer); + } CleanupStack::PopAndDestroy(dynamicText); // And add to listbox - iListboxItemArray->SetItemVisibilityL( + if( iListboxItemArray != NULL ) + { + iListboxItemArray->SetItemVisibilityL( EGSDefaultChineseOnscreenKeyboard, bVisible ? CGSItemTextArray::EVisible : CGSItemTextArray::EInvisible); + } } // --------------------------------------------------------- @@ -750,10 +757,14 @@ HBufC* dynamicText = HBufC::NewLC(KGSBufSize); TPtr ptrBuffer(dynamicText->Des()); const TInt chineseFindMethod = iModel->ChineseFindMethod(); + + if( iChineseFindMethodItems != NULL ) + { + ptrBuffer = (*iChineseFindMethodItems)[chineseFindMethod]; + } - ptrBuffer = (*iChineseFindMethodItems)[chineseFindMethod]; - - if (!ptrBuffer.Length() && iChineseFindMethodItems->Count() > 0) + if ( !ptrBuffer.Length() && iChineseFindMethodItems != NULL && + iChineseFindMethodItems->Count() > 0 ) { ptrBuffer = (*iChineseFindMethodItems)[0]; } @@ -1154,33 +1165,10 @@ void CGSPenInputContainer::ShowRecognitionWithDictionaryL() { TInt currentItem = iModel->RecognitionWithDictionary(); + currentItem = ( 0 == currentItem ) ? 1 : 0; + iModel->SetRecognitionWithDictionary(currentItem); + UpdateListBoxL(EGSInputpenIdRecognitionWithDictionary); - if (currentItem == 1) - { - currentItem = 0; - } - else - { - currentItem = 1; - } - - CAknRadioButtonSettingPage* dlg = new (ELeave) CAknRadioButtonSettingPage( - R_GS_RECOGNITIONWITHDICTIONARY_TEXT_SETTING_PAGE, - currentItem, - iRecognitionWithDictionaryItems); - - CleanupStack::PushL(dlg); - - if (dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged)) - { - if(currentItem == iModel->RecognitionWithDictionary()) - { - iModel->SetRecognitionWithDictionary(currentItem == 0? 1:0); - UpdateListBoxL(EGSInputpenIdRecognitionWithDictionary); - } - } - - CleanupStack::Pop(dlg); } // ---------------------------------------------------------