application/src/PodcastFeedView.cpp
changeset 32 26a3f2dfba08
parent 26 71493655568a
child 33 64ed1227e68d
equal deleted inserted replaced
31:8a5ead064c4f 32:26a3f2dfba08
   369 			else 
   369 			else 
   370 				{
   370 				{
   371 				aFeedInfo.LastUpdated().FormatL(updatedDate, KDateFormatShort());
   371 				aFeedInfo.LastUpdated().FormatL(updatedDate, KDateFormatShort());
   372 				}
   372 				}
   373 			}
   373 			}
       
   374 		
       
   375 		if(aFeedInfo.LastError() != KErrNone)
       
   376 			{
       
   377 			GetFeedErrorText(unplayedShows, aFeedInfo.LastError());
       
   378 			}
   374 		}
   379 		}
   375 	CArrayPtr<CGulIcon>* icons = iListContainer->Listbox()->ItemDrawer()->FormattedCellData()->IconArray();
   380 	CArrayPtr<CGulIcon>* icons = iListContainer->Listbox()->ItemDrawer()->FormattedCellData()->IconArray();
   376 	
   381 	
   377 	if (aFeedInfo.FeedIconIndex() != -1) {
   382 	if (aFeedInfo.FeedIconIndex() != -1) {
   378 		iconIndex = aFeedInfo.FeedIconIndex();
   383 		iconIndex = aFeedInfo.FeedIconIndex();
   393 			}
   398 			}
   394 		else {
   399 		else {
   395 			if(BaflUtils::FileExists(iPodcastModel.FsSession(), aFeedInfo.ImageFileName()))
   400 			if(BaflUtils::FileExists(iPodcastModel.FsSession(), aFeedInfo.ImageFileName()))
   396 			{
   401 			{
   397 			// If this fails, no reason to worry
   402 			// If this fails, no reason to worry
   398 			TRAP_IGNORE(iPodcastModel.ImageHandler().LoadFileAndScaleL(aFeedInfo.FeedIcon(), aFeedInfo.ImageFileName(), TSize(64,56), *this));
   403 			TRAP_IGNORE(iPodcastModel.ImageHandler().LoadFileAndScaleL(aFeedInfo.FeedIcon(), aFeedInfo.ImageFileName(), TSize(64,56), *this, aFeedInfo.Uid()));
   399 			}
   404 			}
   400 		}
   405 		}
   401 	}
   406 	}
   402 	
   407 	
   403 	if(aFeedInfo.LastError() != KErrNone)
       
   404 		{
       
   405 		GetFeedErrorText(unplayedShows, aFeedInfo.LastError());
       
   406 		}
       
   407 		
       
   408 	if (unplayedShows.Length() > 0) {
   408 	if (unplayedShows.Length() > 0) {
   409 		unplayedShows.Insert(0,_L(", "));
   409 		unplayedShows.Insert(0,_L(", "));
   410 	}
   410 	}
   411 	
   411 	
   412 	iListboxFormatbuffer.Format(KFeedFormat(), iconIndex, &(aFeedInfo.Title()), &updatedDate,  &unplayedShows);
   412 	iListboxFormatbuffer.Format(KFeedFormat(), iconIndex, &(aFeedInfo.Title()), &updatedDate,  &unplayedShows);
   413 	}
   413 	}
   414 
   414 
   415 void CPodcastFeedView::ImageOperationCompleteL(TInt aError)
   415 void CPodcastFeedView::ImageOperationCompleteL(TInt aError, TUint aHandle)
   416 	{
   416 	{
   417 	if (aError == KErrNone) {
   417 	if (aError == KErrNone) {
   418 		UpdateListboxItemsL();
   418 	UpdateFeedInfoStatusL(aHandle, EFalse);
   419 	}
   419 	}
   420 	}
   420 	}
   421 
   421 
   422 void CPodcastFeedView::UpdateFeedInfoDataL(CFeedInfo* aFeedInfo, TInt aIndex, TBool aIsUpdating )
   422 void CPodcastFeedView::UpdateFeedInfoDataL(CFeedInfo* aFeedInfo, TInt aIndex, TBool aIsUpdating )
   423 	{			
   423 	{