Fix progress display on load

This commit is contained in:
René Stadler 2007-11-14 10:55:12 +02:00 committed by Stefan Sauer
parent eb50a5dd41
commit 8464704408
2 changed files with 4 additions and 3 deletions

View 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 ()

View file

@ -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):