application/src/PodcastFeedView.cpp
branchRCL_3
changeset 306 a36dc474cae2
parent 302 cf14797d0023
child 311 606f4f6babf6
equal deleted inserted replaced
305:dc1c3d779802 306:a36dc474cae2
   130 
   130 
   131 	// Update UID of for the feed at aIndex
   131 	// Update UID of for the feed at aIndex
   132 	iItemIdArray[aIndex] = sortedItems[aIndex]->Uid();
   132 	iItemIdArray[aIndex] = sortedItems[aIndex]->Uid();
   133 	
   133 	
   134 	// Prepare data to update the listbox item with
   134 	// Prepare data to update the listbox item with
   135 	FormatFeedInfoListBoxItemL(*sortedItems[aIndex], EFalse);
   135 	FormatFeedInfoListBoxItemL(*sortedItems[aIndex], sortedItems[aIndex]->Uid() == iFeedUpdating);
   136 	
   136 	
   137 	// If nothing has changed, we are done here
   137 	// If nothing has changed, we are done here
   138 	if (iListboxFormatbuffer == iItemArray->MdcaPoint(aIndex))
   138 	if (iListboxFormatbuffer == iItemArray->MdcaPoint(aIndex))
   139 		{
   139 		{
   140 		return;
   140 		return;
   217 	DP("CPodcastFeedView::HandleListBoxEventL END");
   217 	DP("CPodcastFeedView::HandleListBoxEventL END");
   218 	}
   218 	}
   219 
   219 
   220 void CPodcastFeedView::FeedUpdateAllCompleteL(TFeedState /*aState*/)
   220 void CPodcastFeedView::FeedUpdateAllCompleteL(TFeedState /*aState*/)
   221 	{
   221 	{
   222 	iUpdatingRunning = EFalse;
   222 	DP("FeedUpdateAllCompleteL");
       
   223 	iFeedUpdating = 0;
   223 	UpdateToolbar();
   224 	UpdateToolbar();
   224 	}
   225 	}
   225 
   226 
   226 void CPodcastFeedView::FeedDownloadStartedL(TFeedState /*aState*/, TUint aFeedUid)
   227 void CPodcastFeedView::FeedDownloadStartedL(TFeedState /*aState*/, TUint aFeedUid)
   227 	{
   228 	{
   228 	// Update status text
   229 	// Update status text
   229 	iUpdatingRunning = ETrue;
   230 	iFeedUpdating = aFeedUid;
   230 	UpdateFeedInfoStatusL(aFeedUid, ETrue);
   231 	UpdateFeedInfoStatusL(aFeedUid, ETrue);
   231 	
   232 	
   232 	UpdateToolbar();
   233 	UpdateToolbar();
   233 	}
   234 	}
   234 
   235 
   502 			{
   503 			{
   503 			HandleUpdateFeedL();
   504 			HandleUpdateFeedL();
   504 			}break;
   505 			}break;
   505 		case EPodcastCancelUpdateAllFeeds:
   506 		case EPodcastCancelUpdateAllFeeds:
   506 			{
   507 			{
   507 			if(iUpdatingRunning)
   508 			if(iFeedUpdating)
   508 				{
   509 				{
   509 				iPodcastModel.FeedEngine().CancelUpdateAllFeeds();
   510 				iPodcastModel.FeedEngine().CancelUpdateAllFeeds();
   510 				}
   511 				}
   511 			}break;
   512 			}break;
   512 		default:
   513 		default:
   526 	if (toolbar)
   527 	if (toolbar)
   527 		{
   528 		{
   528 		if (iListContainer->IsVisible()) {
   529 		if (iListContainer->IsVisible()) {
   529 			toolbar->SetToolbarVisibility(aVisible);
   530 			toolbar->SetToolbarVisibility(aVisible);
   530 		}
   531 		}
   531 		toolbar->HideItem(EPodcastUpdateAllFeeds, iUpdatingRunning, ETrue);
   532 		toolbar->HideItem(EPodcastUpdateAllFeeds, iFeedUpdating, ETrue);
   532 		toolbar->HideItem(EPodcastCancelUpdateAllFeeds, !iUpdatingRunning, ETrue );
   533 		toolbar->HideItem(EPodcastCancelUpdateAllFeeds, !iFeedUpdating, ETrue );
   533 		toolbar->SetItemDimmed(EPodcastAddFeed, iUpdatingRunning, ETrue );
   534 		toolbar->SetItemDimmed(EPodcastAddFeed, iFeedUpdating, ETrue );
   534 		toolbar->SetItemDimmed(EPodcastSettings, iUpdatingRunning, ETrue );
   535 		toolbar->SetItemDimmed(EPodcastSettings, iFeedUpdating, ETrue );
   535 		}
   536 		}
   536 	DP("CPodcastFeedView::UpdateToolbar END");
   537 	DP("CPodcastFeedView::UpdateToolbar END");
   537 }
   538 }
   538 
   539 
   539 void CPodcastFeedView::HandleAddFeedL()
   540 void CPodcastFeedView::HandleAddFeedL()