On Fri, 2014-01-31 at 09:32 +0100, Vratislav Podzimek wrote:
On Thu, 2014-01-30 at 15:58 -0500, Chris Lumens wrote:
> > diff --git a/pyanaconda/ui/gui/hubs/progress.py
b/pyanaconda/ui/gui/hubs/progress.py
> > index facbd2f..d1650d5 100644
> > --- a/pyanaconda/ui/gui/hubs/progress.py
> > +++ b/pyanaconda/ui/gui/hubs/progress.py
> > @@ -100,15 +100,19 @@ class ProgressHub(Hub):
> > elif code == progressQ.PROGRESS_CODE_MESSAGE:
> > self._update_progress_message(args[0])
> > elif code == progressQ.PROGRESS_CODE_COMPLETE:
> > - # There shouldn't be any more progress bar updates, so
return False
> > - # to indicate this method should be removed from the idle
loop. Also,
> > - # stop the rnotes cycling and display the finished message.
> > - self._progress_bar_complete()
> > q.task_done()
> >
> > + # we are done, stop the progress indication
> > + gtk_call_once(self._progressBar.set_fraction, 1.0)
> > + gtk_call_once(self._progressLabel.set_text,
_("Complete!"))
> > + gtk_call_once(self._spinner.stop)
> > + gtk_call_once(self._spinner.hide)
> > +
> > if callback:
> > callback()
> >
> > + # There shouldn't be any more progress bar updates, so
return False
> > + # to indicate this method should be removed from the idle
loop.
> > return False
> > elif code == progressQ.PROGRESS_CODE_QUIT:
> > sys.exit(args[0])
>
> Could this perhaps be the sort of thing that GtkActionList could be
> handy for?
Good idea! Not on the rhel7-branch where it doesn't exist, but on
master, that will be a great example of usage.
So it turns out it is not possible
to use GtkActionList, because the
@gtk_action_wait decorator used in it's implementation causes the
progress bar to graphically stay on the old value as it did without
this patch. I really have no idea why and what causes the difference
which seems like a bug to me. Other cases where I tested the
GtkActionList worked without any issues. It's weird, both ways in the
end call GLib.idle_add with our function. Guess it's beyond non-Gtk way
of understanding this world.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic