Re: [PATCH 13/22] Check preselected install network device as nm-controlled (#520146)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ack.

On Tue, 27 Apr 2010, Radek Vykydal wrote:

---
iw/network_gui.py |   17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/iw/network_gui.py b/iw/network_gui.py
index 60af4ba..d84f43f 100644
--- a/iw/network_gui.py
+++ b/iw/network_gui.py
@@ -152,9 +152,9 @@ def selectNetDevicesDialog(network, select_install_device=True):
        ksdevice = network.getKSDevice()
        if ksdevice:
            ksdevice = ksdevice.get('DEVICE')
-        selected_interface = None
+        selected_interface_idx = 0

-        for dev in devs:
+        for idx, dev in enumerate(devs):
            i = store.append(None)
            # TODORV: add description
            hwaddr = netdevs[dev].get("HWADDR")
@@ -164,19 +164,13 @@ def selectNetDevicesDialog(network, select_install_device=True):
            else:
                desc = "%s" %(dev,)

-            if selected_interface is None:
-                selected_interface = i
-
            if ksdevice and ksdevice == dev:
-                selected_interface = i
+                selected_interface_idx = idx

            store[i] = (desc, dev)

        # TODORV: simplify to use just indexes
-        if selected_interface:
-            combo.set_active_iter(selected_interface)
-        else:
-            combo.set_active(0)
+        combo.set_active(selected_interface_idx)

        def installDevChanged(combo, dev_check_buttons):
            active = combo.get_active()
@@ -210,6 +204,9 @@ def selectNetDevicesDialog(network, select_install_device=True):
    dialog.vbox.pack_start(table)

    if select_install_device:
+        selected_dev_cb = dev_check_buttons[selected_interface_idx][1]
+        selected_dev_cb.set_active(True)
+        selected_dev_cb.set_sensitive(False)
        combo.connect("changed", installDevChanged, dev_check_buttons)

    dialog.show_all()


- -- David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkvfjvMACgkQ5hsjjIy1VkmQHwCgkLeb57lRFJwSqshv7GINYyTI
M4wAn2VuAbEzTMok4AbYynITc1JYxQX/
=GRFQ
-----END PGP SIGNATURE-----

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux