* morituri/common/task.py:
Schedule the start from the main loop, otherwise the task might complete before we're in the main loop, and then the loop.quit() doesn't work.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2009-04-12 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* morituri/common/task.py:
|
||||
Schedule the start from the main loop, otherwise the
|
||||
task might complete before we're in the main loop,
|
||||
and then the loop.quit() doesn't work.
|
||||
|
||||
2009-04-12 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* examples/ARcue.py:
|
||||
|
||||
@@ -169,7 +169,9 @@ class SyncRunner(TaskRunner):
|
||||
|
||||
self._loop = gobject.MainLoop()
|
||||
self._task.addListener(self)
|
||||
self._task.start(self)
|
||||
# only start the task after going into the mainloop,
|
||||
# otherwise the task might complete before we are in it
|
||||
gobject.timeout_add(0L, self._task.start, self)
|
||||
self._loop.run()
|
||||
|
||||
def schedule(self, delta, callable, *args, **kwargs):
|
||||
@@ -242,6 +244,7 @@ class GtkProgressRunner(gtk.VBox, TaskRunner):
|
||||
# self._task.removeListener(self)
|
||||
|
||||
def progressed(self, task, value):
|
||||
self._label.set_text(task.description)
|
||||
self._progress.set_fraction(value)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user