Fix for bug 3051 - search wait dialog doesn't close if search fails; some extra debugging output added
authorteknolog
Fri, 02 Jul 2010 16:04:15 +0100
changeset 153 1d3315159ef5
parent 152 3402b2e2a66a
child 155 4ec84fbc7b27
Fix for bug 3051 - search wait dialog doesn't close if search fails; some extra debugging output added
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<KMaxMessageLength> message;
 			iEikonEnv->ReadResourceL(message, R_PODCAST_CONNECTION_ERROR);
+			delete iWaitDialog;
+			iOpmlState = EOpmlIdle;
 			ShowErrorMessageL(message);
 			}
 			break;