Author: duncan
Date: Tue Aug 21 15:20:30 2007
New Revision: 9839
Log:
[ 1778152 ] again the menu
Yet another patch from Tanja Kotthaus applied :)
Modified:
branches/rel-1/freevo/src/menu.py
branches/rel-1/freevo/src/tv/plugins/manual_record.py
branches/rel-1/freevo/src/tv/plugins/scheduled_recordings.py
branches/rel-1/freevo/src/tv/plugins/search_programs.py
branches/rel-1/freevo/src/tv/plugins/view_favorites.py
Modified: branches/rel-1/freevo/src/menu.py
==============================================================================
--- branches/rel-1/freevo/src/menu.py (original)
+++ branches/rel-1/freevo/src/menu.py Tue Aug 21 15:20:30 2007
@@ -738,13 +738,19 @@
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):
+ if len(actions) > 1 or force:
self.make_submenu(menu.selected.name, actions,
menu.selected)
- return
+ elif len(actions) == 1:
+ # if there is only one action, call it!
+ action = actions[0]
+ arg = None
+ if isinstance(action, MenuItem):
+ action = action.function
+ arg = action.arg
+ else:
+ action = action[0]
+ action( arg=arg, menuw=self )
+ return
Modified: branches/rel-1/freevo/src/tv/plugins/manual_record.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/manual_record.py (original)
+++ branches/rel-1/freevo/src/tv/plugins/manual_record.py Tue Aug 21
15:20:30 2007
@@ -111,7 +111,7 @@
def actions(self):
_debug_('actions(self)', 2)
- return [( self.display_recitem , _('Display record item') ,
'MENU_SUBMENU')]
+ return [( self.display_recitem , _('Display record item') )]
def display_recitem(self, arg=None, menuw=None):
Modified: branches/rel-1/freevo/src/tv/plugins/scheduled_recordings.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/scheduled_recordings.py
(original)
+++ branches/rel-1/freevo/src/tv/plugins/scheduled_recordings.py Tue Aug
21 15:20:30 2007
@@ -47,7 +47,7 @@
def actions(self):
- return [ ( self.display_schedule , _('Display Scheduled
Recordings'),'MENU_SUBMENU' ) ]
+ return [ ( self.display_schedule , _('Display Scheduled Recordings') )
]
def display_schedule(self, arg=None, menuw=None):
Modified: branches/rel-1/freevo/src/tv/plugins/search_programs.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/search_programs.py (original)
+++ branches/rel-1/freevo/src/tv/plugins/search_programs.py Tue Aug 21
15:20:30 2007
@@ -120,7 +120,7 @@
self.__redraw = False
def actions(self):
- return [(self.show_search, self.name, 'MENU_SUBMENU')]
+ return [(self.show_search, self.name)]
def show_search(self, arg=None, menuw=None):
Modified: branches/rel-1/freevo/src/tv/plugins/view_favorites.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/view_favorites.py (original)
+++ branches/rel-1/freevo/src/tv/plugins/view_favorites.py Tue Aug 21
15:20:30 2007
@@ -46,7 +46,7 @@
def actions(self):
- return [ ( self.view_favorites , _('View Favorites'), 'MENU_SUBMENU' )
]
+ return [ ( self.view_favorites , _('View Favorites') ) ]
def view_favorites(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