# HG changeset patch # User Sebastian Brannstrom # Date 1289854467 0 # Node ID 31f9864a37accbdffa6ffdeb736c1f54ee516b47 # Parent a5e419ee2bb322ca21dfb0918e21e35b78c6c909 Various fixes diff -r a5e419ee2bb3 -r 31f9864a37ac application/data/PodcastClient_english.rls --- a/application/data/PodcastClient_english.rls Mon Nov 15 17:32:00 2010 +0000 +++ b/application/data/PodcastClient_english.rls Mon Nov 15 20:54:27 2010 +0000 @@ -19,7 +19,7 @@ // Menu items rls_string STRING_r_settings_cmd "Settings" -rls_string STRING_r_view_mark_all_played_cmd "Mark all old" +rls_string STRING_r_view_mark_all_played_cmd "Mark all shows old" rls_string STRING_r_exit_cmd "Exit" rls_string STRING_r_view_help "Help" rls_string STRING_r_view_about_cmd "About" @@ -108,7 +108,7 @@ rls_string STRING_r_view_delete_feed_cmd "Remove feed" rls_string STRING_r_view_delete_feed_cmd_short "Remove" rls_string STRING_r_update_feed_cmd "Update feed" -rls_string STRING_r_update_feed_short_cmd "Update feed" +rls_string STRING_r_update_feed_short_cmd "Update" rls_string STRING_r_update_all_feeds_cmd "Update all feeds" rls_string STRING_r_update_all_feeds_short_cmd "Update" rls_string STRING_r_podcast_feeds_is_updating "Updating..." @@ -128,8 +128,10 @@ // Show view -rls_string STRING_r_view_mark_as_played_cmd_short "Mark show old" -rls_string STRING_r_view_mark_as_unplayed_cmd_short "Mark show new" +rls_string STRING_r_view_mark_as_played_cmd "Mark show old" +rls_string STRING_r_view_mark_as_played_cmd_short "Mark old" +rls_string STRING_r_view_mark_as_unplayed_cmd "Mark show new" +rls_string STRING_r_view_mark_as_unplayed_cmd_short "Mark new" rls_string STRING_r_view_download_show_cmd "Download show" rls_string STRING_r_view_delete_show_cmd "Delete show" rls_string STRING_r_view_show_info_cmd "Info" diff -r a5e419ee2bb3 -r 31f9864a37ac application/data/PodcastShowsView.ra --- a/application/data/PodcastShowsView.ra Mon Nov 15 17:32:00 2010 +0000 +++ b/application/data/PodcastShowsView.ra Mon Nov 15 20:54:27 2010 +0000 @@ -37,11 +37,6 @@ { MENU_ITEM { - command = EPodcastMarkAllPlayed; - txt = STRING_r_view_mark_all_played_cmd; - }, - MENU_ITEM - { command = EPodcastAbout; txt = STRING_r_view_about_cmd; }, @@ -183,6 +178,25 @@ TBAR_CTRL { type = EAknCtButton; + id = EPodcastMarkAllPlayed; + control = AVKON_BUTTON + { + states = + { + AVKON_BUTTON_STATE + { + bmpfile = APPICON; + bmpid = EMbmPodcastMark_old_all; + bmpmask = EMbmPodcastMark_old_all_mask; + //txt = STRING_r_cancel_update_all_feeds_short_cmd; + helptxt = STRING_r_view_mark_all_played_cmd; + } + }; + }; + }, + TBAR_CTRL + { + type = EAknCtButton; id = EPodcastMarkAsPlayed; control = AVKON_BUTTON { @@ -194,7 +208,7 @@ bmpid = EMbmPodcastMark_old; bmpmask = EMbmPodcastMark_old_mask; //txt = STRING_r_view_mark_as_played_cmd_short; - helptxt = STRING_r_view_mark_as_played_cmd_short; + helptxt = STRING_r_view_mark_as_played_cmd; } }; }; @@ -213,7 +227,7 @@ bmpid = EMbmPodcastMark_new; bmpmask = EMbmPodcastMark_new_mask; //txt = STRING_r_view_mark_as_unplayed_cmd_short; - helptxt = STRING_r_view_mark_as_unplayed_cmd_short; + helptxt = STRING_r_view_mark_as_unplayed_cmd; } }; }; diff -r a5e419ee2bb3 -r 31f9864a37ac application/data/icons/toolbar/mark_old_all.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/application/data/icons/toolbar/mark_old_all.svg Mon Nov 15 20:54:27 2010 +0000 @@ -0,0 +1,50 @@ + + + +image/svg+xml + + + + + + + + + \ No newline at end of file diff -r a5e419ee2bb3 -r 31f9864a37ac application/group/icons.mk --- a/application/group/icons.mk Mon Nov 15 17:32:00 2010 +0000 +++ b/application/group/icons.mk Mon Nov 15 20:54:27 2010 +0000 @@ -65,6 +65,7 @@ $(DPATH)\toolbar\mark_new.svg\ $(DPATH)\toolbar\mark_new_all.svg\ $(DPATH)\toolbar\mark_old.svg\ + $(DPATH)\toolbar\mark_old_all.svg\ $(DPATH)\toolbar\settings.svg\ $(DPATH)\toolbar\update.svg\ $(DPATH)\toolbar\update_all.svg\ diff -r a5e419ee2bb3 -r 31f9864a37ac application/src/PodcastListView.cpp --- a/application/src/PodcastListView.cpp Mon Nov 15 17:32:00 2010 +0000 +++ b/application/src/PodcastListView.cpp Mon Nov 15 20:54:27 2010 +0000 @@ -128,14 +128,14 @@ void CPodcastListContainer::SetLongTapDetectedL(TBool aLongTapDetected) { DP("CPodcastListContainer::SetLongTapDetectedL BEGIN"); -// iLongTapDetected = aLongTapDetected; -// -// if (aLongTapDetected == EFalse) -// { -// TPointerEvent event; -// event.iType = TPointerEvent::EButton1Up; -// //CCoeControl::HandlePointerEventL(event); -// } + iLongTapDetected = aLongTapDetected; + + if (aLongTapDetected == EFalse) + { + TPointerEvent event; + event.iType = TPointerEvent::EButton1Up; + //CCoeControl::HandlePointerEventL(event); + } DP("CPodcastListContainer::SetLongTapDetectedL END"); } diff -r a5e419ee2bb3 -r 31f9864a37ac application/src/PodcastShowsView.cpp --- a/application/src/PodcastShowsView.cpp Mon Nov 15 17:32:00 2010 +0000 +++ b/application/src/PodcastShowsView.cpp Mon Nov 15 20:54:27 2010 +0000 @@ -715,7 +715,7 @@ void CPodcastShowsView::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane) { - if(aResourceId == R_PODCAST_SHOWSVIEW_MENU) + if(aResourceId == R_PODCAST_SHOWSVIEW_MENU && !iShowNewShows) { TBool showMarkAllPlayed = EFalse; for (int i=0;iUid(); - aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, updatingState || !showMarkAllPlayed); - - + aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, updatingState || !showMarkAllPlayed); } } @@ -800,10 +798,15 @@ toolbar->HideItem(EPodcastCancelUpdateAllFeeds, !updatingState, ETrue ); toolbar->HideItem(EPodcastDownloadAll, !iShowNewShows, ETrue); + toolbar->HideItem(EPodcastMarkAllPlayed, !iShowNewShows, ETrue ); if (iShowNewShows) { toolbar->HideItem(EPodcastDownloadShow, ETrue, ETrue ); + toolbar->HideItem(EPodcastDownloadShow, ETrue, ETrue ); + toolbar->HideItem(EPodcastDeleteShow, ETrue, ETrue); + toolbar->HideItem(EPodcastMarkAsPlayed, ETrue, ETrue ); + toolbar->HideItem(EPodcastMarkAsUnplayed, ETrue, ETrue ); TBool showDownloadAll = EFalse; for (int i=0;iSetItemDimmed(EPodcastDownloadAll, !showDownloadAll, ETrue); } + else + { + RShowInfoArray &fItems = iPodcastModel.ActiveShowList(); + TInt itemCnt = fItems.Count(); - RShowInfoArray &fItems = iPodcastModel.ActiveShowList(); - TInt itemCnt = fItems.Count(); - - TBool hideDownloadShowCmd = EFalse; - TBool dimDownloadShowCmd = EFalse; - TBool hideSetPlayed = EFalse; - - if(iListContainer->Listbox() != NULL) - { - TInt index = iListContainer->Listbox()->CurrentItemIndex(); - - if(index>= 0 && index < itemCnt) + TBool hideDownloadShowCmd = EFalse; + TBool dimDownloadShowCmd = EFalse; + TBool hideSetPlayed = EFalse; + + if(iListContainer->Listbox() != NULL) { - switch(fItems[index]->DownloadState()) - { - case ENotDownloaded: - case EFailedDownload: - hideDownloadShowCmd = EFalse; - dimDownloadShowCmd = EFalse; - break; - case EQueued: - case EDownloading: - hideDownloadShowCmd = EFalse; - dimDownloadShowCmd = ETrue; - break; - case EDownloaded: - hideDownloadShowCmd = ETrue; - break; + TInt index = iListContainer->Listbox()->CurrentItemIndex(); + + if(index>= 0 && index < itemCnt) + { + switch(fItems[index]->DownloadState()) + { + case ENotDownloaded: + case EFailedDownload: + hideDownloadShowCmd = EFalse; + dimDownloadShowCmd = EFalse; + break; + case EQueued: + case EDownloading: + hideDownloadShowCmd = EFalse; + dimDownloadShowCmd = ETrue; + break; + case EDownloaded: + hideDownloadShowCmd = ETrue; + break; + } + + if(fItems[index]->PlayState() == EPlayed) { + hideSetPlayed = ETrue; } - - if(fItems[index]->PlayState() == EPlayed) { - hideSetPlayed = ETrue; } - } - } - - if (hideDownloadShowCmd) { - toolbar->HideItem(EPodcastDownloadShow, ETrue, ETrue ); - toolbar->HideItem(EPodcastDeleteShow, EFalse, ETrue); - toolbar->SetItemDimmed(EPodcastDeleteShow, updatingState , ETrue); - } else { - toolbar->HideItem(EPodcastDownloadShow, EFalse, ETrue ); - toolbar->HideItem(EPodcastDeleteShow, ETrue, ETrue); - toolbar->SetItemDimmed(EPodcastDownloadShow, updatingState || dimDownloadShowCmd || !itemCnt, ETrue); - } - - if (hideSetPlayed) { - toolbar->HideItem(EPodcastMarkAsPlayed, ETrue, ETrue ); - toolbar->HideItem(EPodcastMarkAsUnplayed, EFalse, ETrue ); - toolbar->SetItemDimmed(EPodcastMarkAsUnplayed, updatingState, ETrue); - } else { - toolbar->HideItem(EPodcastMarkAsPlayed, EFalse, ETrue ); - toolbar->HideItem(EPodcastMarkAsUnplayed, ETrue, ETrue ); - toolbar->SetItemDimmed(EPodcastMarkAsPlayed, updatingState|| !itemCnt, ETrue); - } + } + + if (hideDownloadShowCmd) { + toolbar->HideItem(EPodcastDownloadShow, ETrue, ETrue ); + toolbar->HideItem(EPodcastDeleteShow, EFalse, ETrue); + toolbar->SetItemDimmed(EPodcastDeleteShow, updatingState , ETrue); + } else { + toolbar->HideItem(EPodcastDownloadShow, EFalse, ETrue ); + toolbar->HideItem(EPodcastDeleteShow, ETrue, ETrue); + toolbar->SetItemDimmed(EPodcastDownloadShow, updatingState || dimDownloadShowCmd || !itemCnt, ETrue); + } + + if (hideSetPlayed) { + toolbar->HideItem(EPodcastMarkAsPlayed, ETrue, ETrue ); + toolbar->HideItem(EPodcastMarkAsUnplayed, EFalse, ETrue ); + toolbar->SetItemDimmed(EPodcastMarkAsUnplayed, updatingState, ETrue); + } else { + toolbar->HideItem(EPodcastMarkAsPlayed, EFalse, ETrue ); + toolbar->HideItem(EPodcastMarkAsUnplayed, ETrue, ETrue ); + toolbar->SetItemDimmed(EPodcastMarkAsPlayed, updatingState|| !itemCnt, ETrue); + } + } } } @@ -896,8 +901,8 @@ TBool hideDeleteShowCmd = info->DownloadState() != EDownloaded; TBool hideMarkOld = info->PlayState() == EPlayed; - iStylusPopupMenu->SetItemDimmed(EPodcastMarkAsPlayed, hideMarkOld); - iStylusPopupMenu->SetItemDimmed(EPodcastMarkAsUnplayed, !hideMarkOld); + iStylusPopupMenu->SetItemDimmed(EPodcastMarkAsPlayed, hideMarkOld || !iShowNewShows); + iStylusPopupMenu->SetItemDimmed(EPodcastMarkAsUnplayed, !hideMarkOld || !iShowNewShows); iStylusPopupMenu->SetItemDimmed(EPodcastDownloadShow, hideDownloadShowCmd); iStylusPopupMenu->SetItemDimmed(EPodcastDeleteShow, hideDeleteShowCmd); diff -r a5e419ee2bb3 -r 31f9864a37ac engine/src/ShowEngine.cpp --- a/engine/src/ShowEngine.cpp Mon Nov 15 17:32:00 2010 +0000 +++ b/engine/src/ShowEngine.cpp Mon Nov 15 20:54:27 2010 +0000 @@ -934,7 +934,7 @@ &aItem.FileName(), aItem.Position().Int64(), aItem.PlayTime(), aItem.PlayState(), aItem.DownloadState(), aItem.FeedUid(), aItem.ShowSize(), aItem.TrackNo(), aItem.PubDate().Int64(), - aItem.ShowType(), aItem.LastError(), aItem.DeleteDate(), aItem.Uid()); + aItem.ShowType(), aItem.LastError(), aItem.DeleteDate().Int64(), aItem.Uid()); CleanupStack::PopAndDestroy(descBuf); CleanupStack::PopAndDestroy(titleBuf);