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

Re: [PATCH 12/22] Don't ask when configuring net if we have only one network device (#520146)



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

Ack.

On Tue, 27 Apr 2010, Radek Vykydal wrote:

This is only for [Configure Network] button, otoh when enabling network,
still offer pre-nmce dialog to inform user that he needs to configure
network.
---
gui.py |   15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/gui.py b/gui.py
index 6d7ecc9..1008d93 100755
--- a/gui.py
+++ b/gui.py
@@ -955,6 +955,7 @@ class InstallInterface(InstallInterfaceBase):


    # TODORV: handle one device case - don't ask
+    # just_setup is used for [Configure Network] button
    def enableNetwork(self, just_setup=False):

        if len(self.anaconda.network.netdevices) == 0:
@@ -965,11 +966,15 @@ class InstallInterface(InstallInterfaceBase):

        networkEnabled = False
        while not networkEnabled:
-            choice = selectNetDevicesDialog(self.anaconda.network,
-                                            select_install_device=(not just_setup))
-            if not choice:
-                break
-            nm_controlled_devices, install_device = choice
+            if just_setup and len(self.anaconda.network.netdevices) <= 1:
+                nm_controlled_devices = self.anaconda.network.netdevices.keys()
+                install_device = None
+            else:
+                choice = selectNetDevicesDialog(self.anaconda.network,
+                                                select_install_device=(not just_setup))
+                if not choice:
+                    break
+                nm_controlled_devices, install_device = choice

            # update ifcfg files for nm-c-e
            self.anaconda.network.setNMControlledDevices(nm_controlled_devices)


- -- David Cantrell <dcantrell redhat com>
Red Hat / Honolulu, HI

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

iEYEARECAAYFAkvfjtsACgkQ5hsjjIy1VklJAACg8jBlrYiWGBO5B3WS7HLVPeoG
6G4AoOlmO/NmCkMFeAzGsVKhRKrX/8xa
=qflS
-----END PGP SIGNATURE-----


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