summaryrefslogtreecommitdiffstats
path: root/textw
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-07-10 23:16:34 +0000
committerMike Fulbright <msf@redhat.com>2003-07-10 23:16:34 +0000
commit1ed3503f34dd02eb96816ad6420751868f0a8029 (patch)
treef83cb3aa5122ac0f0ef3931341f97441f03e21ef /textw
parentc376c63465fb5d6e0d7e17aa86b6ae0c6437e092 (diff)
downloadanaconda-1ed3503f34dd02eb96816ad6420751868f0a8029.tar.gz
anaconda-1ed3503f34dd02eb96816ad6420751868f0a8029.tar.xz
anaconda-1ed3503f34dd02eb96816ad6420751868f0a8029.zip
add description to network device configuration dialog
Diffstat (limited to 'textw')
-rw-r--r--textw/network_text.py43
1 files changed, 29 insertions, 14 deletions
diff --git a/textw/network_text.py b/textw/network_text.py
index 9c16025c1..8e84b2e79 100644
--- a/textw/network_text.py
+++ b/textw/network_text.py
@@ -71,13 +71,25 @@ class NetworkDeviceWindow:
newopt = (_("Point to Point (IP)"), "remip")
options.append(newopt)
- thegrid = Grid(2, 3 + len(options))
+ descr = dev.get("desc")
+ if descr is not None:
+ toprows = 2
+ else:
+ toprows = 1
+
+ topgrid = Grid(1, toprows)
- thegrid.setField(Label (_("Network Device: %s")
+ topgrid.setField(Label (_("Network Device: %s")
%(dev.info['DEVICE'],)),
- 0, 0, padding = (0, 0, 0, 1), anchorLeft = 1,
+ 0, 0, padding = (0, 0, 0, 0), anchorLeft = 1,
growx = 1)
+ if descr is not None:
+ topgrid.setField(Label (_("Description: %s") % (descr[:70],)),
+ 0, 1, padding = (0, 0, 0, 0), anchorLeft = 1,
+ growx = 1)
+
+ botgrid = Grid(2, 2+len(options))
self.dhcpCb = Checkbox(_("Configure using DHCP"),
isOn = (boot == "dhcp"))
@@ -85,27 +97,28 @@ class NetworkDeviceWindow:
ypad = 1
else:
ypad = 0
- thegrid.setField(self.dhcpCb, 0, 1, anchorLeft = 1, growx = 1,
+
+ currow = 0
+ botgrid.setField(self.dhcpCb, 0, currow, anchorLeft = 1, growx = 1,
padding = (0, 0, 0, ypad))
+ currow += 1
self.onbootCb = Checkbox(_("Activate on boot"), isOn = onbootIsOn)
if showonboot:
- thegrid.setField(self.onbootCb, 0, 2, anchorLeft = 1, growx = 1,
+ botgrid.setField(self.onbootCb, 0, currow, anchorLeft = 1, growx = 1,
padding = (0, 0, 0, 1))
+ currow += 1
-
- row = 3
-
+ row = currow
self.entries = {}
for (name, opt) in options:
- thegrid.setField(Label(name), 0, row, anchorLeft = 1)
+ botgrid.setField(Label(name), 0, row, anchorLeft = 1)
entry = Entry (16)
entry.set(dev.get(opt))
- thegrid.setField(entry, 1, row, padding = (1, 0, 0, 0))
+ botgrid.setField(entry, 1, row, padding = (1, 0, 0, 0))
self.entries[opt] = entry
-
row = row + 1
self.dhcpCb.setCallback(self.setsensitive)
@@ -115,9 +128,11 @@ class NetworkDeviceWindow:
toplevel = GridFormHelp(screen, _("Network Configuration for %s") %
(dev.info['DEVICE']),
- "networkdev", 1, 3)
- toplevel.add(thegrid, 0, 0, (0, 0, 0, 1), anchorLeft = 1)
- toplevel.add(bb, 0, 2, growx = 1)
+ "networkdev", 1, 4)
+
+ toplevel.add(topgrid, 0, 0, (0, 0, 0, 1), anchorLeft = 1)
+ toplevel.add(botgrid, 0, 1, (0, 0, 0, 1), anchorLeft = 1)
+ toplevel.add(bb, 0, 3, growx = 1)
self.setsensitive()