# HG changeset patch # User teknolog # Date 1278083055 -3600 # Node ID 1d3315159ef589669c3071e071f4f3ff1cee6a54 # Parent 3402b2e2a66ad44161d7ff25cb9f28e2a08aef46 Fix for bug 3051 - search wait dialog doesn't close if search fails; some extra debugging output added diff -r 3402b2e2a66a -r 1d3315159ef5 application/src/PodcastFeedView.cpp --- a/application/src/PodcastFeedView.cpp Mon Jun 21 20:37:38 2010 +0100 +++ b/application/src/PodcastFeedView.cpp Fri Jul 02 16:04:15 2010 +0100 @@ -421,6 +421,7 @@ void CPodcastFeedView::UpdateListboxItemsL() { + DP("CPodcastFeedView::UpdateListboxItemsL BEGIN"); // No reason to do any work if it isn't going to show.. if(!iListContainer->IsVisible()) { @@ -466,7 +467,8 @@ itemProps.SetHiddenSelection(ETrue); iListContainer->Listbox()->ItemDrawer()->SetPropertiesL(0, itemProps); } - iListContainer->Listbox()->HandleItemAdditionL(); + iListContainer->Listbox()->HandleItemAdditionL(); + DP("CPodcastFeedView::UpdateListboxItemsL END"); } /** @@ -476,7 +478,8 @@ */ void CPodcastFeedView::HandleCommandL(TInt aCommand) { - //CloseToolbarExtension(); + DP("CPodcastFeedView::HandleCommandL BEGIN"); + switch(aCommand) { case EPodcastHide: @@ -548,10 +551,12 @@ iListContainer->SetLongTapDetectedL(EFalse); // in case we got here by long tapping UpdateToolbar(); + DP("CPodcastFeedView::HandleCommandL END"); } void CPodcastFeedView::UpdateToolbar(TBool aVisible) { + DP("CPodcastFeedView::UpdateToolbar BEGIN"); CAknToolbar* toolbar = Toolbar(); if (toolbar) @@ -564,6 +569,7 @@ toolbar->SetItemDimmed(EPodcastAddFeed, iUpdatingAllRunning, ETrue ); toolbar->SetItemDimmed(EPodcastSettings, iUpdatingAllRunning, ETrue ); } + DP("CPodcastFeedView::UpdateToolbar END"); } void CPodcastFeedView::HandleAddFeedL() @@ -587,7 +593,13 @@ CleanupStack::PopAndDestroy(waitText); iOpmlState = EOpmlSearching; - iPodcastModel.FeedEngine().SearchForFeedL(url); + TRAPD(err, iPodcastModel.FeedEngine().SearchForFeedL(url)); + + if (err != KErrNone) + { + delete iWaitDialog; + iOpmlState = EOpmlIdle; + } } else { @@ -847,6 +859,8 @@ { TBuf message; iEikonEnv->ReadResourceL(message, R_PODCAST_CONNECTION_ERROR); + delete iWaitDialog; + iOpmlState = EOpmlIdle; ShowErrorMessageL(message); } break;