mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
Fix progress display on load
This commit is contained in:
parent
eb50a5dd41
commit
8464704408
2 changed files with 4 additions and 3 deletions
|
@ -156,7 +156,7 @@ class Producer (object):
|
||||||
|
|
||||||
class LineCache (Producer):
|
class LineCache (Producer):
|
||||||
|
|
||||||
_lines_per_iteration = 1000
|
_lines_per_iteration = 50000
|
||||||
|
|
||||||
def __init__ (self, fileobj, dispatcher):
|
def __init__ (self, fileobj, dispatcher):
|
||||||
|
|
||||||
|
@ -208,7 +208,8 @@ class LineCache (Producer):
|
||||||
continue
|
continue
|
||||||
offsets.append (offset)
|
offsets.append (offset)
|
||||||
i += 1
|
i += 1
|
||||||
if i == limit:
|
if i >= limit:
|
||||||
|
i = 0
|
||||||
yield True
|
yield True
|
||||||
|
|
||||||
self.have_load_finished ()
|
self.have_load_finished ()
|
||||||
|
|
|
@ -1040,7 +1040,7 @@ class Window (object):
|
||||||
dialog.set_transient_for (self.gtk_window)
|
dialog.set_transient_for (self.gtk_window)
|
||||||
dialog.show ()
|
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):
|
def update_load_progress (self):
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue