notes/notesui/notesviews/src/notestodoview.cpp
changeset 50 579cc610882e
parent 26 a949c2543c15
child 58 ef813d54df51
--- a/notes/notesui/notesviews/src/notestodoview.cpp	Wed Jun 23 18:11:28 2010 +0300
+++ b/notes/notesui/notesviews/src/notestodoview.cpp	Tue Jul 06 14:14:56 2010 +0300
@@ -115,7 +115,11 @@
 			SIGNAL(longPressed(HbAbstractViewItem *, const QPointF &)),
 			this,
 			SLOT(handleItemLongPressed(HbAbstractViewItem *, const QPointF &)));
-
+	
+	// Get the empty list string.
+	mEmptyListLabel = static_cast<HbLabel *> (
+			mDocLoader->findWidget("emptyListLabel"));
+	
 	// Get the toolbar/menu actions.
 	mAddTodoAction = static_cast<HbAction *> (
 			mDocLoader->findObject("newTodoAction"));
@@ -131,8 +135,7 @@
 
 	mViewCollectionAction = static_cast<HbAction *> (
 			mDocLoader->findObject("displayCollectionsAction"));
-	mViewCollectionAction->setCheckable(true);
-	mViewCollectionAction->setChecked(true);
+	
 	connect(
 			mViewCollectionAction, SIGNAL(changed()),
 			this, SLOT(handleActionStateChanged()));
@@ -439,6 +442,14 @@
 		AgendaUtil::IncludeIncompletedTodos);
 	mSubTitle->setHeading(
 			hbTrId("txt_notes_subhead_todos_ln_pending",entries.count()));
+	
+	if (0 >= entries.count()) {
+		mEmptyListLabel->show();
+		mListView->hide();
+	} else {
+		mEmptyListLabel->hide();
+		mListView->show();
+	}
 }
 
 /*