--- a/application/src/PodcastQueueView.cpp Sat Nov 13 12:34:20 2010 +0000
+++ b/application/src/PodcastQueueView.cpp Mon Nov 15 23:47:20 2010 +0000
@@ -31,6 +31,7 @@
#include <barsread.h>
#include <aknnotedialog.h>
#include <aknmessagequerydialog.h>
+#include <akntitle.h>
#define KMaxMessageLength 200
@@ -105,11 +106,13 @@
CPodcastQueueView::~CPodcastQueueView()
{
+ DP("CPodcastQueueView::~CPodcastQueueView BEGIN");
iPodcastModel.ShowEngine().RemoveObserver(this);
iPodcastModel.FeedEngine().RemoveObserver(this);
if(iStylusPopupMenu)
delete iStylusPopupMenu, iStylusPopupMenu = NULL;
+ DP("CPodcastQueueView::~CPodcastQueueView END");
}
@@ -125,7 +128,7 @@
CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
iPreviousView = aPrevViewId;
-
+ UpdateViewTitleL();
UpdateFeedUpdateStateL();
UpdateToolbar();
DP("CPodcastQueueView::DoActivateL END");
@@ -336,7 +339,7 @@
}
break;
default:
- CPodcastListView::HandleCommandL(aCommand);
+ CPodcastShowsView::HandleCommandL(aCommand);
break;
}
iListContainer->SetLongTapDetectedL(EFalse); // in case we got here by long tapping
@@ -384,16 +387,32 @@
if(iStylusPopupMenu && aPenEventLocation.iY < lbHeight)
{
TBool dimDown = (iListContainer->Listbox()->CurrentItemIndex() >= iPodcastModel.ActiveShowList().Count() - 1 ?
- ETrue : EFalse);
+ (TBool)ETrue : (TBool)EFalse);
TBool dimUp = (iListContainer->Listbox()->CurrentItemIndex() <= 0 ?
- ETrue : EFalse);
+ (TBool)ETrue : (TBool)EFalse);
iStylusPopupMenu->SetItemDimmed(EPodcastMoveDownloadDown, dimDown);
iStylusPopupMenu->SetItemDimmed(EPodcastMoveDownloadUp, dimUp);
-
+
+ TInt index = iListContainer->Listbox()->CurrentItemIndex();
+ CShowInfo *info = iPodcastModel.ActiveShowList()[index];
+
+ iStylusPopupMenu->SetItemDimmed(EPodcastMarkAsPlayed, info->PlayState() != ENeverPlayed);
+ iStylusPopupMenu->SetItemDimmed(EPodcastMarkAsUnplayed, info->PlayState() == ENeverPlayed);
+
iStylusPopupMenu->ShowMenu();
iStylusPopupMenu->SetPosition(aPenEventLocation);
}
DP("CPodcastQueueView::HandleLongTapEventL END");
}
+
+void CPodcastQueueView::UpdateViewTitleL()
+ {
+ CAknTitlePane* titlePane = static_cast<CAknTitlePane*>
+ ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
+
+ HBufC *title = iEikonEnv->AllocReadResourceLC(R_DOWNLOAD_QUEUE);
+ titlePane->SetTextL(*title);
+ CleanupStack::PopAndDestroy(title);
+ }