[PATCH 2/2] Ignore the data model and just return self.environment
Martin Kolman
mkolman at redhat.com
Mon Mar 10 19:27:00 UTC 2014
Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
pyanaconda/ui/gui/spokes/software.py | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index cf976a8..2864aa5 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -386,16 +386,12 @@ class SoftwareSelectionSpoke(NormalSpoke):
return retval
- # Returns the row in the store corresponding to what's selected on the
- # left hand panel, or None if nothing's selected.
def _get_selected_environment(self):
- for (ndx, row) in enumerate(self._environmentListBox.get_children()):
- box = row.get_children()[0]
- button = box.get_children()[0]
- if button.get_active():
- return self.payload.environments[ndx]
-
- return None
+ # Returnes the currently selected environment
+ # (self.environment is set in both initilize() and apply(),
+ # so we don't need to care about the state of the
+ # internal data model at all)
+ return self.environment
def _clear_listbox(self, listbox):
for child in listbox.get_children():
--
1.8.5.3
More information about the anaconda-patches
mailing list