Author: dmeyer
Date: Sat Oct 28 19:49:07 2006
New Revision: 8494
Modified:
trunk/ui/src/event.py
trunk/ui/src/menu/stack.py
Log:
add MENU_GOTO_MEDIA
Modified: trunk/ui/src/event.py
==============================================================================
--- trunk/ui/src/event.py (original)
+++ trunk/ui/src/event.py Sat Oct 28 19:49:07 2006
@@ -92,6 +92,7 @@
MENU_PAGEDOWN = Event('MENU_PAGEDOWN')
MENU_GOTO_MAINMENU = Event('MENU_GOTO_MAINMENU')
+MENU_GOTO_MEDIA = Event('MENU_GOTO_MEDIA')
MENU_BACK_ONE_MENU = Event('MENU_BACK_ONE_MENU')
MENU_SELECT = Event('MENU_SELECT')
Modified: trunk/ui/src/menu/stack.py
==============================================================================
--- trunk/ui/src/menu/stack.py (original)
+++ trunk/ui/src/menu/stack.py Sat Oct 28 19:49:07 2006
@@ -283,6 +283,26 @@
self.back_one_menu()
return True
+ if event == MENU_GOTO_MEDIA:
+ # TODO: it would be nice to remember the current menu stack
+ # but that is something we have to do inside mediamenu if it
+ # is possible at all.
+ # FIXME: using display_type here is ugly
+ if len(self.menustack) > 1 and \
+ hasattr(self.menustack[0].selected, 'display_type') and \
+ self.menustack[0].selected.display_type == event.arg:
+ # already in that menu
+ return True
+ menu = self.menustack[0]
+ for item in menu.choices:
+ if hasattr(item, 'display_type') and \
+ item.display_type == event.arg:
+ self.menustack = [ menu ]
+ menu.select(item)
+ item.actions()[0]()
+ return True
+ return True
+
if menu.eventhandler(event):
self.refresh()
return True
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog