application/src/PodcastShowsView.cpp
branchsymbian1
changeset 147 2e626f5a52c8
parent 136 cee38af14bcf
child 156 48cdb40709e7
equal deleted inserted replaced
146:78d1b03a94ff 147:2e626f5a52c8
   335 				case EQueued:
   335 				case EQueued:
   336 					AppUi()->ActivateLocalViewL(KUidPodcastQueueViewID,  TUid::Uid(0), KNullDesC8());
   336 					AppUi()->ActivateLocalViewL(KUidPodcastQueueViewID,  TUid::Uid(0), KNullDesC8());
   337 					((CPodcastAppUi*)AppUi())->SetActiveTab(KTabIdQueue);
   337 					((CPodcastAppUi*)AppUi())->SetActiveTab(KTabIdQueue);
   338 					break;
   338 					break;
   339 				case EDownloaded:
   339 				case EDownloaded:
   340 					iPodcastModel.PlayPausePodcastL(showInfo, ETrue);
   340 					{
       
   341 					TRAPD(err, iPodcastModel.PlayPausePodcastL(showInfo, ETrue));
       
   342 					if (err != KErrNone)
       
   343 						{
       
   344 						HBufC *error = iEikonEnv->AllocReadResourceLC(R_ERROR_PLAYBACK_FAILED);
       
   345 						ShowErrorMessageL(*error);
       
   346 						CleanupStack::PopAndDestroy(error);
       
   347 						}
   341 					UpdateListboxItemsL();
   348 					UpdateListboxItemsL();
       
   349 					}
   342 					break;
   350 					break;
   343 				default:
   351 				default:
   344 					break;
   352 					break;
   345 					}
   353 					}
   346 				}
   354 				}
   571 	{
   579 	{
   572 	switch (aCommand)
   580 	switch (aCommand)
   573 		{
   581 		{
   574 		case EPodcastMarkAsPlayed:
   582 		case EPodcastMarkAsPlayed:
   575 			HandleSetShowPlayedL(ETrue);
   583 			HandleSetShowPlayedL(ETrue);
       
   584 			UpdateListboxItemsL();
   576 			break;
   585 			break;
   577 		case EPodcastMarkAsUnplayed:
   586 		case EPodcastMarkAsUnplayed:
   578 			HandleSetShowPlayedL(EFalse);
   587 			HandleSetShowPlayedL(EFalse);
       
   588 			UpdateListboxItemsL();
   579 			break;
   589 			break;
   580 		case EPodcastMarkAllPlayed:
   590 		case EPodcastMarkAllPlayed:
   581 			iPodcastModel.MarkSelectionPlayedL();
   591 			iPodcastModel.MarkSelectionPlayedL();
   582 			UpdateListboxItemsL();
   592 			UpdateListboxItemsL();
   583 			break;
   593 			break;
   584 		case EPodcastDeleteShow:
   594 		case EPodcastDeleteShow:
   585 			HandleDeleteShowL();
   595 			HandleDeleteShowL();
       
   596 			UpdateListboxItemsL();
   586 			break;
   597 			break;
   587 		case EPodcastDownloadShow:
   598 		case EPodcastDownloadShow:
   588 			{
   599 			{
   589 			TInt index = iListContainer->Listbox()->CurrentItemIndex();
   600 			TInt index = iListContainer->Listbox()->CurrentItemIndex();
   590 			
   601 			
   617 			break;
   628 			break;
   618 		case EPodcastShowInfo:
   629 		case EPodcastShowInfo:
   619 			{
   630 			{
   620 			DisplayShowInfoDialogL();
   631 			DisplayShowInfoDialogL();
   621 			}break;
   632 			}break;
       
   633 		case EPodcastFilterShowsAll:
       
   634 			iPodcastModel.ShowEngine().SetShowFilter(EAllShows);
       
   635 			UpdateListboxItemsL();
       
   636 			break;
       
   637 		case EPodcastFilterShowsDownloaded:
       
   638 			iPodcastModel.ShowEngine().SetShowFilter(EDownloadedShows);
       
   639 			UpdateListboxItemsL();
       
   640 			break;			
       
   641 		case EPodcastFilterShowsNew:
       
   642 			iPodcastModel.ShowEngine().SetShowFilter(ENewShows);
       
   643 			UpdateListboxItemsL();
       
   644 			break;
       
   645 		case EPodcastFilterShowsNewAndDownloaded:
       
   646 			iPodcastModel.ShowEngine().SetShowFilter(ENewAndDownloadedShows);
       
   647 			UpdateListboxItemsL();
       
   648 			break;	
   622 		default:
   649 		default:
   623 			CPodcastListView::HandleCommandL(aCommand);
   650 			CPodcastListView::HandleCommandL(aCommand);
   624 			break;
   651 			break;
   625 		}
   652 		}
   626 	iListContainer->SetLongTapDetectedL(EFalse);
   653 	iListContainer->SetLongTapDetectedL(EFalse);