[PATCH 1/2] Implement and use a function for one-off running Gtk actions

Brian C. Lane bcl at redhat.com
Wed Jan 15 21:32:23 UTC 2014


On Wed, Jan 15, 2014 at 07:41:37AM +0100, Vratislav Podzimek wrote:
> On Tue, 2014-01-14 at 16:27 -0800, Brian C. Lane wrote:
> > On Tue, Jan 14, 2014 at 06:31:30PM +0100, Vratislav Podzimek wrote:
> > > There are cases we don't have a function we would like to decorate with the
> > > @gtk_action_wait decorator. And e.g. the addons may make us of this as well.
> > > 
> > > Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> > > ---
> > >  pyanaconda/ui/gui/spokes/custom.py | 10 +++-------
> > >  pyanaconda/ui/gui/spokes/source.py | 10 +++-------
> > >  pyanaconda/ui/gui/utils.py         |  8 ++++++++
> > >  3 files changed, 14 insertions(+), 14 deletions(-)
> > > 
> > > diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
> > > index 0c71d31..b119d82 100644
> > > --- a/pyanaconda/ui/gui/spokes/custom.py
> > > +++ b/pyanaconda/ui/gui/spokes/custom.py
> > > @@ -76,8 +76,8 @@ from pyanaconda.ui.gui.spokes.lib.passphrase import PassphraseDialog
> > >  from pyanaconda.ui.gui.spokes.lib.accordion import selectorFromDevice, Accordion, Page, CreateNewPage, UnknownPage
> > >  from pyanaconda.ui.gui.spokes.lib.refresh import RefreshDialog
> > >  from pyanaconda.ui.gui.spokes.lib.summary import ActionSummaryDialog
> > > -from pyanaconda.ui.gui.utils import setViewportBackground, gtk_action_wait, enlightbox, fancy_set_sensitive, ignoreEscape,\
> > > -        really_hide, really_show
> > > +from pyanaconda.ui.gui.utils import setViewportBackground, enlightbox, fancy_set_sensitive, ignoreEscape,\
> > > +        really_hide, really_show, fire_gtk_action
> > 
> > May as well break that up into 2 imports instead of a big ugly line.
> Good point.
> 
> > 
> > Looks ok to me other than that, I'm not sure about patch #2, if we're
> > not using it why add the code?
> Because starting with anaconda-19 we are an API provider for the addons
> and having such class available means addons won't have to implement it
> again and again. Also, in a bit farer corner of my mind, I'm thinking
> about splitting the pyanaconda.ui.gui.utils module into a separate
> package, something like python-gtk-utils (or I was thinking about
> python-sgith [shoot Gtk in the head]. :D

oh, right, good idea then. Ack to both.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list