# HG changeset patch # User Sebastian Brannstrom # Date 1288307555 -3600 # Node ID cf14797d002320a4b55233bf914ab6b86e6a0dac # Parent f5af16df242577c68c1024d17661ba8a3ffd28d1 Fix for broken check for active downloads when exiting diff -r f5af16df2425 -r cf14797d0023 application/inc/PodcastListView.h --- a/application/inc/PodcastListView.h Thu Oct 28 23:32:49 2010 +0100 +++ b/application/inc/PodcastListView.h Fri Oct 29 00:12:35 2010 +0100 @@ -117,7 +117,7 @@ * Default implementation is empty. * @param aCommand ID of the command to respond to. */ - void HandleCommandL(TInt aCommand); + virtual void HandleCommandL(TInt aCommand); void OfferToolbarEventL(TInt aCommand); void DynInitToolbarL (TInt aResourceId, CAknToolbar *aToolbar); diff -r f5af16df2425 -r cf14797d0023 application/src/PodcastAppui.cpp --- a/application/src/PodcastAppui.cpp Thu Oct 28 23:32:49 2010 +0100 +++ b/application/src/PodcastAppui.cpp Fri Oct 29 00:12:35 2010 +0100 @@ -143,11 +143,13 @@ const TUid KUidFastSwapS3 = { 0x20016BF0 }; if (activeAppUid == KUidFastSwapS3) { + DP("Exit called by task manager"); // closed by task manager Exit(); } else { + DP("Red button pressed, going into background"); // red button pressed TApaTask task(iEikonEnv->WsSession()); task.SetWgId(iEikonEnv->RootWin().Identifier()); diff -r f5af16df2425 -r cf14797d0023 application/src/PodcastFeedView.cpp --- a/application/src/PodcastFeedView.cpp Thu Oct 28 23:32:49 2010 +0100 +++ b/application/src/PodcastFeedView.cpp Fri Oct 29 00:12:35 2010 +0100 @@ -509,31 +509,6 @@ iPodcastModel.FeedEngine().CancelUpdateAllFeeds(); } }break; - case EAknSoftkeyExit: - { - RShowInfoArray dlQueue; - iPodcastModel.ShowEngine().GetShowsDownloadingL(dlQueue); - TUint queueCount = dlQueue.Count(); - dlQueue.ResetAndDestroy(); - dlQueue.Close(); - - if (queueCount > 0 && !iPodcastModel.SettingsEngine().DownloadSuspended()) - { - TBuf message; - iEikonEnv->ReadResourceL(message, R_EXIT_SHOWS_DOWNLOADING); - if(ShowQueryMessageL(message)) - { - // pass it on to AppUi, which will exit for us - CPodcastListView::HandleCommandL(aCommand); - } - } - else - { - // nothing in queue, or downloading suspended - CPodcastListView::HandleCommandL(aCommand); - } - } - break; default: CPodcastListView::HandleCommandL(aCommand); break; @@ -876,10 +851,14 @@ void CPodcastFeedView::CheckConfirmExit() { + DP("CPodcastFeedView::CheckConfirmExit"); RShowInfoArray showsDownloading; iPodcastModel.ShowEngine().GetShowsDownloadingL(showsDownloading); + TUint count = showsDownloading.Count(); + showsDownloading.ResetAndDestroy(); + showsDownloading.Close(); - if (showsDownloading.Count() > 0 && !iPodcastModel.SettingsEngine().DownloadSuspended()) + if (count > 0 && !iPodcastModel.SettingsEngine().DownloadSuspended()) { TBuf<256> msg; iEikonEnv->ReadResourceL(msg, R_EXIT_SHOWS_DOWNLOADING); @@ -947,6 +926,7 @@ } else { + iToolbar->SetToolbarVisibility(EFalse); AppUi()->ActivateLocalViewL(KUidPodcastSearchViewID, TUid::Uid(0), KNullDesC8()); } iOpmlState = EOpmlIdle;