Author: duncan
Date: Thu Aug 16 04:27:50 2007
New Revision: 9821

Log:
[ 1774569 ] SUBMENU when a menu entry has just one action
Applied solution 3: Call the action if it is marked as action also for SUBMENU 
or open the submenu.
Patch from Tanja Kotthaus applied


Modified:
   branches/rel-1/freevo/ChangeLog
   branches/rel-1/freevo/src/menu.py
   branches/rel-1/freevo/src/tv/program_display.py

Modified: branches/rel-1/freevo/ChangeLog
==============================================================================
--- branches/rel-1/freevo/ChangeLog     (original)
+++ branches/rel-1/freevo/ChangeLog     Thu Aug 16 04:27:50 2007
@@ -19,6 +19,7 @@
  * Updated German translation (F#1770195)
  * New Text Entry and Program Search (F#1768790)
  * Updated alsamixer with event args and synchronous mixer control (F#1767928)
+ * Updated a submenu selection when there is only one action to execute the 
action (F#1774569)
  * Fixed tvmenu crashing because of the search plug-in (B#1774544)
 
 == Release 1.7.3 (2007-08-01) ==

Modified: branches/rel-1/freevo/src/menu.py
==============================================================================
--- branches/rel-1/freevo/src/menu.py   (original)
+++ branches/rel-1/freevo/src/menu.py   Thu Aug 16 04:27:50 2007
@@ -708,9 +708,15 @@
                             a[0](menuw=self)
                             return
 
-            if actions and (len(actions) > 1 or force):
-                self.make_submenu(menu.selected.name, actions, menu.selected)
-            return
+            if actions:
+                if len(actions[0]) == 3 and actions[0][2] == 'MENU_SUBMENU':
+                    actions[0][0](menuw=self)
+                    return
+
+                if (len(actions) > 0 or force):
+                    self.make_submenu(menu.selected.name, actions, 
menu.selected)
+                    return
+
 
 
         elif event == MENU_CALL_ITEM_ACTION:

Modified: branches/rel-1/freevo/src/tv/program_display.py
==============================================================================
--- branches/rel-1/freevo/src/tv/program_display.py     (original)
+++ branches/rel-1/freevo/src/tv/program_display.py     Thu Aug 16 04:27:50 2007
@@ -104,7 +104,7 @@
 
 
     def actions(self):
-        return [( self.display_program , _('Display program') )]
+        return [( self.display_program , _('Display program') , 
'MENU_SUBMENU')]
 
 
     ### action menu
@@ -342,7 +342,7 @@
 
 
     def actions(self):
-        return [( self.display_favorite , _('Display favorite') )]
+        return [( self.display_favorite , _('Display favorite') , 
'MENU_SUBMENU')]
 
 
     def display_favorite(self, arg=None, menuw=None):

-------------------------------------------------------------------------
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