application/src/PodcastQueueView.cpp
branch3rded
changeset 177 269e3f3e544a
parent 175 cd124c4eb6b9
child 186 32aedca70582
equal deleted inserted replaced
176:1c8b56cb6409 177:269e3f3e544a
    65 	iListContainer->Listbox()->SetListBoxObserver(this);
    65 	iListContainer->Listbox()->SetListBoxObserver(this);
    66 	
    66 	
    67 	iPodcastModel.FeedEngine().AddObserver(this);
    67 	iPodcastModel.FeedEngine().AddObserver(this);
    68 	iPodcastModel.ShowEngine().AddObserver(this);
    68 	iPodcastModel.ShowEngine().AddObserver(this);
    69 	
    69 	
    70 	CleanupStack::PopAndDestroy();
       
    71 
       
    72 	SetEmptyTextL(R_PODCAST_EMPTY_QUEUE);
    70 	SetEmptyTextL(R_PODCAST_EMPTY_QUEUE);
    73 	}
    71 	}
    74 
    72 
    75 TKeyResponse CPodcastQueueView::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
    73 TKeyResponse CPodcastQueueView::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
    76 	{
    74 	{
   308 		}
   306 		}
   309 	}
   307 	}
   310 	
   308 	
   311 void CPodcastQueueView::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
   309 void CPodcastQueueView::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
   312 	{
   310 	{
   313 	if(aResourceId == R_PODCAST_SHOWSVIEW_MENU)
   311 	if(aResourceId == R_QUEUE_SHOW_MENU)
   314 		{
   312 		{
   315 		aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, ETrue);
   313 		TBool dimDown = (iListContainer->Listbox()->CurrentItemIndex() >= iPodcastModel.ActiveShowList().Count() - 1 ?
   316 		}
   314 				ETrue : EFalse);
   317 	}
   315 		TBool dimUp = (iListContainer->Listbox()->CurrentItemIndex() <= 0 ?
       
   316 				ETrue : EFalse);
       
   317 		
       
   318 		aMenuPane->SetItemDimmed(EPodcastMoveDownloadDown, dimDown);
       
   319 		aMenuPane->SetItemDimmed(EPodcastMoveDownloadUp, dimUp);
       
   320 		}
       
   321 	else if (aResourceId == R_PODCAST_QUEUEVIEW_MENU)
       
   322 		{
       
   323 		aMenuPane->SetItemDimmed(EPodcastQueueShowMenu, iPodcastModel.ActiveShowList().Count() == 0);
       
   324 		aMenuPane->SetItemDimmed(EPodcastRemoveAllDownloads, iPodcastModel.ActiveShowList().Count() == 0);
       
   325 		aMenuPane->SetItemDimmed(EPodcastSuspendDownloads, iPodcastModel.SettingsEngine().DownloadSuspended());
       
   326 		aMenuPane->SetItemDimmed(EPodcastResumeDownloads, !iPodcastModel.SettingsEngine().DownloadSuspended());				
       
   327 		}
       
   328 	}