gnome-specimen r43 - trunk-from-bzr



Author: wbolster
Date: Tue Jun 17 18:41:56 2008
New Revision: 43
URL: http://svn.gnome.org/viewvc/gnome-specimen?rev=43&view=rev

Log:
* specimenwindow.py:
  - Don't use a timeout but an idle handler to update the
    font previews.


Modified:
   trunk-from-bzr/   (props changed)
   trunk-from-bzr/specimenwindow.py

Modified: trunk-from-bzr/specimenwindow.py
==============================================================================
--- trunk-from-bzr/specimenwindow.py	(original)
+++ trunk-from-bzr/specimenwindow.py	Tue Jun 17 18:41:56 2008
@@ -8,7 +8,6 @@
 
 class SpecimenWindow:
 
-    update_timeout = 0
     families = []
 
     preview_size = 12
@@ -307,16 +306,12 @@
     def schedule_update_previews(self, *args):
         'Schedules an update of the previews'
 
-        # Update the previews after a delay
-        if not self.update_timeout:
-            self.update_timeout = gobject.timeout_add(500, self.update_previews)
+        # Update the previews in an idle handler
+        gobject.idle_add(self.update_previews)
 
     def update_previews(self):
         'Updates the previews'
 
-        # Clear the timeout
-        self.update_timeout = 0
-
         # Redraw/resize the previews
         self.previews_preview_column.queue_resize()
         self.previews_treeview.queue_draw()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]