Author: dmeyer
Date: Sat Apr 21 10:05:00 2007
New Revision: 9486

Modified:
   trunk/ui/src/event.py
   trunk/ui/src/video/player.py

Log:
make it possible to toggle between fit-methods of popcorn

Modified: trunk/ui/src/event.py
==============================================================================
--- trunk/ui/src/event.py       (original)
+++ trunk/ui/src/event.py       Sat Apr 21 10:05:00 2007
@@ -135,12 +135,12 @@
 # Video module
 #
 
-VIDEO_SEND_MPLAYER_CMD = Event('VIDEO_SEND_MPLAYER_CMD')
 VIDEO_MANUAL_SEEK      = Event('VIDEO_MANUAL_SEEK')
 VIDEO_NEXT_AUDIOLANG   = Event('VIDEO_NEXT_AUDIOLANG')
 VIDEO_NEXT_SUBTITLE    = Event('VIDEO_NEXT_SUBTITLE')
 VIDEO_TOGGLE_INTERLACE = Event('VIDEO_TOGGLE_INTERLACE')
 VIDEO_NEXT_ANGLE       = Event('VIDEO_NEXT_ANGLE')
+VIDEO_CHANGE_ASPECT    = Event('VIDEO_CHANGE_ASPECT')
 STORE_BOOKMARK         = Event('STORE_BOOKMARK')
 MENU                   = Event('MENU')
 

Modified: trunk/ui/src/video/player.py
==============================================================================
--- trunk/ui/src/video/player.py        (original)
+++ trunk/ui/src/video/player.py        Sat Apr 21 10:05:00 2007
@@ -206,9 +206,18 @@
                 Event(OSD_MESSAGE, _('Turn off deinterlacing')).post()
             return True
 
+        if event == VIDEO_CHANGE_ASPECT:
+            modes = [ 'bars', 'scale', 'zoom' ]
+            current = self.player.get_property('fit-method')
+            if current in modes:
+                idx = (modes.index(current) + 1) % len(modes)
+                self.player.set_property('fit-method', modes[idx])
+            return True
+                
         if str(event).startswith('DVDNAV_'):
             # dvd navigation commands
             self.player.nav_command(str(event)[7:].lower())
+            return True
 
         # give it to the item
         return self.item.eventhandler(event)

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to