65 iListContainer->Listbox()->SetListBoxObserver(this); |
65 iListContainer->Listbox()->SetListBoxObserver(this); |
66 |
66 |
67 iPodcastModel.FeedEngine().AddObserver(this); |
67 iPodcastModel.FeedEngine().AddObserver(this); |
68 iPodcastModel.ShowEngine().AddObserver(this); |
68 iPodcastModel.ShowEngine().AddObserver(this); |
69 |
69 |
70 |
|
71 // no popup options apply to S^1 |
|
72 iStylusPopupMenu = CAknStylusPopUpMenu::NewL( this , TPoint(0,0)); |
70 iStylusPopupMenu = CAknStylusPopUpMenu::NewL( this , TPoint(0,0)); |
73 TResourceReader reader; |
71 TResourceReader reader; |
74 iCoeEnv->CreateResourceReaderLC(reader,R_QUEUEVIEW_POPUP_MENU); |
72 iCoeEnv->CreateResourceReaderLC(reader,R_QUEUEVIEW_POPUP_MENU); |
75 iStylusPopupMenu->ConstructFromResourceL(reader); |
73 iStylusPopupMenu->ConstructFromResourceL(reader); |
|
74 |
76 CleanupStack::PopAndDestroy(); |
75 CleanupStack::PopAndDestroy(); |
77 |
76 |
78 SetEmptyTextL(R_PODCAST_EMPTY_QUEUE); |
77 SetEmptyTextL(R_PODCAST_EMPTY_QUEUE); |
79 } |
78 } |
80 |
79 |
320 iListContainer->SetLongTapDetectedL(EFalse); // in case we got here by long tapping |
319 iListContainer->SetLongTapDetectedL(EFalse); // in case we got here by long tapping |
321 UpdateToolbar(); |
320 UpdateToolbar(); |
322 } |
321 } |
323 |
322 |
324 void CPodcastQueueView::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane) |
323 void CPodcastQueueView::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane) |
325 { |
324 { |
326 if(aResourceId == R_PODCAST_SHOWSVIEW_MENU) |
325 if(aResourceId == R_PODCAST_SHOWSVIEW_MENU) |
327 { |
326 { |
328 aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, ETrue); |
327 aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, ETrue); |
329 } |
328 } |
330 } |
329 } |
331 |
330 |
332 void CPodcastQueueView::UpdateToolbar(TBool aVisible) |
331 void CPodcastQueueView::UpdateToolbar(TBool aVisible) |
333 { |
332 { |
334 CAknToolbar* toolbar = Toolbar(); |
333 CAknToolbar* toolbar = Toolbar(); |
335 |
334 |
336 if (toolbar) { |
335 if (toolbar) |
|
336 { |
337 RShowInfoArray &fItems = iPodcastModel.ActiveShowList(); |
337 RShowInfoArray &fItems = iPodcastModel.ActiveShowList(); |
338 TInt itemCnt = fItems.Count(); |
338 TInt itemCnt = fItems.Count(); |
339 if (iListContainer->IsVisible()) { |
339 if (iListContainer->IsVisible()) |
|
340 { |
340 toolbar->SetToolbarVisibility(aVisible); |
341 toolbar->SetToolbarVisibility(aVisible); |
341 } |
342 } |
|
343 |
342 toolbar->HideItem(EPodcastRemoveAllDownloads, EFalse, ETrue); |
344 toolbar->HideItem(EPodcastRemoveAllDownloads, EFalse, ETrue); |
343 toolbar->SetItemDimmed(EPodcastRemoveAllDownloads, itemCnt == 0, ETrue); |
345 toolbar->SetItemDimmed(EPodcastRemoveAllDownloads, itemCnt == 0, ETrue); |
344 toolbar->HideItem(EPodcastSuspendDownloads,iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue); |
346 toolbar->HideItem(EPodcastSuspendDownloads,iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue); |
345 toolbar->HideItem(EPodcastResumeDownloads,!iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue); |
347 toolbar->HideItem(EPodcastResumeDownloads,!iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue); |
346 toolbar->SetItemDimmed(EPodcastRemoveDownload, itemCnt == 0, ETrue); |
348 toolbar->SetItemDimmed(EPodcastRemoveDownload, itemCnt == 0, ETrue); |
347 } |
349 } |
348 } |
350 } |
349 |
351 |
350 void CPodcastQueueView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */) |
352 void CPodcastQueueView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */) |
351 { |
353 { |
352 DP("CPodcastQueueView::HandleLongTapEventL BEGIN"); |
354 DP("CPodcastQueueView::HandleLongTapEventL BEGIN"); |
353 iListContainer->SetLongTapDetectedL(ETrue); |
355 iListContainer->SetLongTapDetectedL(ETrue); |