376 { |
376 { |
377 GetFeedErrorText(unplayedShows, aFeedInfo.LastError()); |
377 GetFeedErrorText(unplayedShows, aFeedInfo.LastError()); |
378 } |
378 } |
379 } |
379 } |
380 CArrayPtr<CGulIcon>* icons = iListContainer->Listbox()->ItemDrawer()->FormattedCellData()->IconArray(); |
380 CArrayPtr<CGulIcon>* icons = iListContainer->Listbox()->ItemDrawer()->FormattedCellData()->IconArray(); |
381 |
381 |
382 /*if (aFeedInfo.FeedIconIndex() != -1) { |
382 if(aFeedInfo.FeedIcon() != NULL && |
383 iconIndex = aFeedInfo.FeedIconIndex(); |
383 aFeedInfo.FeedIcon()->SizeInPixels().iHeight > 0 && |
384 } else*/ { |
384 aFeedInfo.FeedIcon()->SizeInPixels().iWidth > 0) |
385 if(aFeedInfo.FeedIcon() != NULL && |
385 { |
386 aFeedInfo.FeedIcon()->SizeInPixels().iHeight > 0 && |
386 // Hopefully temporary haxx to prevent double delete. I would prefer if |
387 aFeedInfo.FeedIcon()->SizeInPixels().iWidth > 0) |
387 // this could be solved with a little better design. |
388 { |
388 CFbsBitmap* bmpCopy = new (ELeave) CFbsBitmap; |
389 // Hopefully temporary haxx to prevent double delete. I would prefer if |
389 CleanupStack::PushL(bmpCopy); |
390 // this could be solved with a little better design. |
390 bmpCopy->Duplicate(aFeedInfo.FeedIcon()->Handle()); |
391 CFbsBitmap* bmpCopy = new (ELeave) CFbsBitmap; |
391 icons->AppendL( CGulIcon::NewL(bmpCopy, NULL)); |
392 CleanupStack::PushL(bmpCopy); |
392 CleanupStack::Pop(bmpCopy); |
393 bmpCopy->Duplicate(aFeedInfo.FeedIcon()->Handle()); |
393 iconIndex = icons->Count()-1; |
394 icons->AppendL( CGulIcon::NewL(bmpCopy, NULL)); |
394 } |
395 CleanupStack::Pop(bmpCopy); |
395 else |
396 } |
396 { |
397 else { |
|
398 |
|
399 iconIndex = 0; |
397 iconIndex = 0; |
400 } |
398 } |
401 } |
399 |
402 |
400 |
403 if (unplayedShows.Length() > 0) { |
401 if (unplayedShows.Length() > 0) { |
404 unplayedShows.Insert(0,_L(", ")); |
402 unplayedShows.Insert(0,_L(", ")); |
405 } |
403 } |
406 |
404 |
407 iListboxFormatbuffer.Format(KFeedFormat(), iconIndex, &(aFeedInfo.Title()), &updatedDate, &unplayedShows); |
405 iListboxFormatbuffer.Format(KFeedFormat(), iconIndex, &(aFeedInfo.Title()), &updatedDate, &unplayedShows); |
408 } |
406 } |
409 |
407 |
410 void CPodcastFeedView::ImageOperationCompleteL(TInt aError, TUint aHandle) |
408 void CPodcastFeedView::ImageOperationCompleteL(TInt aError, TUint aHandle, CPodcastModel& /*aPodcastModel*/) |
411 { |
409 { |
412 if (aError == KErrNone) { |
410 if (aError == KErrNone) { |
413 UpdateFeedInfoStatusL(aHandle, EFalse); |
411 UpdateFeedInfoStatusL(aHandle, EFalse); |
414 } |
412 } |
415 } |
413 } |
416 |
414 |
417 void CPodcastFeedView::UpdateFeedInfoDataL(CFeedInfo* aFeedInfo, TInt aIndex, TBool aIsUpdating ) |
415 void CPodcastFeedView::UpdateFeedInfoDataL(CFeedInfo* aFeedInfo, TInt aIndex, TBool aIsUpdating ) |
418 { |
416 { |
419 TListItemProperties itemProps; |
417 TListItemProperties itemProps; |