Added Mark all played button in show view RCL_3
authorSebastian Brannstrom <sebastianb@symbian.org>
Mon, 25 Oct 2010 13:58:51 +0100
branchRCL_3
changeset 290 0d5e69a7cda9
parent 286 91d73b84416c
child 291 2f62fe179bbb
Added Mark all played button in show view
application/data/PodcastShowsView.ra
application/group/bld.inf
application/inc/buildno.h
application/sis/buildno.txt
application/sis/podcatcher_udeb.pkg
application/sis/podcatcher_urel.pkg
application/src/PodcastShowsView.cpp
--- a/application/data/PodcastShowsView.ra	Mon Oct 25 10:19:55 2010 +0100
+++ b/application/data/PodcastShowsView.ra	Mon Oct 25 13:58:51 2010 +0100
@@ -35,11 +35,6 @@
     {
     items =
         {
-        MENU_ITEM
-			{
-			command = EPodcastMarkAllPlayed;
-			txt = STRING_r_view_mark_all_played_cmd;
-			},
 		MENU_ITEM
 			{
 			command = EPodcastAbout;
@@ -131,6 +126,25 @@
                         };
                     };
                 },
+                TBAR_CTRL
+                    {
+                    type = EAknCtButton;
+                    id = EPodcastMarkAllPlayed;
+                    control = AVKON_BUTTON
+                        {
+                        states =
+                            {
+                            AVKON_BUTTON_STATE
+                                {
+                                bmpfile = APPICON;
+                                bmpid = EMbmPodcastMarkold_all;
+                                bmpmask = EMbmPodcastMarkold_all_mask;
+                                //txt = STRING_r_cancel_update_all_feeds_short_cmd;
+                                helptxt = STRING_r_view_mark_all_played_cmd;
+                               }  
+                            };
+                        };
+                    },
 // 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
--- a/application/group/bld.inf	Mon Oct 25 10:19:55 2010 +0100
+++ b/application/group/bld.inf	Mon Oct 25 13:58:51 2010 +0100
@@ -65,6 +65,7 @@
 	-c16,1 download.svg\
 	-c16,1 markold.svg\
 	-c16,1 marknew.svg\
+	-c16,1 markold_all.svg\
 	-c16,1 tab_feeds.svg\
 	-c16,1 tab_queue.svg\
 	-c16,1 tab_queue1.svg\
--- a/application/inc/buildno.h	Mon Oct 25 10:19:55 2010 +0100
+++ b/application/inc/buildno.h	Mon Oct 25 13:58:51 2010 +0100
@@ -1,2 +1,2 @@
 // Build number generated by increment_buildno.py, do not edit manually
-#define BUILD_NO 7
\ No newline at end of file
+#define BUILD_NO 8
\ No newline at end of file
--- a/application/sis/buildno.txt	Mon Oct 25 10:19:55 2010 +0100
+++ b/application/sis/buildno.txt	Mon Oct 25 13:58:51 2010 +0100
@@ -1,1 +1,1 @@
-7
\ No newline at end of file
+8
\ No newline at end of file
--- a/application/sis/podcatcher_udeb.pkg	Mon Oct 25 10:19:55 2010 +0100
+++ b/application/sis/podcatcher_udeb.pkg	Mon Oct 25 13:58:51 2010 +0100
@@ -1,7 +1,7 @@
 &EN,SP
 :"Symbian Foundation"
 %{"Podcatcher","Podcatcher"}
-#{"Podcatcher","Podcatcher"},(0xA0009D00), 1, 00, 7, TYPE=SA
+#{"Podcatcher","Podcatcher"},(0xA0009D00), 1, 00, 8, TYPE=SA
 
 ;Supports Symbian^3
 [0x20022E6D], 0, 0, 0, {"Series60ProductID","Series60ProductID"}
--- a/application/sis/podcatcher_urel.pkg	Mon Oct 25 10:19:55 2010 +0100
+++ b/application/sis/podcatcher_urel.pkg	Mon Oct 25 13:58:51 2010 +0100
@@ -1,7 +1,7 @@
 &EN,SP
 :"Symbian Foundation"
 %{"Podcatcher","Podcatcher"}
-#{"Podcatcher","Podcatcher"},(0xA0009D00), 0, 90, 7, TYPE=SA
+#{"Podcatcher","Podcatcher"},(0xA0009D00), 0, 90, 8, TYPE=SA
 
 ;Supports Symbian^3
 [0x20022E6D], 0, 0, 0, {"Series60ProductID","Series60ProductID"}
--- a/application/src/PodcastShowsView.cpp	Mon Oct 25 10:19:55 2010 +0100
+++ b/application/src/PodcastShowsView.cpp	Mon Oct 25 13:58:51 2010 +0100
@@ -632,6 +632,18 @@
 
 		TInt index = iListContainer->Listbox()->CurrentItemIndex();
 		
+		TBool showMarkAllPlayed = EFalse;
+		for (int i=0;i<iPodcastModel.ActiveShowList().Count();i++)
+			{
+			CShowInfo* info = iPodcastModel.ActiveShowList()[i];
+			if (info->PlayState() == ENeverPlayed)
+				{
+				showMarkAllPlayed = ETrue;
+				break;
+				}
+			
+			}
+		
 		if (index >= 0 && index < iPodcastModel.ActiveShowList().Count())
 			{			
 			CShowInfo* info = iPodcastModel.ActiveShowList()[index];
@@ -645,6 +657,7 @@
 						
 			aMenuPane->SetItemDimmed(EPodcastDownloadShow, hideDownloadShowCmd);
 			aMenuPane->SetItemDimmed(EPodcastDeleteShow, hideDeleteShowCmd);
+			aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, !showMarkAllPlayed);
 			}
 		}
 }
@@ -684,6 +697,19 @@
 		// one or two buttons defined in the resource, so we have download
 		// there but always hidden
 		toolbar->HideItem(EPodcastDownloadShow, ETrue, ETrue );
+		
+		TBool showMarkAllPlayed = EFalse;
+		for (int i=0;i<iPodcastModel.ActiveShowList().Count();i++)
+			{
+			CShowInfo* info = iPodcastModel.ActiveShowList()[i];
+			if (info->PlayState() == ENeverPlayed)
+				{
+				showMarkAllPlayed = ETrue;
+				break;
+				}
+			
+			}
+		toolbar->SetItemDimmed(EPodcastMarkAllPlayed, !showMarkAllPlayed, ETrue);
 	}
 }