----- Original Message -----
From: "Chris Lumens" <clumens(a)redhat.com>
To: anaconda-patches(a)lists.fedorahosted.org
Sent: Thursday, September 25, 2014 4:24:48 PM
Subject: [PATCH rhel7-branch/master] If the network is disabled, also disable the network
part of the source spoke.
Otherwise, the user could be put into a confusing situation where they have
a network source entered, but the displayed error messages do not help the
user
figure out that there's no network connection. For RHEL this is especially
bad
since no network is the default.
Resolves: rhbz#1072453
---
pyanaconda/ui/gui/spokes/source.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/source.py
b/pyanaconda/ui/gui/spokes/source.py
index 7a72785..812f01f 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -42,6 +42,7 @@ from pyanaconda.ui.gui.utils import gtk_call_once,
really_hide, really_show
from pyanaconda.threads import threadMgr, AnacondaThread
from pyanaconda.packaging import PackagePayload, payloadMgr
from pyanaconda import constants
+from pyanaconda import nm
from blivet.util import get_mount_device, get_mount_paths
@@ -761,6 +762,18 @@ class SourceSpoke(NormalSpoke):
# that condition here too.
self.on_protocol_changed(self._protocolComboBox)
+ # If there's no network up (which is the default case), disable all
the
+ # network-related stuff.
+ if not nm.nm_is_connected():
+ self._networkButton.set_sensitive(False)
+ self._networkBox.set_sensitive(False)
+
+ self.clear_info()
+ self.set_warning(_("You need to configure the network to use a
network installation source."))
+ else:
This looks like a mistake, because of other code above that sets sensitivity of these
widgets to False, that this code overrides unconditionally.
+ self._networkButton.set_sensitive(True)
+ self._networkBox.set_sensitive(True)
+
@property
def showable(self):
return isinstance(self.payload, PackagePayload)
@@ -806,6 +819,10 @@ class SourceSpoke(NormalSpoke):
if len(ui_repo_names) != len(frozenset(ui_repo_names)):
return
else:
+ # Clear any error message on the bottom of the screen so that on
+ # the next visit to this spoke, the user doesn't see a stale
message
+ # about no network being up.
+ self.clear_info()
Should this, in general, be done for all spokes, i.e.,
the clearing out of the stale information?
NormalSpoke.on_back_clicked(self, button)
def on_chooser_clicked(self, button):
--
1.9.3
_______________________________________________
anaconda-patches mailing list
anaconda-patches(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
- mulhern