Various fixes newlist
authorSebastian Brannstrom <sebastianb@symbian.org>
Mon, 15 Nov 2010 20:54:27 +0000
branchnewlist
changeset 352 31f9864a37ac
parent 351 a5e419ee2bb3
child 353 33963ffd3082
Various fixes
application/data/PodcastClient_english.rls
application/data/PodcastShowsView.ra
application/data/icons/toolbar/mark_old_all.svg
application/group/icons.mk
application/src/PodcastListView.cpp
application/src/PodcastShowsView.cpp
engine/src/ShowEngine.cpp
--- 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"
--- 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;
 							}  
 						};
 					};
--- /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 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.1"
+   width="32"
+   height="32"
+   viewBox="0 0 32 32"
+   id="mark_x5F_new_x5F_all"
+   xml:space="preserve"><metadata
+   id="metadata3121"><rdf:RDF><cc:Work
+       rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+         rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+   id="defs3119">
+	
+	
+</defs>
+
+<g
+   id="g3181"><g
+     id="g3109">
+		<circle
+   cx="28.431"
+   cy="13.312"
+   r="1.485"
+   id="circle3111"
+   style="fill:#f1f2f2" />
+		<circle
+   cx="28.431"
+   cy="18.996"
+   r="1.4859999"
+   id="circle3113"
+   style="fill:#f1f2f2" />
+		<circle
+   cx="28.431"
+   cy="24.679001"
+   r="1.4859999"
+   id="circle3115"
+   style="fill:#f1f2f2" />
+	</g><g
+     transform="translate(-0.36692097,0.12209902)"
+     id="g3135"><path
+       d="M 24.07,12.059 16.857,11.599 14.241,6.651 H 14.236 L 13.664,5.565 C 13.263,4.805 12.689,4.816 12.331,5.598 l -1.279,2.775 0,0 -1.579,3.427 -6.355,1.102 -0.44,0.077 c -0.846,0.146 -0.987,0.643 -0.357,1.226 l 0.594,0.548 4.472,4.126 -0.408,2.854 -0.557,3.856 c -0.123,0.85 0.393,1.2 1.138,0.78 l 0.634,-0.356 0.002,0.003 3.145,-1.765 0.143,-0.081 1.992,-1.119 6.248,3.497 c 0.771,0.378 1.398,-0.024 1.23,-0.866 l -1.626,-7.127 5.26,-5.138 c 0.599,-0.615 0.334,-1.256 -0.518,-1.358 z m -7.262,8.612 c -0.39,0.389 -0.918,0.437 -1.263,0.094 l -2.119,-2.078 -2.087,2.078 C 10.997,21.109 10.466,21.06 10.079,20.672 9.743,20.338 9.585,19.817 9.99,19.413 l 2.075,-2.084 -2.116,-2.078 c -0.404,-0.402 -0.248,-0.923 0.09,-1.258 0.383,-0.387 0.913,-0.434 1.26,-0.091 l 2.117,2.076 2.089,-2.076 c 0.345,-0.343 0.875,-0.296 1.26,0.09 0.337,0.336 0.492,0.856 0.092,1.259 l -2.079,2.086 2.12,2.076 c 0.403,0.403 0.245,0.923 -0.09,1.258 z"
+       id="path3137"
+       style="fill:#f1f2f2" /></g></g></svg>
\ No newline at end of file
--- 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\
--- 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");
 	}
 
--- 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;i<iPodcastModel.ActiveShowList().Count();i++)
@@ -730,9 +730,7 @@
 			}
 		
 		TBool updatingState = iPodcastModel.FeedEngine().ClientState() != EIdle && iPodcastModel.FeedEngine().ActiveClientUid() == iPodcastModel.ActiveFeedInfo()->Uid();
-		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;i<iPodcastModel.ActiveShowList().Count();i++)
@@ -817,62 +820,64 @@
 	
 			toolbar->SetItemDimmed(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);
--- 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);