diff options
Diffstat (limited to 'src/fe/gtk/Networking.py')
-rw-r--r-- | src/fe/gtk/Networking.py | 69 |
1 files changed, 34 insertions, 35 deletions
diff --git a/src/fe/gtk/Networking.py b/src/fe/gtk/Networking.py index a5e776c..eff3826 100644 --- a/src/fe/gtk/Networking.py +++ b/src/fe/gtk/Networking.py @@ -6,14 +6,14 @@ import gtk,gobject import os import re -import GLIScreen +from GLIScreen import * import GLIUtility import commands, string import copy #import subprocess from Widgets import Widgets -class Panel(GLIScreen.GLIScreen): +class Panel(GLIScreen): """ The Networking section of the installer. @@ -25,24 +25,21 @@ class Panel(GLIScreen.GLIScreen): _helptext = """ <b><u>Networking</u></b> -If you previously set up a network interface in the Pre-install Configuration -screen, it should show up configured again in the Device list. - -All detected interfaces should show up in the list, but you also have the option -to type in your own interface. Once you select an interface, select DHCP or -Static Configuration. Then once you have set your network settings make sure to +All detected interfaces should show up in the list, but you also have the option \ +to type in your own interface. Once you select an interface, select DHCP or \ +Static Configuration. Then once you have set your network settings make sure to \ click Save to add the interface to the list. -Wireless support currently is unavailable, but coming soon! We even have the +Wireless support currently is unavailable, but coming soon! We even have the \ boxes for it all ready to go. -Don't forget to set a hostname and domain name in the +Don't forget to set a hostname and domain name in the \ "Hostname / Proxy Information / Other" tab! """ # Operations def __init__(self, controller): - GLIScreen.GLIScreen.__init__(self, controller) + GLIScreen.__init__(self, controller) vert = gtk.VBox(False, 0) vert.set_border_width(10) @@ -551,7 +548,7 @@ Don't forget to set a hostname and domain name in the while(iter != None): dev = store.get_value(iter, 1) - print dev + " " + device +# print dev + " " + device #print model.get_path(iter) #temp_row_ref = gtk.TreeRowReference(model, model.get_path(iter)) #if selected_row.get_path() == temp_row_ref.get_path(): @@ -645,7 +642,8 @@ Don't forget to set a hostname and domain name in the info = info[0] except: - print "Error" +# print "Error" + pass return info def get_information(self): @@ -726,14 +724,14 @@ Don't forget to set a hostname and domain name in the interfaces = self.controller.install_profile.get_network_interfaces() # Preload networking info from CC...stolen from gli-dialog - CC_iface = self.controller.client_profile.get_network_interface() - if CC_iface and (CC_iface not in interfaces): - #The CC has a network config that's not already there. Preload it. - CC_net_type = self.controller.client_profile.get_network_type() - if CC_net_type == 'dhcp': - interfaces[CC_iface] = ('dhcp', self.controller.client_profile.get_network_dhcp_options(), None) - elif CC_net_type == 'static': - interfaces[CC_iface] = (self.controller.client_profile.get_network_ip(), self.controller.client_profile.get_network_broadcast(), self.controller.client_profile.get_network_netmask()) +# CC_iface = self.controller.client_profile.get_network_interface() +# if CC_iface and (CC_iface not in interfaces): +# #The CC has a network config that's not already there. Preload it. +# CC_net_type = self.controller.client_profile.get_network_type() +# if CC_net_type == 'dhcp': +# interfaces[CC_iface] = ('dhcp', self.controller.client_profile.get_network_dhcp_options(), None) +# elif CC_net_type == 'static': +# interfaces[CC_iface] = (self.controller.client_profile.get_network_ip(), self.controller.client_profile.get_network_broadcast(), self.controller.client_profile.get_network_netmask()) try: dev, gatewayip = self.controller.install_profile.get_default_gateway() @@ -763,13 +761,10 @@ Don't forget to set a hostname and domain name in the self.widgets["hostname"].set_text(self.controller.install_profile.get_hostname()) self.widgets["domainname"].set_text(self.controller.install_profile.get_domainname()) - self.controller.SHOW_BUTTON_EXIT = True - self.controller.SHOW_BUTTON_HELP = True - self.controller.SHOW_BUTTON_BACK = True + self.controller.SHOW_BUTTON_BACK = False self.controller.SHOW_BUTTON_FORWARD = True - self.controller.SHOW_BUTTON_FINISH = False - def deactivate(self): + def next(self): return_value = False # save everything to profile @@ -784,7 +779,7 @@ Don't forget to set a hostname and domain name in the if ip != "dhcp": interfaces[device] = (ip, broadcast, netmask) else: - print options +# print options interfaces[device]=(ip, options, None) if gateway != "": @@ -796,7 +791,7 @@ Don't forget to set a hostname and domain name in the msgdialog=Widgets().error_Box("Malformed IP","Malformed IP address in your gateway!") result = msgdialog.run() msgdialog.destroy() - return False + return iter = store.iter_next(iter) @@ -806,7 +801,7 @@ Don't forget to set a hostname and domain name in the resp = msgdlg.run() msgdlg.destroy() if resp == gtk.RESPONSE_NO: - return False + return # store the stuff try: @@ -815,7 +810,7 @@ Don't forget to set a hostname and domain name in the msgdialog=Widgets().error_Box("Malformed IP","Malformed IP address in one of your interfaces!") result = msgdialog.run() msgdialog.destroy() - return False + return # store dnsdomainname and hostname hostname = self.widgets["hostname"].get_text() @@ -823,13 +818,17 @@ Don't forget to set a hostname and domain name in the if( hostname != "" and domainname != ""): self.controller.install_profile.set_hostname(None, hostname, None) self.controller.install_profile.set_domainname(None, domainname, None) - return_value = True elif( self.first_run == True): msgdialog=Widgets().error_Box("Missing information","You didn't set your hostname and/or dnsdomainname!") result = msgdialog.run() msgdialog.destroy() - return_value = False + return + progress = ProgressDialog(self.controller, ("setup_network_post", ), self.progress_callback) + progress.run() + + def progress_callback(self, result, data=None): + if result == PROGRESS_DONE: + self.controller.load_screen("Logger") else: - return_value = True - - return return_value + GLIScreen.progress_callback(self, result, data) + |