diff options
Diffstat (limited to 'iw')
-rw-r--r-- | iw/ipwidget.py | 18 | ||||
-rw-r--r-- | iw/network_gui.py | 4 | ||||
-rw-r--r-- | iw/partition_gui.py | 18 | ||||
-rw-r--r-- | iw/zipl_gui.py | 60 |
4 files changed, 53 insertions, 47 deletions
diff --git a/iw/ipwidget.py b/iw/ipwidget.py index 19375e210..cc9939959 100644 --- a/iw/ipwidget.py +++ b/iw/ipwidget.py @@ -20,11 +20,9 @@ import gettext import gtk import gobject import gui +import network from rhpl.translate import _, N_ -ip_re = re.compile('^([0-2]?[0-9]?[0-9])\\.([0-2]?[0-9]?[0-9])\\.([0-2]?[0-9]?[0-9])\\.([0-2]?[0-9]?[0-9])$') -_=gettext.gettext - ip_fields = ['entry1', 'entry2', 'entry3', 'entry4'] # Includes an error message, and the widget with problems @@ -72,18 +70,8 @@ class IPEditor: def hydrate (self, ip_string): self.clear_entries() - #Sanity check the string - m = ip_re.match (ip_string) - try: - if not m: - return - octets = m.groups() - if len(octets) != 4: - return - for octet in octets: - if (int(octet) < 0) or (int(octet) > 255): - return - except TypeError: + octets = network.sanityCheckIPString(ip_string) + if octets is None: return i = 0 diff --git a/iw/network_gui.py b/iw/network_gui.py index 678a23506..164caa5a8 100644 --- a/iw/network_gui.py +++ b/iw/network_gui.py @@ -225,8 +225,8 @@ class NetworkWindow(InstallWindow): options = [(_("_IP Address"), "ipaddr"), (_("Net_mask"), "netmask")] - if len(dev) >= 3 and dev[:3] == 'ctc': - newopt = (_("Point to Point (IP)"), "remip") + if (isPtpDev(dev)): + newopt = (_("_Point to Point (IP)"), "remip") options.append(newopt) ipTable = gtk.Table(len(options), 2) diff --git a/iw/partition_gui.py b/iw/partition_gui.py index 8ec407afb..64492d3df 100644 --- a/iw/partition_gui.py +++ b/iw/partition_gui.py @@ -1335,18 +1335,12 @@ class PartitionWindow(InstallWindow): buttonBox = gtk.HButtonBox() buttonBox.set_layout(gtk.BUTTONBOX_SPREAD) - if iutil.getArch() == "s390": - ops = ((_("_Edit"), self.editCb), - (_("_Delete"), self.deleteCb), - (_("_Reset"), self.resetCb), - (_("Make _RAID"), self.makeraidCB),) - else: - ops = ((_("Ne_w"), self.newCB), - (_("_Edit"), self.editCb), - (_("_Delete"), self.deleteCb), - (_("Re_set"), self.resetCb), - (_("R_AID"), self.makeraidCB), - (_("_LVM"), self.makeLvmCB)) + ops = ((_("Ne_w"), self.newCB), + (_("_Edit"), self.editCb), + (_("_Delete"), self.deleteCb), + (_("Re_set"), self.resetCb), + (_("R_AID"), self.makeraidCB), + (_("_LVM"), self.makeLvmCB)) for label, cb in ops: button = gtk.Button(label) diff --git a/iw/zipl_gui.py b/iw/zipl_gui.py index e646fb209..78aa31422 100644 --- a/iw/zipl_gui.py +++ b/iw/zipl_gui.py @@ -12,14 +12,14 @@ # # must replace with explcit form so update disks will work +import isys +import gtk +import gui +import iutil +import string from iw_gui import * - -from gtk import * -from gnome.ui import * from rhpl.translate import _, N_ -import iutil from package_gui import queryUpgradeContinue -import gui class ZiplWindow (InstallWindow): checkMark = None @@ -56,7 +56,7 @@ class ZiplWindow (InstallWindow): #sys.exit(0) def getNext (self): - self.bl.args.set(self.appendEntry.get_text()) + self.bl.args.set(self.kernelEntry.get_text()) # ZiplWindow tag="zipl" @@ -69,9 +69,9 @@ class ZiplWindow (InstallWindow): defaultDevice = bl.images.getDefault() self.ignoreSignals = 0 - box = GtkVBox(FALSE, 5) + box = gtk.VBox(gtk.FALSE, 5) box.set_border_width(5) - label = GtkLabel(_("The z/IPL Boot Loader will now be installed " + label = gtk.Label(_("The z/IPL Boot Loader will now be installed " "on your system." "\n" "\n" @@ -91,21 +91,45 @@ class ZiplWindow (InstallWindow): "You can now enter any additional kernel parameters " "which your machine or your setup may require.")) label.set_size_request(500, -1) - label.set_line_wrap(TRUE) + label.set_line_wrap(gtk.TRUE) label.set_alignment(0.0, 0.0) label.set_padding(50,50) - box.pack_start(label, FALSE) + box.pack_start(label, gtk.FALSE) - box.pack_start (GtkHSeparator (), FALSE) + box.pack_start (gtk.HSeparator (), gtk.FALSE) - label = GtkLabel(_("Kernel Parameters") + ":") + label = gtk.Label(_("Kernel Parameters") + ":") label.set_alignment(0.0, 0.5) - self.appendEntry = GtkEntry() + self.kernelEntry = gtk.Entry() + clabel1 = gtk.Label(_("Chandev Parameters") + ":") + clabel1.set_alignment(0.0, 0.5) + self.chandeventry1 = gtk.Entry() + clabel2 = gtk.Label(_("Chandev Parameters") + ":") + clabel2.set_alignment(0.0, 0.5) + self.chandeventry2 = gtk.Entry() if bl.args and bl.args.get(): - self.appendEntry.set_text(bl.args.get()) - hbox = GtkHBox(FALSE, 5) - hbox.pack_start(label, FALSE) - hbox.pack_start(self.appendEntry) - box.pack_start(hbox, FALSE) + self.kernelEntry.set_text(bl.args.get()) + if isys.getDasdPorts(): + self.kernelEntry.set_text(self.kernelEntry.get_text() + " dasd=" + isys.getDasdPorts()) + if bl.args and bl.args.chandevget(): + cdevs = bl.args.chandevget() + self.chandeventry1.set_text('') + self.chandeventry2.set_text('') + if len(cdevs) > 0: + self.chandeventry1.set_text(cdevs[0]) + if len(cdevs) > 1: + self.chandeventry2.set_text(string.join(cdevs[1:],';')) + hbox = gtk.HBox(gtk.FALSE, 5) + hbox.pack_start(label, gtk.FALSE) + hbox.pack_start(self.kernelEntry) + box.pack_start(hbox, gtk.FALSE) + hbox1 = gtk.HBox(gtk.FALSE, 5) + hbox1.pack_start(clabel1, gtk.FALSE) + hbox1.pack_start(self.chandeventry1) + box.pack_start(hbox1, gtk.FALSE) + hbox2 = gtk.HBox(gtk.FALSE, 5) + hbox2.pack_start(clabel2, gtk.FALSE) + hbox2.pack_start(self.chandeventry2) + box.pack_start(hbox2, gtk.FALSE) return box |