diff -r 982b1ad423f4 -r cd124c4eb6b9 application/src/PodcastFeedView.cpp --- a/application/src/PodcastFeedView.cpp Fri Jul 09 23:00:03 2010 +0100 +++ b/application/src/PodcastFeedView.cpp Fri Jul 09 23:58:47 2010 +0100 @@ -106,13 +106,7 @@ CleanupStack::Pop(icons); // icons iListContainer->Listbox()->SetListBoxObserver(this); - - iStylusPopupMenu = CAknStylusPopUpMenu::NewL( this , TPoint(0,0)); - TResourceReader reader; - iCoeEnv->CreateResourceReaderLC(reader,R_FEEDVIEW_POPUP_MENU); - iStylusPopupMenu->ConstructFromResourceL(reader); - CleanupStack::PopAndDestroy(); - + iUpdater = CPodcastFeedViewUpdater::NewL(*this); DP("CPodcastFeedView::ConstructL END"); } @@ -122,7 +116,6 @@ iPodcastModel.FeedEngine().RemoveObserver(this); delete iFeedsFormat; delete iNeverUpdated; - delete iStylusPopupMenu; delete iUpdater; iFeedIdForIconArray.Close(); } @@ -179,7 +172,6 @@ } UpdateListboxItemsL(); - UpdateToolbar(); if (iFirstActivateAfterLaunch) { @@ -225,7 +217,6 @@ void CPodcastFeedView::FeedUpdateAllCompleteL(TFeedState /*aState*/) { iUpdatingRunning = EFalse; - UpdateToolbar(); } void CPodcastFeedView::FeedDownloadStartedL(TFeedState /*aState*/, TUint aFeedUid) @@ -233,8 +224,6 @@ // Update status text iUpdatingRunning = ETrue; UpdateFeedInfoStatusL(aFeedUid, ETrue); - - UpdateToolbar(); } void CPodcastFeedView::FeedDownloadFinishedL(TFeedState aState,TUint aFeedUid, TInt aError) @@ -501,7 +490,6 @@ case EPodcastUpdateAllFeeds: { iPodcastModel.FeedEngine().UpdateAllFeedsL(); - UpdateToolbar(); }break; case EPodcastUpdateFeed: { @@ -544,29 +532,9 @@ break; } - iListContainer->SetLongTapDetectedL(EFalse); // in case we got here by long tapping - UpdateToolbar(); DP("CPodcastFeedView::HandleCommandL END"); } -void CPodcastFeedView::UpdateToolbar(TBool aVisible) -{ - DP("CPodcastFeedView::UpdateToolbar BEGIN"); - CAknToolbar* toolbar = Toolbar(); - - if (toolbar) - { - if (iListContainer->IsVisible()) { - toolbar->SetToolbarVisibility(aVisible); - } - toolbar->HideItem(EPodcastUpdateAllFeeds, iUpdatingRunning, ETrue); - toolbar->HideItem(EPodcastCancelUpdateAllFeeds, !iUpdatingRunning, ETrue ); - toolbar->SetItemDimmed(EPodcastAddFeed, iUpdatingRunning, ETrue ); - toolbar->SetItemDimmed(EPodcastSettings, iUpdatingRunning, ETrue ); - } - DP("CPodcastFeedView::UpdateToolbar END"); -} - void CPodcastFeedView::HandleAddFeedL() { TBuf url; @@ -915,24 +883,6 @@ TRAP_IGNORE(((CPodcastAppUi*)AppUi())->GetErrorTextL(aErrorMessage,aErrorCode)); } -void CPodcastFeedView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */) -{ - DP("CPodcastListView::HandleLongTapEventL BEGIN"); - - iListContainer->SetLongTapDetectedL(ETrue); - - const TInt KListboxDefaultHeight = 19; // for some reason it returns 19 for an empty listbox in S^1 - TInt lbHeight = iListContainer->Listbox()->CalcHeightBasedOnNumOfItems( - iListContainer->Listbox()->Model()->NumberOfItems()) - KListboxDefaultHeight; - - if(iStylusPopupMenu && aPenEventLocation.iY < lbHeight) - { - iStylusPopupMenu->ShowMenu(); - iStylusPopupMenu->SetPosition(aPenEventLocation); - } - DP("CPodcastListView::HandleLongTapEventL END"); -} - TBool CPodcastFeedView::ViewingShows() { return iViewingShows;