[PATCH 2/3] Make it more obvious which fields on custom part are editable (#958251).
Chris Lumens
clumens at redhat.com
Thu May 2 13:55:36 UTC 2013
> > +def fancy_set_sensitive(widget, value):
> > + """Set the sensitivity of a widget, and then set the sensitivity of
> > + all widgets it is a mnemonic widget for. This has the effect of
> > + marking both an entry and its label as sensitive/insensitive, for
> > + instance.
> > + """
> > + widget.set_sensitive(value)
> > + for w in widget.list_mnemonic_labels():
> > + w.set_sensitive(value)
> > +
> Nice idea! I think this function could live in pyanaconda.ui.gui.utils,
> it could come handy in other spokes as well.
Yeah, might as well.
> > @@ -372,8 +382,10 @@ class ContainerDialog(GUIObject):
> > dialog_label.set_text(dialog_text)
> >
> > # populate the dialog widgets
> > - self._nameEntry.set_text(self.name)
> > - self._nameEntry.set_sensitive(not self.exists)
> > + name_entry = self.builder.get_object("container_name_entry")
> > + name_entry.set_text(self.name)
> > + name_entry.set_sensitive(not self.exists)
> > + fancy_set_sensitive(name_entry, not self.exists)
> You don't need to cal set_sensitive on the name_entry,
> fancy_set_sensitive will do it.
Heh, oops. Must have missed this one.
- Chris
More information about the anaconda-patches
mailing list