application/src/PodcastQueueView.cpp
branch3rded
changeset 177 269e3f3e544a
parent 175 cd124c4eb6b9
child 186 32aedca70582
--- a/application/src/PodcastQueueView.cpp	Sat Jul 10 13:35:21 2010 +0100
+++ b/application/src/PodcastQueueView.cpp	Sun Jul 11 11:36:24 2010 +0100
@@ -67,8 +67,6 @@
 	iPodcastModel.FeedEngine().AddObserver(this);
 	iPodcastModel.ShowEngine().AddObserver(this);
 	
-	CleanupStack::PopAndDestroy();
-
 	SetEmptyTextL(R_PODCAST_EMPTY_QUEUE);
 	}
 
@@ -310,8 +308,21 @@
 	
 void CPodcastQueueView::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
 	{
-	if(aResourceId == R_PODCAST_SHOWSVIEW_MENU)
+	if(aResourceId == R_QUEUE_SHOW_MENU)
 		{
-		aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, ETrue);
+		TBool dimDown = (iListContainer->Listbox()->CurrentItemIndex() >= iPodcastModel.ActiveShowList().Count() - 1 ?
+				ETrue : EFalse);
+		TBool dimUp = (iListContainer->Listbox()->CurrentItemIndex() <= 0 ?
+				ETrue : EFalse);
+		
+		aMenuPane->SetItemDimmed(EPodcastMoveDownloadDown, dimDown);
+		aMenuPane->SetItemDimmed(EPodcastMoveDownloadUp, dimUp);
+		}
+	else if (aResourceId == R_PODCAST_QUEUEVIEW_MENU)
+		{
+		aMenuPane->SetItemDimmed(EPodcastQueueShowMenu, iPodcastModel.ActiveShowList().Count() == 0);
+		aMenuPane->SetItemDimmed(EPodcastRemoveAllDownloads, iPodcastModel.ActiveShowList().Count() == 0);
+		aMenuPane->SetItemDimmed(EPodcastSuspendDownloads, iPodcastModel.SettingsEngine().DownloadSuspended());
+		aMenuPane->SetItemDimmed(EPodcastResumeDownloads, !iPodcastModel.SettingsEngine().DownloadSuspended());				
 		}
 	}