diff options
author | Chris Lumens <clumens@redhat.com> | 2008-10-17 14:36:29 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2008-10-17 14:36:29 -0400 |
commit | b474154377e5369003da55e93a75c0aacbc86d45 (patch) | |
tree | f28192a887b73eabee3afc766cbdf50e75346a94 /iw | |
parent | 4538616ba540c3633077054d96392957bd84a0db (diff) | |
download | anaconda-b474154377e5369003da55e93a75c0aacbc86d45.tar.gz anaconda-b474154377e5369003da55e93a75c0aacbc86d45.tar.xz anaconda-b474154377e5369003da55e93a75c0aacbc86d45.zip |
Only bring up the netconfig dialog if the repo requires networking.
Diffstat (limited to 'iw')
-rw-r--r-- | iw/task_gui.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/iw/task_gui.py b/iw/task_gui.py index 9bcb420a5..ea8f0d070 100644 --- a/iw/task_gui.py +++ b/iw/task_gui.py @@ -458,10 +458,6 @@ class TaskWindow(InstallWindow): def _editRepo(self, *args): repo = None - if not network.hasActiveNetDev(): - if not self.anaconda.intf.enableNetwork(self.anaconda): - return gtk.RESPONSE_CANCEL - # If we were passed an extra argument, it's the repo store and we # are editing an existing repo as opposed to adding a new one. if len(args) > 1: @@ -473,6 +469,10 @@ class TaskWindow(InstallWindow): else: return + if repo.needsNetwork() and not network.hasActiveNetDev(): + if not self.anaconda.intf.enableNetwork(self.anaconda): + return gtk.RESPONSE_CANCEL + dialog = RepoEditor(self.anaconda, repo) dialog.createDialog() dialog.run() @@ -480,15 +480,15 @@ class TaskWindow(InstallWindow): model.set_value(iter, 2, dialog.repo) def _addRepo(self, *args): - if not network.hasActiveNetDev(): - if not self.anaconda.intf.enableNetwork(self.anaconda): - return gtk.RESPONSE_CANCEL - dialog = RepoCreator(self.anaconda) dialog.createDialog() if dialog.run() == gtk.RESPONSE_CANCEL: return gtk.RESPONSE_CANCEL + if dialog.repo.needsNetwork() and not network.hasActiveNetDev(): + if not self.anaconda.intf.enableNetwork(self.anaconda): + return gtk.RESPONSE_CANCEL + s = self.xml.get_widget("repoList").get_model() s.append([dialog.repo.isEnabled(), dialog.repo.name, dialog.repo]) @@ -517,7 +517,7 @@ class TaskWindow(InstallWindow): repo = store.get_value(i, 2) if not wasChecked: - if not network.hasActiveNetDev(): + if repo.needsNetwork() and not network.hasActiveNetDev(): if not self.anaconda.intf.enableNetwork(self.anaconda): return |