Update of /cvsroot/freevo/freevo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20486
Modified Files: osd.py Log Message: fix crash for deactivated osd and fix busy icon redraw Index: osd.py =================================================================== RCS file: /cvsroot/freevo/freevo/src/osd.py,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -d -r1.130 -r1.131 *** osd.py 1 Feb 2004 17:11:31 -0000 1.130 --- osd.py 4 Feb 2004 17:32:35 -0000 1.131 *************** *** 11,14 **** --- 11,17 ---- # ----------------------------------------------------------------------- # $Log$ + # Revision 1.131 2004/02/04 17:32:35 dischi + # fix crash for deactivated osd and fix busy icon redraw + # # Revision 1.130 2004/02/01 17:11:31 dischi # cosmetic changes *************** *** 315,319 **** self.icon = os.path.join(config.SHARE_DIR, 'icons/popup/popup_wait.png') self.lock = thread.allocate_lock() ! def wait(self, timer): self.lock.acquire() --- 318,323 ---- self.icon = os.path.join(config.SHARE_DIR, 'icons/popup/popup_wait.png') self.lock = thread.allocate_lock() ! self.rect = None ! def wait(self, timer): self.lock.acquire() *************** *** 344,354 **** y = osd.height - config.OSD_OVERSCAN_Y - 20 - height # backup the screen screen = pygame.Surface((width,height)) ! screen.blit(osd.screen, (0,0), (x,y,width,height)) ! # draw the icon osd.drawbitmap(image, x, y) ! osd.update(stop_busyicon=False) # restore the screen --- 348,358 ---- y = osd.height - config.OSD_OVERSCAN_Y - 20 - height + self.rect = (x,y,width,height) # backup the screen screen = pygame.Surface((width,height)) ! screen.blit(osd.screen, (0,0), self.rect) # draw the icon osd.drawbitmap(image, x, y) ! osd.update(rect=self.rect, stop_busyicon=False) # restore the screen *************** *** 504,507 **** --- 508,514 ---- callback for SDL event (not Freevo events) """ + if not pygame.display.get_init(): + return None + # Check if mouse should be visible or hidden mouserel = pygame.mouse.get_rel() *************** *** 1224,1238 **** time.sleep(t_rem) return ! ! if rect: try: pygame.display.update(rect) except: ! _debug_('osd.update(rect) failed, bad rect? - %s' % rect, 1) _debug_('updating whole screen') pygame.display.flip() else: pygame.display.flip() ! def _getbitmap(self, url): --- 1231,1247 ---- time.sleep(t_rem) return ! ! if rect and not (stop_busyicon and self.busyicon.rect): try: pygame.display.update(rect) except: ! _debug_('osd.update(rect) failed, bad rect? - %s' % str(rect), 1) _debug_('updating whole screen') pygame.display.flip() else: pygame.display.flip() ! if stop_busyicon: ! self.busyicon.rect = None ! def _getbitmap(self, url): ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Freevo-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-cvslog