Added selective availability of the mark all played command symbian1
authorSebastian Brannstrom <sebastianb@symbian.org>
Mon, 25 Oct 2010 14:03:39 +0100
branchsymbian1
changeset 288 757e84a30b9a
parent 287 e6a88732eb8f
child 289 ba99740139d0
Added selective availability of the mark all played command
application/src/PodcastShowsView.cpp
--- a/application/src/PodcastShowsView.cpp	Mon Oct 25 14:03:07 2010 +0100
+++ b/application/src/PodcastShowsView.cpp	Mon Oct 25 14:03:39 2010 +0100
@@ -653,8 +653,22 @@
 {
 	if(aResourceId == R_PODCAST_SHOWSVIEW_MENU)
 		{
+		TBool showMarkAllPlayed = EFalse;
+		for (int i=0;i<iPodcastModel.ActiveShowList().Count();i++)
+			{
+			CShowInfo* info = iPodcastModel.ActiveShowList()[i];
+			if (info->PlayState() == ENeverPlayed)
+				{
+				showMarkAllPlayed = ETrue;
+				break;
+				}
+			
+			}
+		
 		TBool updatingState = iPodcastModel.FeedEngine().ClientState() != EIdle && iPodcastModel.FeedEngine().ActiveClientUid() == iPodcastModel.ActiveFeedInfo()->Uid();
-		aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, updatingState);
+		aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, updatingState || !showMarkAllPlayed);
+
+			
 		}
 }