[PATCH 3/3] Make Keboard spoke live-system friendly
Chris Lumens
clumens at redhat.com
Tue Sep 25 14:34:31 UTC 2012
> @@ -194,6 +196,17 @@ class KeyboardSpoke(NormalSpoke):
> self._store = self.builder.get_object("addedLayoutStore")
> self._add_data_layouts()
>
> + if not flags.can_touch_live_system("test X layouts"):
> + # Disable area for testing layouts as we cannot make
> + # it work without modifying live system
> +
> + widgets = [self.builder.get_object("testingLabel")]
> + widgets.append(self.builder.get_object("testingWindow"))
> + widgets.append(self.builder.get_object("layoutSwitchLabel"))
> +
> + for widget in widgets:
> + widget.set_sensitive(False)
> +
> def refresh(self):
> NormalSpoke.refresh(self)
>
You could combine all that into one list pretty easily:
widgets = [self.builder.get_object(...),
self.builder.get_object(...),
self.builder.get_object()]
But beyond just the stylistic thing, I wonder if this is going to need
some explanation to the user. It's a little strange that certain
widgets are just disabled.
- Chris
More information about the anaconda-patches
mailing list