Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7090

Modified Files:
        osd.py 
Log Message:
make to possible to override busy icon with skin

Index: osd.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/osd.py,v
retrieving revision 1.133
retrieving revision 1.134
diff -C2 -d -r1.133 -r1.134
*** osd.py      5 Feb 2004 19:26:41 -0000       1.133
--- osd.py      6 Feb 2004 18:24:39 -0000       1.134
***************
*** 11,14 ****
--- 11,17 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.134  2004/02/06 18:24:39  dischi
+ # make to possible to override busy icon with skin
+ #
  # Revision 1.133  2004/02/05 19:26:41  dischi
  # fix unicode handling
***************
*** 17,25 ****
  # Handle filenames internally as unicode objects.
  #
! # This does *NOT* affect filenames that have only ASCII chars, since the translation 
ASCII -> Unicode is painless. However this *DOES* affect files with accents, like é 
(e acute, \xe9) and others.
  #
! # I tested with Video, Images and Music modules, but *NOT* with Games, so if you 
have the games modules, give it a try.
  #
! # It determines the encoding based on (in order) FREEVO_LOCALE, LANG and LC_ALL, 
which may have the form: "LANGUAGE_CODE.ENCODING", like "pt_BR.UTF-8", and others.
  #
  # Revision 1.131  2004/02/04 17:32:35  dischi
--- 20,32 ----
  # Handle filenames internally as unicode objects.
  #
! # This does *NOT* affect filenames that have only ASCII chars, since the
! # translation ASCII -> Unicode is painless. However this *DOES* affect files
! # with accents
  #
! # I tested with Video, Images and Music modules, but *NOT* with Games, so if you
! # have the games modules, give it a try.
  #
! # It determines the encoding based on (in order) FREEVO_LOCALE, LANG and LC_ALL,
! # which may have the form: "LANGUAGE_CODE.ENCODING", like "pt_BR.UTF-8", and others.
  #
  # Revision 1.131  2004/02/04 17:32:35  dischi
***************
*** 328,332 ****
          self.timer  = 0
          self.active = False
-         self.icon   = os.path.join(config.SHARE_DIR, 'icons/popup/popup_wait.png')
          self.lock   = thread.allocate_lock()
          self.rect   = None
--- 335,338 ----
***************
*** 352,373 ****
                  time.sleep(0.01)
              if self.active:
                  self.lock.acquire()
                  osd = get_singleton()
!                 image  = osd.loadbitmap(self.icon)
!                 width  = image.get_width()
!                 height = image.get_height()
!                 x = osd.width  - config.OSD_OVERSCAN_X - 20 - width
!                 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
!                 osd.screen.blit(screen, (x,y))
                  self.lock.release()
                  
--- 358,382 ----
                  time.sleep(0.01)
              if self.active:
+                 import skin
                  self.lock.acquire()
                  osd = get_singleton()
!                 icon = skin.get_singleton().get_icon('misc/osd_busy')
!                 if icon:
!                     image  = osd.loadbitmap(icon)
!                     width  = image.get_width()
!                     height = image.get_height()
!                     x = osd.width  - config.OSD_OVERSCAN_X - 20 - width
!                     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
!                     osd.screen.blit(screen, (x,y))
                  self.lock.release()
                  



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

Reply via email to