diff options
author | David Cantrell <dcantrell@redhat.com> | 2007-04-03 17:56:11 +0000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2007-04-03 17:56:11 +0000 |
commit | 98516cb5077ac456ae36cdf36cf82e72fd5fa9f9 (patch) | |
tree | ec493a7d633ae7f41f75026163a1a1f888e7287a /textw | |
parent | cc007c3a73cb6a2019bd6a14ba90b2e24bfc5cdd (diff) | |
download | anaconda-98516cb5077ac456ae36cdf36cf82e72fd5fa9f9.tar.gz anaconda-98516cb5077ac456ae36cdf36cf82e72fd5fa9f9.tar.xz anaconda-98516cb5077ac456ae36cdf36cf82e72fd5fa9f9.zip |
* textw/partition_text.py (PartitionTypeWindow): Modify device list
to provide size and model information like we do in iw mode.
Diffstat (limited to 'textw')
-rw-r--r-- | textw/partition_text.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/textw/partition_text.py b/textw/partition_text.py index c5e8b35be..74adcf86e 100644 --- a/textw/partition_text.py +++ b/textw/partition_text.py @@ -1576,23 +1576,27 @@ class PartitionTypeWindow: disks = anaconda.id.diskset.disks.keys() disks.sort() cleardrives = anaconda.id.partitions.autoClearPartDrives - if not cleardrives or len(cleardrives) < 1: - cleardrives = disks for disk in disks: - if disk in cleardrives: - if disk != self.anaconda.updateSrc: + size = getDeviceSizeMB(anaconda.id.diskset.disks[disk].dev) + model = anaconda.id.diskset.disks[disk].dev.model + + if not cleardrives or len(cleardrives) < 1: + selected = 1 + else: + if disk in cleardrives: selected = 1 else: selected = 0 - else: - selected = 0 - self.drivelist.append(disk, selected = selected) - + sizestr = "%8.0f MB" % (size,) + diskdesc = "%6s %s (%s)" % (disk, sizestr, model[:24],) + + drivelist.append(diskdesc, selected = selected) + rc = g.run() - sel = self.drivelist.getSelection() + sel = [self.drivelist.getSelection()[0].split()[0]] partmethod_ans = typebox.current() res = bb.buttonPressed(rc) |