summaryrefslogtreecommitdiffstats
path: root/textw
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2002-02-11 22:01:44 +0000
committerMike Fulbright <msf@redhat.com>2002-02-11 22:01:44 +0000
commitaae1bbce4ffb53d033756b249b894e84ba73e050 (patch)
tree2df7b7488988ffdb5c31bcc5571bf2530516fccf /textw
parent9189e40c2a3f580921e52a3b1e326cddd0eb8530 (diff)
downloadanaconda-aae1bbce4ffb53d033756b249b894e84ba73e050.tar.gz
anaconda-aae1bbce4ffb53d033756b249b894e84ba73e050.tar.xz
anaconda-aae1bbce4ffb53d033756b249b894e84ba73e050.zip
fix bug I cant find anymore that makes TUI installer crash if > 12 NICs
Diffstat (limited to 'textw')
-rw-r--r--textw/firewall_text.py36
1 files changed, 15 insertions, 21 deletions
diff --git a/textw/firewall_text.py b/textw/firewall_text.py
index 0a2cb2a75..87ba83ea2 100644
--- a/textw/firewall_text.py
+++ b/textw/firewall_text.py
@@ -59,7 +59,7 @@ class FirewallWindow:
currentRow = 1
devices = network.available().keys()
- self.netCBs = {}
+
if (devices):
devices.sort()
cols = len(devices)
@@ -68,26 +68,20 @@ class FirewallWindow:
cols = 4
else:
rows = 1
- self.devGrid = Grid(cols, rows)
-
+
if devices != []:
- bigGrid.setField (Label(_("Trusted Devices:")), 0, currentRow, (0, 0, 0, 1),
- anchorLeft = 1)
- curcol = 0
- currow = 0
- for dev in devices:
+ bigGrid.setField (Label(_("Trusted Devices:")), 0,
+ currentRow, (0, 0, 0, 1), anchorLeft = 1)
+
+ devicelist = CheckboxTree(height=3, scroll=1)
+ bigGrid.setField (devicelist, 1, currentRow,
+ (1, 0, 0, 1), anchorLeft = 1)
+ currentRow = currentRow + 1
+ for dev in devices:
if network.netdevices[dev].get('bootproto') == 'dhcp':
firewall.dhcp = 1
- cb = Checkbox (dev, dev in firewall.trustdevs)
- self.devGrid.setField(cb, curcol, currow, (0, 0, 1, 0), anchorLeft = 1)
- self.netCBs[dev] = cb
- curcol = curcol + 1
- if curcol >= cols:
- currow = currow + 1
- curcol = 1
- bigGrid.setField (self.devGrid, 1, currentRow, (1, 0, 0, 1), anchorLeft = 1)
- currentRow = currentRow + 1
-
+ devicelist.append(dev, selected = (dev in firewall.trustdevs))
+
bigGrid.setField (Label(_("Allow incoming:")), 0, currentRow, (0, 0, 0, 0),
anchorTop = 1)
@@ -211,9 +205,9 @@ class FirewallWindow:
screen.popWindow()
firewall.trustdevs = []
- for device in self.netCBs.keys():
- if self.netCBs[device].selected():
- firewall.trustdevs.append(device)
+ for dev in devicelist.getSelection():
+ firewall.trustdevs.append(dev)
+
# firewall.portlist = self.other.value()
firewall.dhcp = self.dhcp.selected()
firewall.ssh = self.ssh.selected()