diff options
author | Radek Vykydal <rvykydal@redhat.com> | 2012-10-10 12:11:16 +0200 |
---|---|---|
committer | Radek Vykydal <rvykydal@redhat.com> | 2012-10-13 17:00:30 +0200 |
commit | 3b8ac7e9594f94ac16bb90d5c6ca132b6409b380 (patch) | |
tree | 4c7ca236770acaec049fd6ecd729552c1cfa3f70 | |
parent | bddd3a8db5470da4274a1921b7526dc21916002e (diff) | |
download | anaconda-3b8ac7e9594f94ac16bb90d5c6ca132b6409b380.tar.gz anaconda-3b8ac7e9594f94ac16bb90d5c6ca132b6409b380.tar.xz anaconda-3b8ac7e9594f94ac16bb90d5c6ca132b6409b380.zip |
Fix configuration of protected wireless connections (#855526)
-rw-r--r-- | pyanaconda/ui/gui/spokes/network.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py index 0767b2e52..a3fbf8792 100644 --- a/pyanaconda/ui/gui/spokes/network.py +++ b/pyanaconda/ui/gui/spokes/network.py @@ -280,6 +280,7 @@ class NetworkControlBox(): model = combobox.get_model() model.set_sort_column_id(2, Gtk.SortType.ASCENDING) combobox.connect("changed", self.on_wireless_ap_changed_cb) + self.selected_ssid = None # NM Client self.client.connect("device-added", self.on_device_added) @@ -386,6 +387,7 @@ class NetworkControlBox(): device = self.selected_device() ap_obj_path, ssid_target = combobox.get_model().get(iter, 0, 1) + self.selected_ssid = ssid_target if ap_obj_path == "ap-other...": return @@ -416,14 +418,10 @@ class NetworkControlBox(): con = self.find_active_connection_for_device(device) if not con and configuration_of_disconnected_devices_allowed: + ssid = None if device.get_device_type() == NetworkManager.DeviceType.WIFI: - combobox = self.builder.get_object("combobox_wireless_network_name") - iter = combobox.get_active_iter() - if not iter: - return - ap_obj_path, ssid = combobox.get_model().get(iter, 0, 1) - - con = self.find_connection_for_device(device, ssid=None) + ssid = self.selected_ssid + con = self.find_connection_for_device(device, ssid) if con: uuid = con.get_uuid() @@ -693,6 +691,13 @@ class NetworkControlBox(): active = active_ap and active_ap.get_path() == ap.get_path() self._add_ap(ap, active) # TODO: add access point other... + if active_ap: + combobox = self.builder.get_object("combobox_wireless_network_name") + for i in combobox.get_model(): + if i[1] == active_ap.get_ssid(): + combobox.set_active_iter(i.iter) + self.selected_ssid = active_ap.get_ssid() + break self._updating_device = False def _refresh_speed_hwaddr(self, device): |