Since the spoke's status is queried even before the refresh method is invoked we need to populate the store in the initialize method. --- pyanaconda/ui/gui/spokes/keyboard.py | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py index 943ca60..48787b0 100644 --- a/pyanaconda/ui/gui/spokes/keyboard.py +++ b/pyanaconda/ui/gui/spokes/keyboard.py @@ -161,15 +161,14 @@ class KeyboardSpoke(NormalSpoke): self._xkl_wrapper) self._store = self.builder.get_object("addedLayoutStore") - self._addLayout(self._store, "us") + self._add_data_layouts() def refresh(self): NormalSpoke.refresh(self) # Clear and repopulate addedLayoutStore with values from self.data self._store.clear() - for layout in self.data.keyboard.layouts_list: - self._addLayout(self._store, layout) + self._add_data_layouts() self._upButton = self.builder.get_object("upButton") self._downButton = self.builder.get_object("downButton") @@ -314,3 +313,10 @@ class KeyboardSpoke(NormalSpoke): self._upButton.set_sensitive(True) self._downButton.set_sensitive(True) + def _add_data_layouts(self): + if self.data.keyboard.layouts_list: + for layout in self.data.keyboard.layouts_list: + self._addLayout(self._store, layout) + else: + self._addLayout(self._store, "us") + -- 1.7.4.4 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list