idlefw/plugins/mcsplugin/settings/src/mcspluginsettingscontainer.cpp
branchRCL_3
changeset 18 bd874ee5e5e2
parent 9 d0529222e3f0
child 51 15e4dd19031c
--- a/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingscontainer.cpp	Fri Feb 19 23:07:29 2010 +0200
+++ b/idlefw/plugins/mcsplugin/settings/src/mcspluginsettingscontainer.cpp	Fri Mar 12 15:43:54 2010 +0200
@@ -333,13 +333,18 @@
 //
 void CMCSPluginSettingsContainer::ConstructListBoxL(TInt /*aResLbxId*/)
 {
-    iListBox->ConstructL(this, EAknListBoxSelectionList);
-
+	iListBox->ConstructL(this, EAknListBoxSelectionList);
     // Set empty listbox's text.
-    HBufC* text = iCoeEnv->AllocReadResourceLC(R_AI_MCS_SETTINGS_TXT_ALL_FIXED);
-    iListBox->View()->SetListEmptyTextL(*text);
-    CleanupStack::PopAndDestroy(text);
-
+	if (iModel->MdcaCount() == 0)
+		{
+		HBufC* text = iCoeEnv->AllocReadResourceLC(R_AI_MCS_SETTINGS_TXT_ALL_FIXED);
+		iListBox->View()->SetListEmptyTextL(*text);
+		CleanupStack::PopAndDestroy(text);
+		}
+	else
+		{
+		 iListBox->View()->SetListEmptyTextL(KNullDesC);  
+		}
     iListBox->Model()->SetItemTextArray(iModel);
     iListBox->Model()->SetOwnershipType(ELbmDoesNotOwnItemArray);
 }