103 //mask = iEikonEnv->CreateBitmapL(KAsterisk,EMbmPodcastFeed_40x40m ); |
103 //mask = iEikonEnv->CreateBitmapL(KAsterisk,EMbmPodcastFeed_40x40m ); |
104 CleanupStack::PushL( mask ); |
104 CleanupStack::PushL( mask ); |
105 // Append the feed icon to icon array |
105 // Append the feed icon to icon array |
106 icons->AppendL( CGulIcon::NewL( bitmap, mask ) ); |
106 icons->AppendL( CGulIcon::NewL( bitmap, mask ) ); |
107 CleanupStack::Pop(2); // bitmap, mask |
107 CleanupStack::Pop(2); // bitmap, mask |
108 |
|
109 iListContainer->Listbox()->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons ); |
108 iListContainer->Listbox()->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons ); |
110 CleanupStack::Pop(icons); // icons |
109 CleanupStack::Pop(icons); // icons |
111 |
110 |
112 iListContainer->Listbox()->SetListBoxObserver(this); |
111 iListContainer->Listbox()->SetListBoxObserver(this); |
113 |
112 |
378 GetFeedErrorText(unplayedShows, aFeedInfo.LastError()); |
377 GetFeedErrorText(unplayedShows, aFeedInfo.LastError()); |
379 } |
378 } |
380 } |
379 } |
381 CArrayPtr<CGulIcon>* icons = iListContainer->Listbox()->ItemDrawer()->FormattedCellData()->IconArray(); |
380 CArrayPtr<CGulIcon>* icons = iListContainer->Listbox()->ItemDrawer()->FormattedCellData()->IconArray(); |
382 |
381 |
383 if (aFeedInfo.FeedIconIndex() != -1) { |
382 /*if (aFeedInfo.FeedIconIndex() != -1) { |
384 iconIndex = aFeedInfo.FeedIconIndex(); |
383 iconIndex = aFeedInfo.FeedIconIndex(); |
385 } else { |
384 } else*/ { |
386 if(aFeedInfo.FeedIcon() != NULL && |
385 if(aFeedInfo.FeedIcon() != NULL && |
387 aFeedInfo.FeedIcon()->SizeInPixels().iHeight > 0 && |
386 aFeedInfo.FeedIcon()->SizeInPixels().iHeight > 0 && |
388 aFeedInfo.FeedIcon()->SizeInPixels().iWidth > 0) |
387 aFeedInfo.FeedIcon()->SizeInPixels().iWidth > 0) |
389 { |
388 { |
390 // Hopefully temporary haxx to prevent double delete. I would prefer if |
389 // Hopefully temporary haxx to prevent double delete. I would prefer if |
391 // this could be solved with a little better design. |
390 // this could be solved with a little better design. |
392 CFbsBitmap* bmpCopy = new (ELeave) CFbsBitmap; |
391 CFbsBitmap* bmpCopy = new (ELeave) CFbsBitmap; |
393 CleanupStack::PushL(bmpCopy); |
392 CleanupStack::PushL(bmpCopy); |
394 bmpCopy->Duplicate(aFeedInfo.FeedIcon()->Handle()); |
393 bmpCopy->Duplicate(aFeedInfo.FeedIcon()->Handle()); |
395 icons->AppendL( CGulIcon::NewL(bmpCopy, NULL)); |
394 icons->AppendL( CGulIcon::NewL(bmpCopy, NULL)); |
396 CleanupStack::Pop(bmpCopy); |
395 CleanupStack::Pop(bmpCopy); |
397 iconIndex = icons->Count()-1; |
|
398 aFeedInfo.SetFeedIconIndex(iconIndex); |
|
399 } |
396 } |
400 else { |
397 else { |
401 if(BaflUtils::FileExists(iEikonEnv->FsSession(), aFeedInfo.ImageFileName())) |
398 |
402 { |
399 iconIndex = 0; |
403 // If this fails, no reason to worry |
|
404 TRAP_IGNORE(iPodcastModel.ImageHandler().LoadFileAndScaleL(aFeedInfo.FeedIcon(), aFeedInfo.ImageFileName(), TSize(64,56), *this, aFeedInfo.Uid())); |
|
405 } |
|
406 } |
400 } |
407 } |
401 } |
408 |
402 |
409 if (unplayedShows.Length() > 0) { |
403 if (unplayedShows.Length() > 0) { |
410 unplayedShows.Insert(0,_L(", ")); |
404 unplayedShows.Insert(0,_L(", ")); |