527 case EPodcastRemoveDownload: |
527 case EPodcastRemoveDownload: |
528 { |
528 { |
529 TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
529 TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
530 if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
530 if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
531 { |
531 { |
532 iEatQueueUpdate = ETrue; |
532 TRAP_IGNORE(iPodcastModel.ShowEngine().RemoveDownloadL(iPodcastModel.ActiveShowList()[index]->Uid())); |
533 TRAPD(err, iPodcastModel.ShowEngine().RemoveDownloadL(iPodcastModel.ActiveShowList()[index]->Uid())); |
|
534 |
|
535 if (err == KErrNone) |
|
536 { |
|
537 iItemArray->Delete(index); |
|
538 iItemIdArray.Remove(index); |
|
539 iListContainer->Listbox()->HandleItemRemovalL(); |
|
540 iListContainer->Listbox()->SetCurrentItemIndex(index - 1 > 0 ? index - 1 : 0); |
|
541 iListContainer->Listbox()->DrawNow(); |
|
542 } |
|
543 iEatQueueUpdate = EFalse; |
|
544 } |
533 } |
545 } |
534 } |
546 break; |
535 break; |
547 case EPodcastSuspendDownloads: |
536 case EPodcastSuspendDownloads: |
548 { |
537 { |
584 } |
573 } |
585 toolbar->HideItem(EPodcastRemoveAllDownloads, EFalse, ETrue); |
574 toolbar->HideItem(EPodcastRemoveAllDownloads, EFalse, ETrue); |
586 toolbar->SetItemDimmed(EPodcastRemoveAllDownloads, itemCnt == 0, ETrue); |
575 toolbar->SetItemDimmed(EPodcastRemoveAllDownloads, itemCnt == 0, ETrue); |
587 toolbar->HideItem(EPodcastSuspendDownloads,iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue); |
576 toolbar->HideItem(EPodcastSuspendDownloads,iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue); |
588 toolbar->HideItem(EPodcastResumeDownloads,!iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue); |
577 toolbar->HideItem(EPodcastResumeDownloads,!iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue); |
589 #ifdef SYMBIAN1_UI |
|
590 toolbar->HideItem(EPodcastRemoveDownload, EFalse, ETrue); |
|
591 toolbar->SetItemDimmed(EPodcastRemoveDownload, itemCnt == 0, ETrue); |
578 toolbar->SetItemDimmed(EPodcastRemoveDownload, itemCnt == 0, ETrue); |
592 #endif |
|
593 } |
579 } |
594 } |
580 } |
595 |
581 |
596 void CPodcastQueueView::DownloadQueueUpdatedL(TInt /*aDownloadingShows*/, TInt /*aQueuedShows*/) |
582 void CPodcastQueueView::DownloadQueueUpdatedL(TInt /*aDownloadingShows*/, TInt /*aQueuedShows*/) |
597 { |
583 { |
598 if (!iEatQueueUpdate) |
|
599 UpdateListboxItemsL(); |
584 UpdateListboxItemsL(); |
600 } |
585 } |
601 |
586 |
602 void CPodcastQueueView::FeedUpdateAllCompleteL(TFeedState /*aState*/) |
587 void CPodcastQueueView::FeedUpdateAllCompleteL(TFeedState /*aState*/) |
603 { |
588 { |