diff -r f5911524345e -r 78867dafe7eb uiservicetab/vimpstui/src/cvimpstuisinglelistboxtabviewcontrol.cpp --- a/uiservicetab/vimpstui/src/cvimpstuisinglelistboxtabviewcontrol.cpp Fri Feb 19 22:41:11 2010 +0200 +++ b/uiservicetab/vimpstui/src/cvimpstuisinglelistboxtabviewcontrol.cpp Fri Mar 12 15:41:33 2010 +0200 @@ -31,7 +31,7 @@ #include "mvimpstengine.h" #include "cvimpststoragemanagerfactory.h" #include "mvimpststorageserviceview.h" - +#include "vimpstdebugtrace.h" // system include #include #include @@ -113,22 +113,34 @@ (CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto); // set marquee on iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue ); - CVIMPSTUiSingleListboxArray* friendsArray = CVIMPSTUiSingleListboxArray::NewL( iArrayProcess, - iListBox->ItemDrawer()->ColumnData(), - *iListBox ); - // now set the array - iListBox->Model()->SetItemTextArray(friendsArray ); + // If engine is uninstalled, do not construct the list view. + // Display empty message + if (iEngine.IsUnInstalled()) + { + SetListEmptyTextL( R_QTN_SERVTAB_SWUPDATE_RESTART ); + return; + } + else + { + // Construction of the listbox view. Engine is not uninstalled. + CVIMPSTUiSingleListboxArray* friendsArray = + CVIMPSTUiSingleListboxArray::NewL(iArrayProcess, + iListBox->ItemDrawer()->ColumnData(), *iListBox); + // now set the array + iListBox->Model()->SetItemTextArray(friendsArray); + + iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray); + // if there is any contact other than owndata , show findpane + if (iListBox->Model()->NumberOfItems() > KMinContact) + { + // Create find-pane + ActivateFindPaneL(); + } + LoadBitmapsL(); + SetCbaLockL(EFalse); + } + - iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray); - // if there is any contact other than owndata , show findpane - if( iListBox->Model()->NumberOfItems() > KMinContact) - { - // Create find-pane - ActivateFindPaneL(); - } - LoadBitmapsL(); - - SetCbaLockL( EFalse ); } @@ -504,9 +516,16 @@ // void CVIMPSTUiSingleListBoxTabViewControl::SetListEmptyTextL(TInt aResourceId) { - HBufC* emptyText = iCoeEnv->AllocReadResourceLC(aResourceId); - iListBox->View()->SetListEmptyTextL(*emptyText); - CleanupStack::PopAndDestroy(emptyText); + HBufC* msgText; + TRACE( T_LIT("CVIMPSTUiSingleListBoxTabViewControl:SetListEmptyTextL:Start")); + // Get Service Name from Engine , load string from resource and display. + // This text is shown to tell the user to restart phone to get the service again. + TPtrC serviceNamePtr(iEngine.ServiceName()); + msgText = StringLoader::LoadLC(aResourceId, serviceNamePtr, iCoeEnv); + iListBox->View()->SetListEmptyTextL(*msgText); + TRACE( T_LIT("Display Text %S"), msgText ); + TRACE( T_LIT("CVIMPSTUiSingleListBoxTabViewControl:SetListEmptyTextL:End")); + CleanupStack::PopAndDestroy(msgText); } // ---------------------------------------------------------