Update of /cvsroot/freevo/freevo/lib/mevas/mevas/displays
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7502/mevas/displays

Modified Files:
        bmovlcanvas.py 
Log Message:
hide/show improvements

Index: bmovlcanvas.py
===================================================================
RCS file: /cvsroot/freevo/freevo/lib/mevas/mevas/displays/bmovlcanvas.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** bmovlcanvas.py      23 Aug 2004 12:42:19 -0000      1.2
--- bmovlcanvas.py      14 Sep 2004 20:03:53 -0000      1.3
***************
*** 8,15 ****
                super(BmovlCanvas, self).__init__(size, preserve_alpha = True)
                self._update_rect = None
!               self.fifo = os.open('/tmp/bmovl', os.O_WRONLY)
!               self.bmovl_visible = False
  
  
        def _update_end(self, object = None):
                if not self._update_rect:
--- 8,26 ----
                super(BmovlCanvas, self).__init__(size, preserve_alpha = True)
                self._update_rect = None
!               self.fifo = os.open('/tmp/bmovl-%s' % os.getpid(), os.O_WRONLY)
!               self.bmovl_visible = True
!               try:
!                       os.write(self.fifo, 'SHOW\n')
!               except (IOError, OSError):
!                       print 'IOError on bmovl.fifo'
! 
  
+       def has_visible_child(self):
+               for c in self.children:
+                       if c.visible and c.get_alpha():
+                               return True
+               return False
  
+       
        def _update_end(self, object = None):
                if not self._update_rect:
***************
*** 19,24 ****
                        return
  
!               if not self.children and self.bmovl_visible:
!                       _debug_('hide')
                        try:
                                os.write(self.fifo, 'HIDE\n')
--- 30,35 ----
                        return
  
!               if self.bmovl_visible and not self.has_visible_child():
!                       print 'bmovl hide'
                        try:
                                os.write(self.fifo, 'HIDE\n')
***************
*** 28,35 ****
                                print 'IOError on bmovl.fifo'
                        self.bmovl_visible = False
! 
                pos, size = self._update_rect
                img = imagelib.crop(self._backing_store, pos, size)
                try:
                        os.write(self.fifo, 'RGBA32 %d %d %d %d %d %d\n' % \
                                 (size[0], size[1], pos[0], pos[1], 0, 0))
--- 39,48 ----
                                print 'IOError on bmovl.fifo'
                        self.bmovl_visible = False
!                       return
!               
                pos, size = self._update_rect
                img = imagelib.crop(self._backing_store, pos, size)
                try:
+                       print 'bmovl update', pos, size
                        os.write(self.fifo, 'RGBA32 %d %d %d %d %d %d\n' % \
                                 (size[0], size[1], pos[0], pos[1], 0, 0))
***************
*** 40,45 ****
                self._update_rect = None
  
!               if self.children and not self.bmovl_visible:
!                       _debug_('show')
                        try:
                                os.write(self.fifo, 'SHOW\n')
--- 53,58 ----
                self._update_rect = None
  
!               if not self.bmovl_visible and self.has_visible_child():
!                       print 'bmovl show'
                        try:
                                os.write(self.fifo, 'SHOW\n')



-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to