application/src/PodcastShowsView.cpp
branchRCL_3
changeset 290 0d5e69a7cda9
parent 243 44d205147a83
child 293 b5bd609d3792
equal deleted inserted replaced
286:91d73b84416c 290:0d5e69a7cda9
   630 		TBool updatingState = iPodcastModel.FeedEngine().ClientState() != EIdle && iPodcastModel.FeedEngine().ActiveClientUid() == iPodcastModel.ActiveFeedInfo()->Uid();
   630 		TBool updatingState = iPodcastModel.FeedEngine().ClientState() != EIdle && iPodcastModel.FeedEngine().ActiveClientUid() == iPodcastModel.ActiveFeedInfo()->Uid();
   631 		aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, updatingState);
   631 		aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, updatingState);
   632 
   632 
   633 		TInt index = iListContainer->Listbox()->CurrentItemIndex();
   633 		TInt index = iListContainer->Listbox()->CurrentItemIndex();
   634 		
   634 		
       
   635 		TBool showMarkAllPlayed = EFalse;
       
   636 		for (int i=0;i<iPodcastModel.ActiveShowList().Count();i++)
       
   637 			{
       
   638 			CShowInfo* info = iPodcastModel.ActiveShowList()[i];
       
   639 			if (info->PlayState() == ENeverPlayed)
       
   640 				{
       
   641 				showMarkAllPlayed = ETrue;
       
   642 				break;
       
   643 				}
       
   644 			
       
   645 			}
       
   646 		
   635 		if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
   647 		if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
   636 			{			
   648 			{			
   637 			CShowInfo* info = iPodcastModel.ActiveShowList()[index];
   649 			CShowInfo* info = iPodcastModel.ActiveShowList()[index];
   638 	
   650 	
   639 			TBool hideDownloadShowCmd = info->DownloadState() != ENotDownloaded;
   651 			TBool hideDownloadShowCmd = info->DownloadState() != ENotDownloaded;
   643 			aMenuPane->SetItemDimmed(EPodcastMarkAsPlayed, hideMarkOld);
   655 			aMenuPane->SetItemDimmed(EPodcastMarkAsPlayed, hideMarkOld);
   644 			aMenuPane->SetItemDimmed(EPodcastMarkAsUnplayed, !hideMarkOld);
   656 			aMenuPane->SetItemDimmed(EPodcastMarkAsUnplayed, !hideMarkOld);
   645 						
   657 						
   646 			aMenuPane->SetItemDimmed(EPodcastDownloadShow, hideDownloadShowCmd);
   658 			aMenuPane->SetItemDimmed(EPodcastDownloadShow, hideDownloadShowCmd);
   647 			aMenuPane->SetItemDimmed(EPodcastDeleteShow, hideDeleteShowCmd);
   659 			aMenuPane->SetItemDimmed(EPodcastDeleteShow, hideDeleteShowCmd);
       
   660 			aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, !showMarkAllPlayed);
   648 			}
   661 			}
   649 		}
   662 		}
   650 }
   663 }
   651 	
   664 	
   652 void CPodcastShowsView::DisplayShowInfoDialogL()
   665 void CPodcastShowsView::DisplayShowInfoDialogL()
   682 		toolbar->HideItem(EPodcastCancelUpdateAllFeeds, !updatingState, ETrue );
   695 		toolbar->HideItem(EPodcastCancelUpdateAllFeeds, !updatingState, ETrue );
   683 		// there seems to be drawing bugs in the toolbar if there is only
   696 		// there seems to be drawing bugs in the toolbar if there is only
   684 		// one or two buttons defined in the resource, so we have download
   697 		// one or two buttons defined in the resource, so we have download
   685 		// there but always hidden
   698 		// there but always hidden
   686 		toolbar->HideItem(EPodcastDownloadShow, ETrue, ETrue );
   699 		toolbar->HideItem(EPodcastDownloadShow, ETrue, ETrue );
       
   700 		
       
   701 		TBool showMarkAllPlayed = EFalse;
       
   702 		for (int i=0;i<iPodcastModel.ActiveShowList().Count();i++)
       
   703 			{
       
   704 			CShowInfo* info = iPodcastModel.ActiveShowList()[i];
       
   705 			if (info->PlayState() == ENeverPlayed)
       
   706 				{
       
   707 				showMarkAllPlayed = ETrue;
       
   708 				break;
       
   709 				}
       
   710 			
       
   711 			}
       
   712 		toolbar->SetItemDimmed(EPodcastMarkAllPlayed, !showMarkAllPlayed, ETrue);
   687 	}
   713 	}
   688 }
   714 }
   689 
   715 
   690 void CPodcastShowsView::HandleSetShowPlayedL(TBool aPlayed)
   716 void CPodcastShowsView::HandleSetShowPlayedL(TBool aPlayed)
   691 	{
   717 	{