--- a/application/src/PodcastQueueView.cpp Wed Oct 13 23:58:25 2010 +0100
+++ b/application/src/PodcastQueueView.cpp Sat Oct 16 18:04:09 2010 +0100
@@ -66,13 +66,6 @@
iPodcastModel.FeedEngine().AddObserver(this);
iPodcastModel.ShowEngine().AddObserver(this);
-
- iStylusPopupMenu = CAknStylusPopUpMenu::NewL( this , TPoint(0,0));
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader,R_QUEUEVIEW_POPUP_MENU);
- iStylusPopupMenu->ConstructFromResourceL(reader);
-
- CleanupStack::PopAndDestroy();
SetEmptyTextL(R_PODCAST_EMPTY_QUEUE);
}
@@ -109,9 +102,6 @@
{
iPodcastModel.ShowEngine().RemoveObserver(this);
iPodcastModel.FeedEngine().RemoveObserver(this);
-
- if(iStylusPopupMenu)
- delete iStylusPopupMenu, iStylusPopupMenu = NULL;
}
@@ -328,7 +318,6 @@
CPodcastListView::HandleCommandL(aCommand);
break;
}
- iListContainer->SetLongTapDetectedL(EFalse); // in case we got here by long tapping
UpdateToolbar();
}
@@ -337,6 +326,22 @@
if(aResourceId == R_PODCAST_SHOWSVIEW_MENU)
{
aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, ETrue);
+
+ TBool dimDown = (iListContainer->Listbox()->CurrentItemIndex() >= iPodcastModel.ActiveShowList().Count() - 1 ?
+ ETrue : EFalse);
+ TBool dimUp = (iListContainer->Listbox()->CurrentItemIndex() <= 0 ?
+ ETrue : EFalse);
+
+ TInt index = iListContainer->Listbox()->CurrentItemIndex();
+
+ if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
+ {
+ CShowInfo* info = iPodcastModel.ActiveShowList()[index];
+
+ aMenuPane->SetItemDimmed(EPodcastMoveDownloadDown, dimDown);
+ aMenuPane->SetItemDimmed(EPodcastMoveDownloadUp, dimUp);
+
+ }
}
}
@@ -360,29 +365,3 @@
toolbar->SetItemDimmed(EPodcastRemoveDownload, itemCnt == 0, ETrue);
}
}
-
-void CPodcastQueueView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */)
-{
- DP("CPodcastQueueView::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)
- {
- TBool dimDown = (iListContainer->Listbox()->CurrentItemIndex() >= iPodcastModel.ActiveShowList().Count() - 1 ?
- ETrue : EFalse);
- TBool dimUp = (iListContainer->Listbox()->CurrentItemIndex() <= 0 ?
- ETrue : EFalse);
-
- iStylusPopupMenu->SetItemDimmed(EPodcastMoveDownloadDown, dimDown);
- iStylusPopupMenu->SetItemDimmed(EPodcastMoveDownloadUp, dimUp);
-
- iStylusPopupMenu->ShowMenu();
- iStylusPopupMenu->SetPosition(aPenEventLocation);
- }
-
- DP("CPodcastQueueView::HandleLongTapEventL END");
-}