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

Modified Files:
        theme.py 
Log Message:
use signal for theme change, add timing debug

Index: theme.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/theme.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** theme.py    16 Jul 2005 09:48:22 -0000      1.3
--- theme.py    21 Jul 2005 18:56:40 -0000      1.4
***************
*** 13,16 ****
--- 13,17 ----
  #       o make fxd parsing faster
  #       o respect coding guidelines
+ #       o make it faster
  #
  # 
-----------------------------------------------------------------------------
***************
*** 40,44 ****
  
  # list of functions this module provides
! __all__ = [ 'get', 'set', 'font', 'image', 'icon', 'set_base_fxd' ]
  
  # python imports
--- 41,45 ----
  
  # list of functions this module provides
! __all__ = [ 'get', 'set', 'font', 'image', 'icon', 'set_base_fxd', 'signals' ]
  
  # python imports
***************
*** 46,49 ****
--- 47,54 ----
  import copy
  import re
+ import time
+ 
+ # kaa imports
+ import kaa.notifier
  
  # freevo imports
***************
*** 51,55 ****
  import util
  import plugin
- from event import THEME_CHANGE
  
  # gui imports
--- 56,59 ----
***************
*** 62,65 ****
--- 66,71 ----
  FXD_FORMAT_VERSION = 2
  
+ # signals
+ signals = { 'theme change': kaa.notifier.Signal() }
  
  # -------------- Interface for Freevo ---------------------------------------
***************
*** 110,115 ****
          current_theme = new
      # notify other parts of Freevo about the theme change
!     # FIXME: maybe this is a signal.
!     THEME_CHANGE.post()
      # return new theme in case the new one was given to this
      # function as string and the caller wants the object
--- 116,120 ----
          current_theme = new
      # notify other parts of Freevo about the theme change
!     signals['theme change'].emit()
      # return new theme in case the new one was given to this
      # function as string and the caller wants the object
***************
*** 1170,1174 ****
      def prepare(self):
          log.info('preparing skin settings')
! 
          self.prepared = True
  
--- 1175,1180 ----
      def prepare(self):
          log.info('preparing skin settings')
!         t1 = time.time()
!         
          self.prepared = True
  
***************
*** 1253,1256 ****
--- 1259,1264 ----
          for name in self.__images:
              self.images[name] = search_file(self.__images[name], search_dirs)
+         t2 = time.time()
+         log.info('preparing took %s seconds' % (t2 - t1))
  
  



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to