105 iListContainer->Listbox()->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons ); |
105 iListContainer->Listbox()->ItemDrawer()->FormattedCellData()->SetIconArrayL( icons ); |
106 CleanupStack::Pop(icons); // icons |
106 CleanupStack::Pop(icons); // icons |
107 |
107 |
108 iListContainer->Listbox()->SetListBoxObserver(this); |
108 iListContainer->Listbox()->SetListBoxObserver(this); |
109 |
109 |
110 iStylusPopupMenu = CAknStylusPopUpMenu::NewL( this , TPoint(0,0)); |
|
111 TResourceReader reader; |
|
112 iCoeEnv->CreateResourceReaderLC(reader,R_FEEDVIEW_POPUP_MENU); |
|
113 iStylusPopupMenu->ConstructFromResourceL(reader); |
|
114 CleanupStack::PopAndDestroy(); |
|
115 |
|
116 iUpdater = CPodcastFeedViewUpdater::NewL(*this); |
110 iUpdater = CPodcastFeedViewUpdater::NewL(*this); |
117 DP("CPodcastFeedView::ConstructL END"); |
111 DP("CPodcastFeedView::ConstructL END"); |
118 } |
112 } |
119 |
113 |
120 CPodcastFeedView::~CPodcastFeedView() |
114 CPodcastFeedView::~CPodcastFeedView() |
121 { |
115 { |
122 iPodcastModel.FeedEngine().RemoveObserver(this); |
116 iPodcastModel.FeedEngine().RemoveObserver(this); |
123 delete iFeedsFormat; |
117 delete iFeedsFormat; |
124 delete iNeverUpdated; |
118 delete iNeverUpdated; |
125 delete iStylusPopupMenu; |
|
126 delete iUpdater; |
119 delete iUpdater; |
127 iFeedIdForIconArray.Close(); |
120 iFeedIdForIconArray.Close(); |
128 } |
121 } |
129 |
122 |
130 void CPodcastFeedView::UpdateItemL(TInt aIndex) |
123 void CPodcastFeedView::UpdateItemL(TInt aIndex) |
954 void CPodcastFeedView::GetFeedErrorText(TDes &aErrorMessage, TInt aErrorCode) |
946 void CPodcastFeedView::GetFeedErrorText(TDes &aErrorMessage, TInt aErrorCode) |
955 { |
947 { |
956 TRAP_IGNORE(((CPodcastAppUi*)AppUi())->GetErrorTextL(aErrorMessage,aErrorCode)); |
948 TRAP_IGNORE(((CPodcastAppUi*)AppUi())->GetErrorTextL(aErrorMessage,aErrorCode)); |
957 } |
949 } |
958 |
950 |
959 void CPodcastFeedView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */) |
|
960 { |
|
961 DP("CPodcastListView::HandleLongTapEventL BEGIN"); |
|
962 |
|
963 iListContainer->SetLongTapDetectedL(ETrue); |
|
964 |
|
965 const TInt KListboxDefaultHeight = 19; // for some reason it returns 19 for an empty listbox in S^1 |
|
966 TInt lbHeight = iListContainer->Listbox()->CalcHeightBasedOnNumOfItems( |
|
967 iListContainer->Listbox()->Model()->NumberOfItems()) - KListboxDefaultHeight; |
|
968 |
|
969 if(iStylusPopupMenu && aPenEventLocation.iY < lbHeight) |
|
970 { |
|
971 iStylusPopupMenu->ShowMenu(); |
|
972 iStylusPopupMenu->SetPosition(aPenEventLocation); |
|
973 } |
|
974 DP("CPodcastListView::HandleLongTapEventL END"); |
|
975 } |
|
976 |
|
977 TBool CPodcastFeedView::ViewingShows() |
951 TBool CPodcastFeedView::ViewingShows() |
978 { |
952 { |
979 return iViewingShows; |
953 return iViewingShows; |
980 } |
954 } |