[PATCH 05/10] Compare the protocol combox box on position, not text.

Chris Lumens clumens at redhat.com
Fri Nov 30 16:28:21 UTC 2012


We don't want to re-set up installation source just because someone's using a
different language than we expect.
---
 pyanaconda/ui/gui/spokes/source.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index 33518b5..0bc99a2 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -786,16 +786,16 @@ class SourceSpoke(NormalSpoke):
         return not flags.livecdInstall
 
     def _mirror_active(self):
-        return self._protocolComboBox.get_active_text().startswith("Closest")
+        return self._protocolComboBox.get_active() == 0
 
     def _http_active(self):
-        return self._protocolComboBox.get_active_text().startswith("http")
+        return self._protocolComboBox.get_active() in [1, 2]
 
     def _ftp_active(self):
-        return self._protocolComboBox.get_active_text().startswith("ftp")
+        return self._protocolComboBox.get_active() == 3
 
     def _nfs_active(self):
-        return self._protocolComboBox.get_active_text().startswith("nfs")
+        return self._protocolComboBox.get_active() == 4
 
     def _get_selected_media(self):
         dev = None
-- 
1.7.11.2



More information about the anaconda-patches mailing list