--- a/application/src/PodcastShowsView.cpp Thu Mar 04 19:46:25 2010 +0000
+++ b/application/src/PodcastShowsView.cpp Thu Mar 04 22:06:39 2010 +0000
@@ -245,9 +245,23 @@
}
}
-void CPodcastShowsView::ShowDownloadFinishedL(TUint /*aShowUid*/, TInt aError)
+void CPodcastShowsView::ShowDownloadFinishedL(TUint aShowUid, TInt aError)
{
iProgressAdded = EFalse;
+ CShowInfo *info = NULL;
+ RShowInfoArray &fItems = iPodcastModel.ActiveShowList();
+
+ for (TInt i=0;i<fItems.Count();i++)
+ {
+ if (fItems[i]->Uid() == aShowUid)
+ {
+ info = fItems[i];
+ }
+ }
+
+ if (info == NULL) {
+ return;
+ }
switch(aError)
{
@@ -336,40 +350,32 @@
void CPodcastShowsView::GetShowIcons(CShowInfo* aShowInfo, TInt& aIconIndex)
{
TBool dlStop = iPodcastModel.SettingsEngine().DownloadSuspended();
- TUint showDownloadingUid = iPodcastModel.ShowEngine().ShowDownloading() ? iPodcastModel.ShowEngine().ShowDownloading()->Uid() : 0;
-
- if (showDownloadingUid == aShowInfo->Uid())
- {
- aIconIndex = dlStop ? ESuspendedShowIcon : EDownloadingShowIcon;
- }
- else
+
+ switch (aShowInfo->DownloadState())
{
- switch (aShowInfo->DownloadState())
- {
- case EDownloaded:
- if (aShowInfo->PlayState() == ENeverPlayed) {
- aIconIndex = EDownloadedNewShowIcon;
- } else {
- aIconIndex = EDownloadedShowIcon;
- }
- break;
- case ENotDownloaded:
- if (aShowInfo->PlayState() == ENeverPlayed) {
- aIconIndex = ENewShowIcon;
- } else {
- aIconIndex = EShowIcon;
- }
- break;
- case EQueued:
- aIconIndex = dlStop ? ESuspendedShowIcon : EQuedShowIcon;
- break;
- case EDownloading:
- aIconIndex = dlStop ? ESuspendedShowIcon : EDownloadingShowIcon;
- break;
- case EFailedDownload:
- aIconIndex = EFailedShowIcon;
- break;
+ case EDownloaded:
+ if (aShowInfo->PlayState() == ENeverPlayed) {
+ aIconIndex = EDownloadedNewShowIcon;
+ } else {
+ aIconIndex = EDownloadedShowIcon;
}
+ break;
+ case ENotDownloaded:
+ if (aShowInfo->PlayState() == ENeverPlayed) {
+ aIconIndex = ENewShowIcon;
+ } else {
+ aIconIndex = EShowIcon;
+ }
+ break;
+ case EQueued:
+ aIconIndex = dlStop ? ESuspendedShowIcon : EQuedShowIcon;
+ break;
+ case EDownloading:
+ aIconIndex = dlStop ? ESuspendedShowIcon : EDownloadingShowIcon;
+ break;
+ case EFailedDownload:
+ aIconIndex = EFailedShowIcon;
+ break;
}
}
@@ -509,7 +515,7 @@
if (allUidsMatch && len > 0)
{
for (TInt loop = 0; loop< len; loop++)
- {
+ {
UpdateShowItemDataL(fItems[loop], loop);
}
iListContainer->Listbox()->DrawNow();
@@ -814,6 +820,7 @@
void CPodcastShowsView::DownloadQueueUpdatedL(TInt aDownloadingShows, TInt aQueuedShows)
{
((CPodcastAppUi*)AppUi())->UpdateQueueTab(aDownloadingShows+aQueuedShows);
+ UpdateListboxItemsL();
}
void CPodcastShowsView::FeedUpdateAllCompleteL(TFeedState /*aState*/)