# HG changeset patch # User Sebastian Brannstrom # Date 1288011872 -3600 # Node ID 655dbce90b7086f39a2995b59c2e459d4082ebea # Parent 2f62fe179bbba9e16f1a78ff33018b9fa39f2e55 Added check and query when downloading is active while trying to exit diff -r 2f62fe179bbb -r 655dbce90b70 application/inc/PodcastFeedView.h --- a/application/inc/PodcastFeedView.h Mon Oct 25 14:03:07 2010 +0100 +++ b/application/inc/PodcastFeedView.h Mon Oct 25 14:04:32 2010 +0100 @@ -42,7 +42,9 @@ void CheckResumeDownloadL(); void UpdateToolbar(TBool aVisible=ETrue); TBool ViewingShows(); - + + void CheckConfirmExit(); + protected: void ConstructL(); CPodcastFeedView(CPodcastModel& aPodcastModel); @@ -110,7 +112,7 @@ void HandleUpdateFeedL(); void GetFeedErrorText(TDes &aErrorMessage, TInt aErrorCode); void OpmlParsingCompleteL(TInt aError, TUint aNumFeedsImported); - + private: CPodcastModel& iPodcastModel; TBool iUpdatingRunning; diff -r 2f62fe179bbb -r 655dbce90b70 application/src/PodcastAppui.cpp --- a/application/src/PodcastAppui.cpp Mon Oct 25 14:03:07 2010 +0100 +++ b/application/src/PodcastAppui.cpp Mon Oct 25 14:04:32 2010 +0100 @@ -124,7 +124,7 @@ { case EAknSoftkeyExit: { - Exit(); + iFeedView->CheckConfirmExit(); break; } case EEikCmdExit: diff -r 2f62fe179bbb -r 655dbce90b70 application/src/PodcastFeedView.cpp --- a/application/src/PodcastFeedView.cpp Mon Oct 25 14:03:07 2010 +0100 +++ b/application/src/PodcastFeedView.cpp Mon Oct 25 14:04:32 2010 +0100 @@ -873,6 +873,25 @@ showsDownloading.ResetAndDestroy(); } +void CPodcastFeedView::CheckConfirmExit() + { + RShowInfoArray showsDownloading; + iPodcastModel.ShowEngine().GetShowsDownloadingL(showsDownloading); + + if (showsDownloading.Count() > 0 && !iPodcastModel.SettingsEngine().DownloadSuspended()) + { + TBuf<256> msg; + iEikonEnv->ReadResourceL(msg, R_EXIT_SHOWS_DOWNLOADING); + + if (!ShowQueryMessageL(msg)) + { + return; + } + } + + AppUi()->Exit(); + } + void CPodcastFeedView::OpmlParsingComplete(TInt aError, TUint aNumFeedsImported) { TRAP_IGNORE(OpmlParsingCompleteL(aError, aNumFeedsImported));