diff options
author | bfox <bfox> | 2001-02-09 23:42:04 +0000 |
---|---|---|
committer | bfox <bfox> | 2001-02-09 23:42:04 +0000 |
commit | a2d421d00db7b203e6a4ce79475c3ae51a772684 (patch) | |
tree | fe54c2c55c55212deb289579c31c203783049641 /textw | |
parent | dc7f4cba98129081c585a5b27c7a6491a0b802ac (diff) | |
download | anaconda-a2d421d00db7b203e6a4ce79475c3ae51a772684.tar.gz anaconda-a2d421d00db7b203e6a4ce79475c3ae51a772684.tar.xz anaconda-a2d421d00db7b203e6a4ce79475c3ae51a772684.zip |
If there are no network devices, the trusted device list is not shown
Diffstat (limited to 'textw')
-rw-r--r-- | textw/firewall_text.py | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/textw/firewall_text.py b/textw/firewall_text.py index bf731e002..77e0bdd5d 100644 --- a/textw/firewall_text.py +++ b/textw/firewall_text.py @@ -55,22 +55,26 @@ class FirewallWindow: rows = 1 self.devGrid = Grid(cols, rows) - bigGrid.setField (Label(_("Trusted Devices:")), 0, currentRow, (0, 0, 0, 1), - anchorLeft = 1) - curcol = 0 - currow = 0 - for dev in devices: - if todo.network.netdevices[dev].get('bootproto') == 'dhcp': - todo.firewall.dhcp = 1 - cb = Checkbox (dev, dev in todo.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 + if devices != []: + bigGrid.setField (Label(_("Trusted Devices:")), 0, currentRow, (0, 0, 0, 1), + anchorLeft = 1) + curcol = 0 + currow = 0 + for dev in devices: + if todo.network.netdevices[dev].get('bootproto') == 'dhcp': + todo.firewall.dhcp = 1 + cb = Checkbox (dev, dev in todo.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 + + + bigGrid.setField (Label(_("Allow incoming:")), 0, currentRow, (0, 0, 0, 0), anchorTop = 1) |