From 64e5226208e810b89f8da1fb890faf492029f1bd Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Tue, 12 Sep 2006 17:26:37 +0000 Subject: * iw/autopart_type.py (PartitionTypeWindow.addIscsiDrive): Support bringing up the network as needed. * iw/task_gui.py (TaskWindow._addRepo): Bring up the network as needed --- iw/task_gui.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'iw/task_gui.py') diff --git a/iw/task_gui.py b/iw/task_gui.py index ef3ec4a58..786747f95 100644 --- a/iw/task_gui.py +++ b/iw/task_gui.py @@ -16,6 +16,7 @@ from iw_gui import * from rhpl.translate import _, N_ from constants import productName +from netconfig_dialog import NetworkConfigurator import network from yuminstall import AnacondaYumRepo @@ -93,13 +94,12 @@ class TaskWindow(InstallWindow): return True def _addRepo(self, *args): - # FIXME: Need to bring up the network if not network.hasActiveNetDev(): - self.intf.messageWindow("Need network", - "additional repos can only be configured " - "if you have a network available.", - custom_icon="error") - return gtk.RESPONSE_CANCEL + net = NetworkConfigurator(self.anaconda.id.network) + ret = net.run() + net.destroy() + if ret == gtk.RESPONSE_CANCEL: + return gtk.RESPONSE_CANCEL (dxml, dialog) = gui.getGladeWidget("addrepo.glade", "addRepoDialog") gui.addFrame(dialog) @@ -163,6 +163,14 @@ class TaskWindow(InstallWindow): def _toggled(self, data, row, store): i = store.get_iter(int(row)) val = store.get_value(i, 0) + + if not val and not network.hasActiveNetDev(): + net = NetworkConfigurator(self.anaconda.id.network) + ret = net.run() + net.destroy() + if ret == gtk.RESPONSE_CANCEL: + return + store.set_value(i, 0, not val) def _createTaskStore(self): -- cgit