Author: dmeyer
Date: Mon Jan 22 15:24:16 2007
New Revision: 9044

Modified:
   trunk/ui/src/gui/compat.py
   trunk/ui/src/image/viewer.py
   trunk/ui/src/video/player.py

Log:
some gui cleanups

Modified: trunk/ui/src/gui/compat.py
==============================================================================
--- trunk/ui/src/gui/compat.py  (original)
+++ trunk/ui/src/gui/compat.py  Mon Jan 22 15:24:16 2007
@@ -106,7 +106,10 @@
     name = 'viewer'
     areas = ()
 
-    
+    def update(self):
+        self.engine.canvas.update()
+        
+        
 class _Videoplayer(BaseApplication):
     name = 'video'
     areas = ()
@@ -118,7 +121,9 @@
     def update(self):
         pass
 
-
+    def get_window(self):
+        return self.engine.canvas._window
+    
     
 def Application(name):
     return eval('_' + name.capitalize())()

Modified: trunk/ui/src/image/viewer.py
==============================================================================
--- trunk/ui/src/image/viewer.py        (original)
+++ trunk/ui/src/image/viewer.py        Mon Jan 22 15:24:16 2007
@@ -146,7 +146,7 @@
         if not self.last_item:
             # We just started, update the screen to make it
             # empty (all hides from the menu are updated)
-            gui.display.update()
+            self.engine.update()
 
         self.status = STATUS_RUNNING
 
@@ -156,13 +156,13 @@
             if self.zoom == zoom:
                 # same image, only update the osd and the timer
                 self.drawosd()
-                gui.display.update()
+                self.engine.update()
                 return
             if not isinstance(zoom, int):
                 # only zoom change
                 self.last_image.set_pos((-zoom[0], -zoom[1]))
                 self.zoom = zoom
-                gui.display.update()
+                self.engine.update()
                 return
             if self.zoom and zoom:
                 log.info('FIXME: do not create the complete image again')
@@ -273,7 +273,7 @@
         self.drawosd()
 
         # update the screen
-        gui.display.update()
+        self.engine.update()
 
         # start timer
         if self.item.duration and self.slideshow and \
@@ -364,7 +364,7 @@
             # show/hide image information
             self.osd_mode = (self.osd_mode+1) % (len(config.IMAGEVIEWER_OSD)+1)
             self.drawosd()
-            gui.display.update()
+            self.engine.update()
             return True
 
         if str(event) in self.zoom_btns:

Modified: trunk/ui/src/video/player.py
==============================================================================
--- trunk/ui/src/video/player.py        (original)
+++ trunk/ui/src/video/player.py        Mon Jan 22 15:24:16 2007
@@ -42,7 +42,6 @@
 
 # Freevo imports
 import config
-import gui
 
 from event import *
 from application import Application, STATUS_RUNNING, STATUS_STOPPING, \
@@ -72,7 +71,7 @@
         capabilities = (CAPABILITY_PAUSE, CAPABILITY_FULLSCREEN)
         Application.__init__(self, 'videoplayer', 'video', capabilities)
         self.player = kaa.popcorn.Player()
-        self.player.set_window(gui.display._window)
+        self.player.set_window(self.engine.get_window())
         self.player.signals['failed'].connect_weak(self._play_failed)
 
 

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

Reply via email to