textinput/peninputarc/gsplugin/gspeninputplugin/src/gspeninputcontainer.cpp
changeset 13 3b79bedfdc20
parent 0 eb1f2e154e89
equal deleted inserted replaced
0:eb1f2e154e89 13:3b79bedfdc20
   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     iListboxItemArray->SetItemVisibilityL(
   518             EGSDefaultChineseOnscreenKeyboard, 
   522             EGSDefaultChineseOnscreenKeyboard, 
   748     if (iModel->IsSettingItemAvailable(EGSInputpenIdChineseFindMethod))
   752     if (iModel->IsSettingItemAvailable(EGSInputpenIdChineseFindMethod))
   749         {
   753         {
   750         HBufC* dynamicText = HBufC::NewLC(KGSBufSize);
   754         HBufC* dynamicText = HBufC::NewLC(KGSBufSize);
   751         TPtr ptrBuffer(dynamicText->Des());
   755         TPtr ptrBuffer(dynamicText->Des());
   752         const TInt chineseFindMethod = iModel->ChineseFindMethod();
   756         const TInt chineseFindMethod = iModel->ChineseFindMethod();
   753 
   757         
   754         ptrBuffer = (*iChineseFindMethodItems)[chineseFindMethod];
   758         if( iChineseFindMethodItems != NULL )
       
   759             {
       
   760             ptrBuffer = (*iChineseFindMethodItems)[chineseFindMethod];
       
   761             }
   755 
   762 
   756         if (!ptrBuffer.Length() && iChineseFindMethodItems->Count() > 0)
   763         if (!ptrBuffer.Length() && iChineseFindMethodItems->Count() > 0)
   757             {
   764             {
   758             ptrBuffer = (*iChineseFindMethodItems)[0];
   765             ptrBuffer = (*iChineseFindMethodItems)[0];
   759             }
   766             }