Author: duncan
Date: Fri Sep 29 12:50:51 2006
New Revision: 8265
Modified:
branches/rel-1-5/freevo/src/event.py
branches/rel-1-5/freevo/src/menu.py
Log:
[ 1567501 ] Adds events to go directly to videos, etc
Patch applied.
Modified: branches/rel-1-5/freevo/src/event.py
==============================================================================
--- branches/rel-1-5/freevo/src/event.py (original)
+++ branches/rel-1-5/freevo/src/event.py Fri Sep 29 12:50:51 2006
@@ -134,6 +134,9 @@
MENU_REBUILD = Event('MENU_REBUILD')
MENU_GOTO_MAINMENU = Event('MENU_GOTO_MAINMENU')
+MENU_GOTO_VIDEOS = Event('MENU_GOTO_VIDEOS')
+MENU_GOTO_MUSIC = Event('MENU_GOTO_MUSIC')
+MENU_GOTO_IMAGES = Event('MENU_GOTO_IMAGES')
MENU_BACK_ONE_MENU = Event('MENU_BACK_ONE_MENU')
MENU_SELECT = Event('MENU_SELECT')
@@ -464,10 +467,10 @@
'EXIT' : STOP,
'PLAY' : PLAY,
'PAUSE' : PAUSE,
- 'LEFT' : Event(IMAGE_MOVE, arg=(-10, 0)),
- 'RIGHT' : Event(IMAGE_MOVE, arg=( 10, 0)),
- 'UP' : Event(IMAGE_MOVE, arg=( 0,-10)),
- 'DOWN' : Event(IMAGE_MOVE, arg=( 0, 10)),
+ 'LEFT' : Event(IMAGE_MOVE, arg=(-60, 0)),
+ 'RIGHT' : Event(IMAGE_MOVE, arg=( 60, 0)),
+ 'UP' : Event(IMAGE_MOVE, arg=( 0,-60)),
+ 'DOWN' : Event(IMAGE_MOVE, arg=( 0, 60)),
'1' : IMAGE_ZOOM_GRID1,
'2' : IMAGE_ZOOM_GRID2,
'3' : IMAGE_ZOOM_GRID3,
Modified: branches/rel-1-5/freevo/src/menu.py
==============================================================================
--- branches/rel-1-5/freevo/src/menu.py (original)
+++ branches/rel-1-5/freevo/src/menu.py Fri Sep 29 12:50:51 2006
@@ -247,6 +247,34 @@
self.refresh()
+ def goto_media_menu(self,media='audio'):
+ """
+ Go to a main menu item
+ media = 'audio' or 'video' or 'image'
+ used for events:
+ MENU_GOTO_AUDIOMENU
+ MENU_GOTO_VIDEOMENU
+ MENU_GOTO_IMAGEMENU
+ """
+ #1:goto main menu.
+ #2:loop through main menu items.
+ #the arg of a media menu item is 'audio' or 'video' or 'image'
+ #select.
+ self.menustack = [self.menustack[0]]
+ menu = self.menustack[0]
+ self.init_page()
+ #self.goto_main_menu()
+ for menuitem in self.menustack[0].choices:
+ try:
+ if menuitem.arg[0] == media:
+ menuitem.select(menuw=self)
+ return
+ except AttributeError: # may have no .arg (no media menu)
+ pass
+ except TypeError: # .arg may be not indexable
+ pass
+
+
def goto_prev_page(self, arg=None, menuw=None):
menu = self.menustack[-1]
@@ -374,6 +402,18 @@
self.goto_main_menu()
return
+ if event == MENU_GOTO_VIDEOS:
+ self.goto_media_menu("video")
+ return
+
+ if event == MENU_GOTO_MUSIC:
+ self.goto_media_menu("audio")
+ return
+
+ if event == MENU_GOTO_IMAGES:
+ self.goto_media_menu("image")
+ return
+
if event == MENU_BACK_ONE_MENU:
self.back_one_menu()
return
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog