# HG changeset patch # User Sebastian Brannstrom # Date 1289739937 0 # Node ID 4b75876aa85aa9d7b269ac197258f639b25bef84 # Parent 9441fb8fd60d1fe84186cf4b57fd974f6127dd8b Added new shows list diff -r 9441fb8fd60d -r 4b75876aa85a application/data/Podcast.rss --- a/application/data/Podcast.rss Sat Nov 13 11:50:23 2010 +0000 +++ b/application/data/Podcast.rss Sun Nov 14 13:05:37 2010 +0000 @@ -95,16 +95,22 @@ type = ENaviDecoratorControlTabGroup; control = TAB_GROUP { - tab_width = EAknTabWidthWithTwoTabs; + tab_width = EAknTabWidthWithThreeTabs; active = 0; tabs = { - TAB - { - id = EPodcastTabFeeds; - + TAB + { + id = EPodcastTabFeeds; bmpfile = APPICON; bmpid = EMbmPodcastTab_feeds; bmpmask = EMbmPodcastTab_feeds_mask; + }, + TAB + { + id = EPodcastTabNew; + bmpfile = APPICON; + bmpid = EMbmPodcastTab_new; + bmpmask = EMbmPodcastTab_new_mask; }, TAB { diff -r 9441fb8fd60d -r 4b75876aa85a application/data/PodcastClient_english.rls --- a/application/data/PodcastClient_english.rls Sat Nov 13 11:50:23 2010 +0000 +++ b/application/data/PodcastClient_english.rls Sun Nov 14 13:05:37 2010 +0000 @@ -59,6 +59,7 @@ rls_string STRING_r_podcast_setting_useiap "Select access point" rls_string STRING_r_podcast_setting_iaplist "Access points" rls_string STRING_r_podcast_select_folder "Select folder" +//enable and disable automatic connections rls_string STRING_r_on "On" rls_string STRING_r_off "Off" rls_string STRING_r_podcast_setting_reset_db "Reset database" @@ -107,8 +108,8 @@ 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" -rls_string STRING_r_update_all_feeds_cmd "Update all" +rls_string STRING_r_update_feed_short_cmd "Update feed" +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..." @@ -127,10 +128,10 @@ // Show view -rls_string STRING_r_view_mark_as_played_cmd_short "Mark old" -rls_string STRING_r_view_mark_as_unplayed_cmd_short "Mark new" -rls_string STRING_r_view_download_show_cmd "Get" -rls_string STRING_r_view_delete_show_cmd "Delete" +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_download_show_cmd "Download show" +rls_string STRING_r_view_delete_show_cmd "Delete show" rls_string STRING_r_view_show_info_cmd "Info" rls_string STRING_r_error_playback_failed "Could not play show" @@ -139,7 +140,7 @@ rls_string STRING_r_view_resume_short_dls_cmd "Resume" rls_string STRING_r_view_stop_downloads_cmd "Suspend downloading" rls_string STRING_r_view_resume_downloads_cmd "Resume downloading" -rls_string STRING_r_view_remove_all_downloads_cmd_short "Remove all" +rls_string STRING_r_view_remove_all_downloads_cmd_short "Remove all downloads" rls_string STRING_r_view_remove_all_downloads_cmd "Remove all" rls_string STRING_r_clear_query "Remove all downloads?" rls_string STRING_r_view_remove_download_short_cmd "Remove" @@ -152,7 +153,14 @@ rls_string STRING_r_error_general "Error: General error %d" rls_string STRING_r_error_http "Error: HTTP error %d" rls_string STRING_r_error_disk_full "Error: Disk full" + rls_string STRING_r_add_url_or_search "Add feed" rls_string STRING_r_add_url "Enter address" rls_string STRING_r_add_search "Search for feed" rls_string STRING_r_search_feed_prompt "Enter search terms:" +rls_string STRING_r_new_shows "New shows" +rls_string STRING_r_download_queue "Download queue" +rls_string STRING_r_download_all_shows "Download all shows" +rls_string STRING_r_mark_all_old_query "Mark all shows old?" +rls_string STRING_r_download_all_query "Add all shows to download queue?" + diff -r 9441fb8fd60d -r 4b75876aa85a application/data/PodcastClient_spanish.rls --- a/application/data/PodcastClient_spanish.rls Sat Nov 13 11:50:23 2010 +0000 +++ b/application/data/PodcastClient_spanish.rls Sun Nov 14 13:05:37 2010 +0000 @@ -146,6 +146,8 @@ rls_string STRING_r_view_remove_all_downloads_cmd "Borrar la cola de descarga" rls_string STRING_r_clear_query "¿Quiere borrar la cola?" rls_string STRING_r_view_remove_download_short_cmd "Borrar" +rls_string STRING_r_view_move_up_short_cmd "Move up" +rls_string STRING_r_view_move_down_short_cmd "Move down" rls_string STRING_r_view_remove_download_cmd "Borrar descarga" rls_string STRING_r_error_notfound "Error: Servidor no fue hallado" @@ -153,3 +155,9 @@ rls_string STRING_r_error_general "Error: Error general %d" rls_string STRING_r_error_http "Error: error HTTP %d" rls_string STRING_r_error_disk_full "Error: No espacio en el disco" + +rls_string STRING_r_add_url_or_search "Add feed" +rls_string STRING_r_add_url "Enter address" +rls_string STRING_r_add_search "Search for feed" +rls_string STRING_r_search_feed_prompt "Enter search terms:" + diff -r 9441fb8fd60d -r 4b75876aa85a application/data/PodcastShowsView.ra --- a/application/data/PodcastShowsView.ra Sat Nov 13 11:50:23 2010 +0000 +++ b/application/data/PodcastShowsView.ra Sun Nov 14 13:05:37 2010 +0000 @@ -91,6 +91,25 @@ TBAR_CTRL { type = EAknCtButton; + id = EPodcastUpdateAllFeeds; + control = AVKON_BUTTON + { + states = + { + AVKON_BUTTON_STATE + { + bmpfile = APPICON; + bmpid = EMbmPodcastReload_all; + bmpmask = EMbmPodcastReload_all_mask; + //txt = STRING_r_update_feed_short_cmd; + helptxt = STRING_r_update_all_feeds_cmd; + } + }; + }; + }, + TBAR_CTRL + { + type = EAknCtButton; id = EPodcastUpdateFeed; control = AVKON_BUTTON { @@ -145,6 +164,25 @@ }; }; }, + TBAR_CTRL + { + type = EAknCtButton; + id = EPodcastDownloadAll; + control = AVKON_BUTTON + { + states = + { + AVKON_BUTTON_STATE + { + bmpfile = APPICON; + bmpid = EMbmPodcastDownload_all; + bmpmask = EMbmPodcastDownload_all_mask; + //txt = STRING_r_cancel_update_all_feeds_short_cmd; + helptxt = STRING_r_download_all_shows; + } + }; + }; + }, // we keep the download toolbar button in S^3, but always disable it // because there are drawing issues with only one item in the toolbar TBAR_CTRL diff -r 9441fb8fd60d -r 4b75876aa85a application/data/PodcastStrings.ra --- a/application/data/PodcastStrings.ra Sat Nov 13 11:50:23 2010 +0000 +++ b/application/data/PodcastStrings.ra Sun Nov 14 13:05:37 2010 +0000 @@ -78,3 +78,7 @@ RESOURCE TBUF r_about_text {buf = STRING_r_about_text_s60;} RESOURCE TBUF r_error_playback_failed {buf = STRING_r_error_playback_failed; } RESOURCE TBUF r_podcast_searchfeed_prompt {buf = STRING_r_search_feed_prompt;} +RESOURCE TBUF r_new_shows {buf = STRING_r_new_shows;} +RESOURCE TBUF r_download_queue {buf = STRING_r_download_queue;} +RESOURCE TBUF r_download_all_query {buf = STRING_r_download_all_query;} +RESOURCE TBUF r_mark_all_old_query {buf = STRING_r_mark_all_old_query;} diff -r 9441fb8fd60d -r 4b75876aa85a application/data/images/download_all.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/application/data/images/download_all.svg Sun Nov 14 13:05:37 2010 +0000 @@ -0,0 +1,41 @@ + + + +image/svg+xml + + \ No newline at end of file diff -r 9441fb8fd60d -r 4b75876aa85a application/data/images/tab_new.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/application/data/images/tab_new.svg Sun Nov 14 13:05:37 2010 +0000 @@ -0,0 +1,12 @@ + + + + + + diff -r 9441fb8fd60d -r 4b75876aa85a application/group/bld.inf --- a/application/group/bld.inf Sat Nov 13 11:50:23 2010 +0000 +++ b/application/group/bld.inf Sun Nov 14 13:05:37 2010 +0000 @@ -63,6 +63,7 @@ -c16,1 remove.svg\ -c16,1 remove_all.svg\ -c16,1 download.svg\ + -c16,1 download_all.svg\ -c16,1 markold.svg\ -c16,1 marknew.svg\ -c16,1 markold_all.svg\ @@ -70,5 +71,6 @@ -c16,1 tab_queue.svg\ -c16,1 tab_queue1.svg\ -c16,1 tab_queue2.svg\ - -c16,1 tab_queue3.svg + -c16,1 tab_queue3.svg\ + -c16,1 tab_new.svg END diff -r 9441fb8fd60d -r 4b75876aa85a application/inc/Podcast.hrh --- a/application/inc/Podcast.hrh Sat Nov 13 11:50:23 2010 +0000 +++ b/application/inc/Podcast.hrh Sun Nov 14 13:05:37 2010 +0000 @@ -53,6 +53,7 @@ EPodcastMarkAsPlayed, EPodcastMarkAsUnplayed, EPodcastShowInfo, + EPodcastDownloadAll, // Common commands EPodcastBack, EPodcastSettings, @@ -64,8 +65,9 @@ EPodcastAddSearchResult, EPodcastResetDb, EPodcastTabFeeds, - EPodcastTabQueue -}; + EPodcastTabQueue, + EPodcastTabNew + }; enum TPodcastControl { diff -r 9441fb8fd60d -r 4b75876aa85a application/inc/PodcastAppui.h --- a/application/inc/PodcastAppui.h Sat Nov 13 11:50:23 2010 +0000 +++ b/application/inc/PodcastAppui.h Sun Nov 14 13:05:37 2010 +0000 @@ -41,8 +41,11 @@ const TUid KUidPodcastSearchViewID = {0x00000004}; const TUid KUidPodcastSettingsViewID = {0x00000005}; +const TUid KUidShowNewShows = {0x00000001}; + const TInt KTabIdFeeds = 0; -const TInt KTabIdQueue = 1; +const TInt KTabIdNew = 1; +const TInt KTabIdQueue = 2; const TInt KTimeoutPrio = CActive::EPriorityStandard; @@ -121,6 +124,7 @@ void NaviSetTextL(TInt aResourceId); void NaviShowTabGroupL(); void GetErrorTextL(TDes &aErrorMessage, TInt aErrorCode); + void SetTabsDimmed(TBool aDimmed); private: // From MEikMenuObserver diff -r 9441fb8fd60d -r 4b75876aa85a application/inc/PodcastQueueView.h --- a/application/inc/PodcastQueueView.h Sat Nov 13 11:50:23 2010 +0000 +++ b/application/inc/PodcastQueueView.h Sun Nov 14 13:05:37 2010 +0000 @@ -79,6 +79,7 @@ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); + void UpdateViewTitleL(); private: TBool iDontUpdateList; }; diff -r 9441fb8fd60d -r 4b75876aa85a application/inc/PodcastShowsView.h --- a/application/inc/PodcastShowsView.h Sat Nov 13 11:50:23 2010 +0000 +++ b/application/inc/PodcastShowsView.h Sun Nov 14 13:05:37 2010 +0000 @@ -108,6 +108,7 @@ void HandleDeleteShow(); void UpdateViewTitleL(); void GetShowErrorText(TDes &aErrorMessage, TInt aErrorCode); + void HandleDownloadAllL(); protected: @@ -115,6 +116,7 @@ TBool iProgressAdded; TInt iLastImageHandlerError; TBool iSetTitlebarImage; + TBool iShowNewShows; }; #endif // PODCASTSHOWSVIEWH diff -r 9441fb8fd60d -r 4b75876aa85a application/inc/buildno.h --- a/application/inc/buildno.h Sat Nov 13 11:50:23 2010 +0000 +++ b/application/inc/buildno.h Sun Nov 14 13:05:37 2010 +0000 @@ -1,2 +1,2 @@ // Build number generated by increment_buildno.py, do not edit manually -#define BUILD_NO 9 \ No newline at end of file +#define BUILD_NO 12 \ No newline at end of file diff -r 9441fb8fd60d -r 4b75876aa85a application/sis/buildno.txt --- a/application/sis/buildno.txt Sat Nov 13 11:50:23 2010 +0000 +++ b/application/sis/buildno.txt Sun Nov 14 13:05:37 2010 +0000 @@ -1,1 +1,1 @@ -9 \ No newline at end of file +12 \ No newline at end of file diff -r 9441fb8fd60d -r 4b75876aa85a application/sis/podcatcher_udeb.pkg --- a/application/sis/podcatcher_udeb.pkg Sat Nov 13 11:50:23 2010 +0000 +++ b/application/sis/podcatcher_udeb.pkg Sun Nov 14 13:05:37 2010 +0000 @@ -1,7 +1,7 @@ &EN,SP :"Symbian Foundation" %{"Podcatcher","Podcatcher"} -#{"Podcatcher","Podcatcher"},(0xA0009D00), 1, 00, 9, TYPE=SA +#{"Podcatcher","Podcatcher"},(0xA0009D00), 1, 00, 12, TYPE=SA ;Supports Symbian^3 [0x20022E6D], 0, 0, 0, {"Series60ProductID","Series60ProductID"} diff -r 9441fb8fd60d -r 4b75876aa85a application/sis/podcatcher_udeb.sis Binary file application/sis/podcatcher_udeb.sis has changed diff -r 9441fb8fd60d -r 4b75876aa85a application/sis/podcatcher_udeb_signed.sis Binary file application/sis/podcatcher_udeb_signed.sis has changed diff -r 9441fb8fd60d -r 4b75876aa85a application/sis/podcatcher_urel.pkg --- a/application/sis/podcatcher_urel.pkg Sat Nov 13 11:50:23 2010 +0000 +++ b/application/sis/podcatcher_urel.pkg Sun Nov 14 13:05:37 2010 +0000 @@ -1,7 +1,7 @@ &EN,SP :"Symbian Foundation" %{"Podcatcher","Podcatcher"} -#{"Podcatcher","Podcatcher"},(0xA0009D00), 0, 90, 9, TYPE=SA +#{"Podcatcher","Podcatcher"},(0xA0009D00), 0, 90, 12, TYPE=SA ;Supports Symbian^3 [0x20022E6D], 0, 0, 0, {"Series60ProductID","Series60ProductID"} diff -r 9441fb8fd60d -r 4b75876aa85a application/src/PodcastAppui.cpp --- a/application/src/PodcastAppui.cpp Sat Nov 13 11:50:23 2010 +0000 +++ b/application/src/PodcastAppui.cpp Sun Nov 14 13:05:37 2010 +0000 @@ -210,10 +210,16 @@ { iTabGroup = STATIC_CAST(CAknTabGroup*, iNaviPane->ResourceDecorator()->DecoratedControl()); iTabGroup->SetObserver(this); + iNaviStyle = ENaviTabGroup; UpdateQueueTabL(iPodcastModel->ShowEngine().GetNumDownloadingShows()); } +void CPodcastAppUi::SetTabsDimmed(TBool aDimmed) + { + iTabGroup->SetDimmed(aDimmed); + } + void CPodcastAppUi::TabChangedL (TInt aIndex) { DP("CPodcastListView::TabChangedL "); @@ -227,12 +233,18 @@ if (iFeedView->ViewingShows()) { newview = KUidPodcastShowsViewID; + messageUid = TUid::Uid(2); } else { newview = KUidPodcastFeedViewID; } } + else if (aIndex == KTabIdNew) + { + newview = KUidPodcastShowsViewID; + messageUid = KUidShowNewShows; + } else if (aIndex == KTabIdQueue) { newview = KUidPodcastQueueViewID; diff -r 9441fb8fd60d -r 4b75876aa85a application/src/PodcastListView.cpp --- a/application/src/PodcastListView.cpp Sat Nov 13 11:50:23 2010 +0000 +++ b/application/src/PodcastListView.cpp Sun Nov 14 13:05:37 2010 +0000 @@ -214,10 +214,12 @@ CPodcastListContainer::~CPodcastListContainer() { + DP("CPodcastListContainer::~CPodcastListContainer BEGIN"); iListboxLandscape->ItemDrawer()->ColumnData()->SetIconArray(NULL); delete iListboxPortrait; delete iListboxLandscape; delete iBgContext; + DP("CPodcastListContainer::~CPodcastListContainer END"); } void CPodcastListContainer::SetEmptyText(const TDesC &aText) @@ -477,3 +479,4 @@ } return EKeyWasNotConsumed; } + diff -r 9441fb8fd60d -r 4b75876aa85a application/src/PodcastQueueView.cpp --- a/application/src/PodcastQueueView.cpp Sat Nov 13 11:50:23 2010 +0000 +++ b/application/src/PodcastQueueView.cpp Sun Nov 14 13:05:37 2010 +0000 @@ -31,6 +31,7 @@ #include #include #include +#include #define KMaxMessageLength 200 @@ -115,7 +116,7 @@ CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage); iPreviousView = aPrevViewId; - + UpdateViewTitleL(); UpdateFeedUpdateStateL(); UpdateToolbar(); DP("CPodcastQueueView::DoActivateL END"); @@ -144,6 +145,7 @@ void CPodcastQueueView::UpdateListboxItemsL() { + DP("CPodcastQueueView::UpdateListboxItemsL BEGIN"); if (iListContainer->IsVisible() && !iDontUpdateList) { TListItemProperties itemProps; @@ -213,6 +215,7 @@ } } } + DP("CPodcastQueueView::UpdateListboxItemsL END"); } /** @@ -370,3 +373,13 @@ toolbar->SetItemDimmed(EPodcastRemoveDownload, itemCnt == 0, ETrue); } } + +void CPodcastQueueView::UpdateViewTitleL() + { + CAknTitlePane* titlePane = static_cast + ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); + + HBufC *title = iEikonEnv->AllocReadResourceLC(R_DOWNLOAD_QUEUE); + titlePane->SetTextL(*title); + CleanupStack::PopAndDestroy(title); + } diff -r 9441fb8fd60d -r 4b75876aa85a application/src/PodcastSearchView.cpp --- a/application/src/PodcastSearchView.cpp Sat Nov 13 11:50:23 2010 +0000 +++ b/application/src/PodcastSearchView.cpp Sun Nov 14 13:05:37 2010 +0000 @@ -118,6 +118,7 @@ titlePane->SetTextL(*text , ETrue ); CleanupStack::PopAndDestroy(text); UpdateListboxItemsL(); + ((CPodcastAppUi*)AppUi())->SetTabsDimmed(ETrue); } void CPodcastSearchView::DoDeactivate() @@ -128,6 +129,7 @@ ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); titlePane->SetTextToDefaultL(); + ((CPodcastAppUi*)AppUi())->SetTabsDimmed(EFalse); } diff -r 9441fb8fd60d -r 4b75876aa85a application/src/PodcastSettingsView.cpp --- a/application/src/PodcastSettingsView.cpp Sat Nov 13 11:50:23 2010 +0000 +++ b/application/src/PodcastSettingsView.cpp Sun Nov 14 13:05:37 2010 +0000 @@ -24,6 +24,7 @@ #include #include #include "SettingsEngine.h" +#include #include #include @@ -487,10 +488,13 @@ DP("Creating navipane"); iNaviPane =( CAknNavigationControlContainer * ) StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ); - HBufC *titleBuffer = iEikonEnv->AllocReadResourceL(R_SETTINGS_TITLE); - iNaviDecorator = iNaviPane->CreateNavigationLabelL(*titleBuffer); - delete titleBuffer; - + CAknTitlePane* titlePane = static_cast + ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); + + HBufC *titleBuffer = iEikonEnv->AllocReadResourceLC(R_SETTINGS_TITLE); + titlePane->SetTextL(*titleBuffer); + CleanupStack::PopAndDestroy(titleBuffer); + DP("Updating listbox"); AppUi()->AddToStackL(*this, iListbox); iListbox->UpdateSettingVisibility(); @@ -503,6 +507,7 @@ iNaviPane->PushL(*iNaviDecorator); } + ((CPodcastAppUi*)AppUi())->SetTabsDimmed(ETrue); DP("CPodcastSettingsView::DoActivateL END"); } @@ -522,6 +527,8 @@ delete iNaviDecorator; iNaviDecorator = NULL; } + + ((CPodcastAppUi*)AppUi())->SetTabsDimmed(EFalse); DP("CPodcastSettingsView::DoDeactivate END"); } diff -r 9441fb8fd60d -r 4b75876aa85a application/src/PodcastShowsView.cpp --- a/application/src/PodcastShowsView.cpp Sat Nov 13 11:50:23 2010 +0000 +++ b/application/src/PodcastShowsView.cpp Sun Nov 14 13:05:37 2010 +0000 @@ -207,6 +207,21 @@ iPreviousView = TVwsViewId(KUidPodcast, KUidPodcastFeedViewID); + iShowNewShows = (aCustomMessageId.iUid == 1); + + if (iShowNewShows) + { + CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current(); + cba->SetCommandSetL(R_PODCAST_CBA); + cba->DrawDeferred(); + } + else + { + CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current(); + cba->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_BACK); + cba->DrawDeferred(); + } + UpdateViewTitleL(); UpdateFeedUpdateStateL(); UpdateToolbar(); @@ -495,13 +510,21 @@ void CPodcastShowsView::UpdateListboxItemsL() { + DP("CPodcastShowsView::UpdateListboxItemsL BEGIN"); if (iListContainer->IsVisible()) { TListItemProperties itemProps; TInt len = 0; - iPodcastModel.GetShowsByFeedL(iPodcastModel.ActiveFeedInfo()->Uid()); - + if (iShowNewShows) + { + iPodcastModel.GetNewShowsL(); + } + else + { + iPodcastModel.GetShowsByFeedL(iPodcastModel.ActiveFeedInfo()->Uid()); + } + RShowInfoArray &fItems = iPodcastModel.ActiveShowList(); len = fItems.Count(); @@ -565,6 +588,7 @@ } } } + DP("CPodcastShowsView::UpdateListboxItemsL END"); } /** @@ -578,17 +602,32 @@ { case EPodcastMarkAsPlayed: HandleSetShowPlayedL(ETrue); + if (iShowNewShows) UpdateListboxItemsL(); break; case EPodcastMarkAsUnplayed: HandleSetShowPlayedL(EFalse); + if (iShowNewShows) UpdateListboxItemsL(); break; case EPodcastMarkAllPlayed: + { + if (iShowNewShows) { + TBuf msg; + iEikonEnv->ReadResourceL(msg, R_MARK_ALL_OLD_QUERY); + if (!ShowQueryMessageL(msg)) + { + break; + } + } iPodcastModel.MarkSelectionPlayedL(); UpdateListboxItemsL(); + } break; case EPodcastDeleteShow: HandleDeleteShowL(); break; + case EPodcastDownloadAll: + HandleDownloadAllL(); + break; case EPodcastDownloadShow: { TInt index = iListContainer->Listbox()->CurrentItemIndex(); @@ -617,6 +656,11 @@ } } break; + case EPodcastUpdateAllFeeds: + { + iPodcastModel.FeedEngine().UpdateAllFeedsL(); + UpdateToolbar(); + }break; case EPodcastCancelUpdateAllFeeds: iPodcastModel.FeedEngine().CancelUpdateAllFeeds(); break; @@ -683,26 +727,44 @@ TBool updatingState = iPodcastModel.FeedEngine().ClientState() != EIdle && iPodcastModel.ActiveFeedInfo() && iPodcastModel.FeedEngine().ActiveClientUid() == iPodcastModel.ActiveFeedInfo()->Uid(); - - toolbar->HideItem(EPodcastUpdateFeed, updatingState, ETrue ); + + if (iShowNewShows) + { + updatingState = iPodcastModel.FeedEngine().ClientState(); + toolbar->HideItem(EPodcastUpdateFeed, ETrue, ETrue ); + toolbar->HideItem(EPodcastUpdateAllFeeds, updatingState, ETrue ); + } + else + { + toolbar->HideItem(EPodcastUpdateFeed, updatingState, ETrue ); + toolbar->HideItem(EPodcastUpdateAllFeeds, ETrue, ETrue ); + } + toolbar->HideItem(EPodcastCancelUpdateAllFeeds, !updatingState, ETrue ); + // there seems to be drawing bugs in the toolbar if there is only // one or two buttons defined in the resource, so we have download // there but always hidden toolbar->HideItem(EPodcastDownloadShow, ETrue, ETrue ); + toolbar->HideItem(EPodcastDownloadAll, !iShowNewShows, ETrue); TBool showMarkAllPlayed = EFalse; + TBool showDownloadAll = EFalse; for (int i=0;iPlayState() == ENeverPlayed) { showMarkAllPlayed = ETrue; - break; + } + if (info->DownloadState() == ENotDownloaded) + { + showDownloadAll = ETrue; } - } + toolbar->SetItemDimmed(EPodcastMarkAllPlayed, !showMarkAllPlayed, ETrue); + toolbar->SetItemDimmed(EPodcastDownloadAll, !showDownloadAll, ETrue); } } @@ -748,6 +810,27 @@ } } +void CPodcastShowsView::HandleDownloadAllL() + { + + TBuf msg; + iEikonEnv->ReadResourceL(msg, R_DOWNLOAD_ALL_QUERY); + if (!ShowQueryMessageL(msg)) + { + return; + } + + for (int i=0;iDownloadState() == ENotDownloaded) + { + TRAP_IGNORE(iPodcastModel.ShowEngine().AddDownloadL(*info)); + } + } + } + void CPodcastShowsView::DownloadQueueUpdatedL(TInt aDownloadingShows, TInt aQueuedShows) { ((CPodcastAppUi*)AppUi())->UpdateQueueTabL(aDownloadingShows+aQueuedShows); @@ -766,7 +849,7 @@ CAknTitlePane* titlePane = static_cast ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); - TBool updatingState = iPodcastModel.FeedEngine().ClientState() != EIdle && + TBool updatingState = iPodcastModel.FeedEngine().ClientState() != EIdle && iPodcastModel.ActiveFeedInfo() && iPodcastModel.FeedEngine().ActiveClientUid() == iPodcastModel.ActiveFeedInfo()->Uid(); if (updatingState) { @@ -775,7 +858,13 @@ SetEmptyTextL(R_PODCAST_EMPTY_LIST); } - if(iPodcastModel.ActiveFeedInfo()) + if(iShowNewShows) + { + HBufC *title = iEikonEnv->AllocReadResourceLC(R_NEW_SHOWS); + titlePane->SetTextL(*title); + CleanupStack::PopAndDestroy(title); + } + else if(iPodcastModel.ActiveFeedInfo()) { if (iPodcastModel.ActiveFeedInfo()->Title() != KNullDesC) { diff -r 9441fb8fd60d -r 4b75876aa85a engine/BWINS/podcastengineu.def --- a/engine/BWINS/podcastengineu.def Sat Nov 13 11:50:23 2010 +0000 +++ b/engine/BWINS/podcastengineu.def Sun Nov 14 13:05:37 2010 +0000 @@ -166,4 +166,7 @@ ?MoveDownloadUpL@CShowEngine@@QAEXI@Z @ 165 NONAME ; void CShowEngine::MoveDownloadUpL(unsigned int) ?MoveDownloadDownL@CShowEngine@@QAEXI@Z @ 166 NONAME ; void CShowEngine::MoveDownloadDownL(unsigned int) ?RemoveObserver@CConnectionEngine@@QAEXPAVMConnectionObserver@@@Z @ 167 NONAME ; void CConnectionEngine::RemoveObserver(class MConnectionObserver *) + ?FeedFileSize@CFeedInfo@@QBEHXZ @ 168 NONAME ; int CFeedInfo::FeedFileSize(void) const + ?SetFeedFileSize@CFeedInfo@@QAEXH@Z @ 169 NONAME ; void CFeedInfo::SetFeedFileSize(int) + ?GetNewShowsL@CPodcastModel@@QAEXXZ @ 170 NONAME ; void CPodcastModel::GetNewShowsL(void) diff -r 9441fb8fd60d -r 4b75876aa85a engine/eabi/podcastengineu.def --- a/engine/eabi/podcastengineu.def Sat Nov 13 11:50:23 2010 +0000 +++ b/engine/eabi/podcastengineu.def Sun Nov 14 13:05:37 2010 +0000 @@ -205,4 +205,7 @@ _ZN13CPodcastModelD1Ev @ 204 NONAME _ZN13CPodcastModelD2Ev @ 205 NONAME _ZN17CConnectionEngine14RemoveObserverEP19MConnectionObserver @ 206 NONAME + _ZN13CPodcastModel12GetNewShowsLEv @ 207 NONAME + _ZN9CFeedInfo15SetFeedFileSizeEi @ 208 NONAME + _ZNK9CFeedInfo12FeedFileSizeEv @ 209 NONAME diff -r 9441fb8fd60d -r 4b75876aa85a engine/inc/PodcastModel.h --- a/engine/inc/PodcastModel.h Sat Nov 13 11:50:23 2010 +0000 +++ b/engine/inc/PodcastModel.h Sun Nov 14 13:05:37 2010 +0000 @@ -91,6 +91,7 @@ IMPORT_C void GetShowsDownloadingL(); IMPORT_C void GetShowsByFeedL(TUint aFeedUid); + IMPORT_C void GetNewShowsL(); IMPORT_C void MarkSelectionPlayedL(); TInt FindActiveShowByUid(TUint aUid); @@ -105,8 +106,7 @@ void ImageOperationCompleteL(TInt aError, TUint aHandle, CPodcastModel& aPodcastModel); private: // Functions from base classes - - /** + /** * From MAknServerAppExitObserver. * Handles the exit of a connected server application. */ diff -r 9441fb8fd60d -r 4b75876aa85a engine/src/FeedEngine.cpp --- a/engine/src/FeedEngine.cpp Sat Nov 13 11:50:23 2010 +0000 +++ b/engine/src/FeedEngine.cpp Sun Nov 14 13:05:37 2010 +0000 @@ -677,7 +677,6 @@ // now the image has been downloaded, so we set it again in the FeedInfo to start // converting it HBufC *fileNameCopy = iActiveFeed->ImageFileName().AllocLC(); - DP1("fnc=%S", fileNameCopy); TRAP_IGNORE(iActiveFeed->SetImageFileNameL(*fileNameCopy, &iPodcastModel)); CleanupStack::PopAndDestroy(fileNameCopy); } diff -r 9441fb8fd60d -r 4b75876aa85a engine/src/PodcastModel.cpp --- a/engine/src/PodcastModel.cpp Sat Nov 13 11:50:23 2010 +0000 +++ b/engine/src/PodcastModel.cpp Sun Nov 14 13:05:37 2010 +0000 @@ -351,8 +351,7 @@ TFileName dbFileName; dbFileName.Copy(iSettingsEngine->PrivatePath()); dbFileName.Append(KDBFileName); - - DP1("dbFileName=%S", &dbFileName); + if (!BaflUtils::FileExists(iFsSession, dbFileName)) { User::Leave(KErrNotFound); @@ -479,6 +478,12 @@ iShowEngine->GetShowsByFeedL(iActiveShowList, aFeedUid); } +EXPORT_C void CPodcastModel::GetNewShowsL() + { + iActiveShowList.ResetAndDestroy(); + iShowEngine->GetNewShowsL(iActiveShowList); + } + EXPORT_C void CPodcastModel::MarkSelectionPlayedL() { for (int i=0;i