69 EMbmPodcastAudio_failed_mask, |
69 EMbmPodcastAudio_failed_mask, |
70 EMbmPodcastAudio_suspended, |
70 EMbmPodcastAudio_suspended, |
71 EMbmPodcastAudio_suspended_mask, |
71 EMbmPodcastAudio_suspended_mask, |
72 0, |
72 0, |
73 0 |
73 0 |
74 }; |
|
75 |
|
76 /** |
|
77 * This is an interal class to display a message query dialog with an image at the bottm |
|
78 */ |
|
79 class CPodcastImageMessageQueryDialog:public CAknMessageQueryDialog |
|
80 { |
|
81 public: |
|
82 /** |
|
83 * C++ default constructor. |
|
84 * |
|
85 * @param aMessage Dialog box text. |
|
86 * @param aHeader Header for the dialog. |
|
87 * @deprecated |
|
88 */ |
|
89 CPodcastImageMessageQueryDialog(TDesC* aMessage, TDesC* aHeader):CAknMessageQueryDialog(aMessage, aHeader) |
|
90 { |
|
91 |
|
92 } |
|
93 |
|
94 ~CPodcastImageMessageQueryDialog() |
|
95 { |
|
96 |
|
97 } |
|
98 |
|
99 void SetSizeAndPosition(const TSize& aSize) |
|
100 { |
|
101 CAknMessageQueryDialog::SetSizeAndPosition(aSize); |
|
102 |
|
103 TPoint pos = Position(); |
|
104 TSize size = Size(); |
|
105 |
|
106 CAknDialog::SetSizeAndPosition(aSize); |
|
107 |
|
108 pos.iY-=((aSize.iHeight-size.iHeight)-KPodcastDialogOffset); |
|
109 SetPosition(pos); |
|
110 SetSize(aSize); |
|
111 } |
|
112 |
|
113 }; |
74 }; |
114 |
75 |
115 CPodcastShowsView* CPodcastShowsView::NewL(CPodcastModel& aPodcastModel) |
76 CPodcastShowsView* CPodcastShowsView::NewL(CPodcastModel& aPodcastModel) |
116 { |
77 { |
117 CPodcastShowsView* self = CPodcastShowsView::NewLC(aPodcastModel); |
78 CPodcastShowsView* self = CPodcastShowsView::NewLC(aPodcastModel); |
684 { |
645 { |
685 TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
646 TInt index = iListContainer->Listbox()->CurrentItemIndex(); |
686 if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
647 if (index >= 0 && index < iPodcastModel.ActiveShowList().Count()) |
687 { |
648 { |
688 CShowInfo* info = iPodcastModel.ActiveShowList()[index]; |
649 CShowInfo* info = iPodcastModel.ActiveShowList()[index]; |
689 TUint32 feedUid = info->FeedUid(); |
650 |
690 // CFeedInfo* feedInfo = iPodcastModel.FeedEngine().GetFeedInfoByUid(feedUid); |
651 HBufC *title = info->Title().AllocL(); |
|
652 HBufC *description = info->Description().AllocL(); |
691 |
653 |
692 CPodcastImageMessageQueryDialog* note = new ( ELeave ) CPodcastImageMessageQueryDialog( (TDesC*)&info->Description(), (TDesC*)&info->Title() ); |
654 CAknMessageQueryDialog* note = new ( ELeave ) CAknMessageQueryDialog( description, title ); |
693 |
655 |
694 note->PrepareLC( R_SHOW_INFO_NOTE ); // Adds to CleanupStack |
656 note->PrepareLC( R_SHOW_INFO_NOTE ); // Adds to CleanupStack |
695 |
657 note->RunLD(); |
696 // if(feedInfo && feedInfo->ImageFileName().Length()>0) |
|
697 // { |
|
698 // CFbsBitmap * bitmap = new (ELeave) CFbsBitmap; |
|
699 // CleanupStack::PushL(bitmap); |
|
700 // |
|
701 // TRAPD(loaderror, iPodcastModel.ImageHandler().LoadFileAndScaleL(bitmap, feedInfo->ImageFileName(), TSize(KPodcastImageWidth, KPodcastImageHeight), *this)); |
|
702 // |
|
703 // if(loaderror == KErrNone) |
|
704 // { |
|
705 // CActiveScheduler::Start(); |
|
706 // if(iLastImageHandlerError == KErrNone) |
|
707 // { |
|
708 // CEikImage* image = static_cast<CEikImage*>(note->ControlOrNull(EPodcastShowInfoImage)); |
|
709 // image->SetBitmap(bitmap); |
|
710 // CleanupStack::Pop(bitmap); |
|
711 // bitmap = NULL; |
|
712 // } |
|
713 // else |
|
714 // { |
|
715 // CleanupStack::PopAndDestroy(bitmap); |
|
716 // bitmap = NULL; |
|
717 // } |
|
718 // } |
|
719 // else |
|
720 // { |
|
721 // CleanupStack::PopAndDestroy(bitmap); |
|
722 // bitmap = NULL; |
|
723 // } |
|
724 // } |
|
725 |
|
726 note->RunLD(); |
|
727 } |
658 } |
728 } |
659 } |
729 |
660 |
730 void CPodcastShowsView::UpdateToolbar(TBool aVisible) |
661 void CPodcastShowsView::UpdateToolbar(TBool aVisible) |
731 { |
662 { |