Author: duncan
Date: Tue Oct 23 06:58:40 2007
New Revision: 10036

Log:
[ 1818126 ] Add Keep-Watched icons to Recordings Manager
Patch from Adam Charrett applied


Added:
   branches/rel-1-7/freevo/share/icons/status/series_keep_watched.png   
(contents, props changed)
   branches/rel-1-7/freevo/share/icons/status/television_keep_watched.png   
(contents, props changed)
   branches/rel-1/freevo/share/icons/status/series_keep_watched.png   
(contents, props changed)
   branches/rel-1/freevo/share/icons/status/television_keep_watched.png   
(contents, props changed)
Modified:
   branches/rel-1-7/freevo/share/icons/status/series_keep.png
   branches/rel-1-7/freevo/src/tv/plugins/recordings_manager.py
   branches/rel-1/freevo/share/icons/status/series_keep.png
   branches/rel-1/freevo/src/tv/plugins/recordings_manager.py

Modified: branches/rel-1-7/freevo/share/icons/status/series_keep.png
==============================================================================
Binary files. No diff available.

Added: branches/rel-1-7/freevo/share/icons/status/series_keep_watched.png
==============================================================================
Binary file. No diff available.

Added: branches/rel-1-7/freevo/share/icons/status/television_keep_watched.png
==============================================================================
Binary file. No diff available.

Modified: branches/rel-1-7/freevo/src/tv/plugins/recordings_manager.py
==============================================================================
--- branches/rel-1-7/freevo/src/tv/plugins/recordings_manager.py        
(original)
+++ branches/rel-1-7/freevo/src/tv/plugins/recordings_manager.py        Tue Oct 
23 06:58:40 2007
@@ -79,13 +79,14 @@
                         'Unwatched, Watched, Keep',
                         'Keep, Unwatched, Watched']
 
-STATUS_ORDERS = [ ('2', '1', '0'),
-                  ('2', '0', '1'),
-                  ('1', '2', '0')]
-
-STATUS_ORDER_UNWATCHED = 0
-STATUS_ORDER_KEEP      = 1
-STATUS_ORDER_WATCHED   = 2
+STATUS_ORDERS = [ ('3', '2', '0', '1'),
+                  ('3', '0', '1', '2'),
+                  ('1', '3', '0', '2')]
+
+STATUS_ORDER_UNWATCHED    = 0
+STATUS_ORDER_KEEP         = 1
+STATUS_ORDER_WATCHED      = 2
+STATUS_ORDER_KEEP_WATCHED = 3
 
 sorting = 0
 sorting_reversed = False
@@ -523,7 +524,9 @@
         Set the image displayed next to the menu item text, based on whether
         the program is being kept or has been watched.
         """
-        if self.keep:
+        if self.keep and self.watched:
+            self.icon = config.ICON_DIR + '/status/television_keep_watched.png'
+        elif self.keep:
             self.icon = config.ICON_DIR + '/status/television_keep.png'
         elif self.watched:
             self.icon = config.ICON_DIR + '/status/television_watched.png'
@@ -719,7 +722,9 @@
                 keep = False
             if not item.watched:
                 watched = False
-        if keep:
+        if keep and watched:
+            self.icon = config.ICON_DIR + '/status/series_keep_watched.png'
+        elif keep:
             self.icon = config.ICON_DIR + '/status/series_keep.png'
         elif watched:
             self.icon = config.ICON_DIR + '/status/series_watched.png'
@@ -977,7 +982,9 @@
     orders = STATUS_ORDERS[status_order]
 
     order = orders[STATUS_ORDER_UNWATCHED]
-    if keep:
+    if keep and watched:
+        order = orders[STATUS_ORDER_KEEP_WATCHED]
+    elif keep:
         order = orders[STATUS_ORDER_KEEP]
     elif watched:
         order = orders[STATUS_ORDER_WATCHED]

Modified: branches/rel-1/freevo/share/icons/status/series_keep.png
==============================================================================
Binary files. No diff available.

Added: branches/rel-1/freevo/share/icons/status/series_keep_watched.png
==============================================================================
Binary file. No diff available.

Added: branches/rel-1/freevo/share/icons/status/television_keep_watched.png
==============================================================================
Binary file. No diff available.

Modified: branches/rel-1/freevo/src/tv/plugins/recordings_manager.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/recordings_manager.py  (original)
+++ branches/rel-1/freevo/src/tv/plugins/recordings_manager.py  Tue Oct 23 
06:58:40 2007
@@ -79,13 +79,14 @@
                         'Unwatched, Watched, Keep',
                         'Keep, Unwatched, Watched']
 
-STATUS_ORDERS = [ ('2', '1', '0'),
-                  ('2', '0', '1'),
-                  ('1', '2', '0')]
-
-STATUS_ORDER_UNWATCHED = 0
-STATUS_ORDER_KEEP      = 1
-STATUS_ORDER_WATCHED   = 2
+STATUS_ORDERS = [ ('3', '2', '0', '1'),
+                  ('3', '0', '1', '2'),
+                  ('1', '3', '0', '2')]
+
+STATUS_ORDER_UNWATCHED    = 0
+STATUS_ORDER_KEEP         = 1
+STATUS_ORDER_WATCHED      = 2
+STATUS_ORDER_KEEP_WATCHED = 3
 
 sorting = 0
 sorting_reversed = False
@@ -523,7 +524,9 @@
         Set the image displayed next to the menu item text, based on whether
         the program is being kept or has been watched.
         """
-        if self.keep:
+        if self.keep and self.watched:
+            self.icon = config.ICON_DIR + '/status/television_keep_watched.png'
+        elif self.keep:
             self.icon = config.ICON_DIR + '/status/television_keep.png'
         elif self.watched:
             self.icon = config.ICON_DIR + '/status/television_watched.png'
@@ -719,7 +722,9 @@
                 keep = False
             if not item.watched:
                 watched = False
-        if keep:
+        if keep and watched:
+            self.icon = config.ICON_DIR + '/status/series_keep_watched.png'
+        elif keep:
             self.icon = config.ICON_DIR + '/status/series_keep.png'
         elif watched:
             self.icon = config.ICON_DIR + '/status/series_watched.png'
@@ -977,7 +982,9 @@
     orders = STATUS_ORDERS[status_order]
 
     order = orders[STATUS_ORDER_UNWATCHED]
-    if keep:
+    if keep and watched:
+        order = orders[STATUS_ORDER_KEEP_WATCHED]
+    elif keep:
         order = orders[STATUS_ORDER_KEEP]
     elif watched:
         order = orders[STATUS_ORDER_WATCHED]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to