application/src/PodcastShowsView.cpp
branchRCL_3
changeset 290 0d5e69a7cda9
parent 243 44d205147a83
child 293 b5bd609d3792
--- a/application/src/PodcastShowsView.cpp	Mon Oct 25 10:19:55 2010 +0100
+++ b/application/src/PodcastShowsView.cpp	Mon Oct 25 13:58:51 2010 +0100
@@ -632,6 +632,18 @@
 
 		TInt index = iListContainer->Listbox()->CurrentItemIndex();
 		
+		TBool showMarkAllPlayed = EFalse;
+		for (int i=0;i<iPodcastModel.ActiveShowList().Count();i++)
+			{
+			CShowInfo* info = iPodcastModel.ActiveShowList()[i];
+			if (info->PlayState() == ENeverPlayed)
+				{
+				showMarkAllPlayed = ETrue;
+				break;
+				}
+			
+			}
+		
 		if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
 			{			
 			CShowInfo* info = iPodcastModel.ActiveShowList()[index];
@@ -645,6 +657,7 @@
 						
 			aMenuPane->SetItemDimmed(EPodcastDownloadShow, hideDownloadShowCmd);
 			aMenuPane->SetItemDimmed(EPodcastDeleteShow, hideDeleteShowCmd);
+			aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, !showMarkAllPlayed);
 			}
 		}
 }
@@ -684,6 +697,19 @@
 		// one or two buttons defined in the resource, so we have download
 		// there but always hidden
 		toolbar->HideItem(EPodcastDownloadShow, ETrue, ETrue );
+		
+		TBool showMarkAllPlayed = EFalse;
+		for (int i=0;i<iPodcastModel.ActiveShowList().Count();i++)
+			{
+			CShowInfo* info = iPodcastModel.ActiveShowList()[i];
+			if (info->PlayState() == ENeverPlayed)
+				{
+				showMarkAllPlayed = ETrue;
+				break;
+				}
+			
+			}
+		toolbar->SetItemDimmed(EPodcastMarkAllPlayed, !showMarkAllPlayed, ETrue);
 	}
 }