Fix progress display on load
authorRené Stadler <mail@renestadler.de>
Wed, 14 Nov 2007 08:55:12 +0000 (10:55 +0200)
committerStefan Sauer <ensonic@users.sf.net>
Thu, 11 Sep 2014 18:51:36 +0000 (20:51 +0200)
debug-viewer/GstDebugViewer/Data.py
debug-viewer/GstDebugViewer/GUI.py

index c9c7113..891ce6b 100644 (file)
@@ -156,7 +156,7 @@ class Producer (object):
 
 class LineCache (Producer):
 
-    _lines_per_iteration = 1000
+    _lines_per_iteration = 50000
 
     def __init__ (self, fileobj, dispatcher):
 
@@ -208,7 +208,8 @@ class LineCache (Producer):
                 continue
             offsets.append (offset)
             i += 1
-            if i == limit:
+            if i >= limit:
+                i = 0
                 yield True
 
         self.have_load_finished ()
index 3acbc87..d6a2e68 100755 (executable)
@@ -1040,7 +1040,7 @@ class Window (object):
         dialog.set_transient_for (self.gtk_window)
         dialog.show ()
 
-        self.update_progress_id = gobject.timeout_add (50, self.update_load_progress)
+        self.update_progress_id = gobject.timeout_add (250, self.update_load_progress)
 
     def update_load_progress (self):