diff options
author | Peter Jones <pjones@redhat.com> | 2009-08-06 10:42:55 -0400 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2009-08-06 14:37:46 -0400 |
commit | 979cea3946ec0de0b2f33adfceef8057287c23b3 (patch) | |
tree | 3cdaee57d5a1720aeb37f3cc47a13e1500221481 | |
parent | 4cbcf48202a7452a54034ab83d217f672e6dd27e (diff) | |
download | anaconda-979cea3946ec0de0b2f33adfceef8057287c23b3.tar.gz anaconda-979cea3946ec0de0b2f33adfceef8057287c23b3.tar.xz anaconda-979cea3946ec0de0b2f33adfceef8057287c23b3.zip |
Add a description to DiskDevice, and use it in the UI.
Right now we identify disks as partedDisk.model, which looks really bad
when using DM-based devices. Add a description to DiskDevice,
defaulting do partedDisk.model, and use it in the UI, so that subclasses
can easily replace this with more useful text.
-rw-r--r-- | iw/autopart_type.py | 2 | ||||
-rw-r--r-- | iw/partition_ui_helpers_gui.py | 2 | ||||
-rw-r--r-- | storage/devices.py | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/iw/autopart_type.py b/iw/autopart_type.py index 9c04e52b2..2695b9499 100644 --- a/iw/autopart_type.py +++ b/iw/autopart_type.py @@ -487,7 +487,7 @@ class PartitionTypeWindow(InstallWindow): for disk in self.storage.disks: if disk.name not in self.anaconda.id.bootloader.drivelist: continue - dispstr = "%s %8.0f MB %s" %(disk.name, disk.size, disk.model) + dispstr = "%s %8.0f MB %s" %(disk.name, disk.size, disk.description) i = bootstore.append(None) bootstore[i] = (dispstr, disk.name) if disk.name == defaultBoot: diff --git a/iw/partition_ui_helpers_gui.py b/iw/partition_ui_helpers_gui.py index f73903ee2..f5650e9c7 100644 --- a/iw/partition_ui_helpers_gui.py +++ b/iw/partition_ui_helpers_gui.py @@ -155,7 +155,7 @@ def createAllowedDrivesStore(disks, reqdrives, drivelist, selectDrives=True, sizestr = "%8.0f MB" % disk.size drivelist.append_row((disk.name, sizestr, - disk.model), + disk.description), selected) if len(disks) < 2: diff --git a/storage/devices.py b/storage/devices.py index f14842075..3439e8663 100644 --- a/storage/devices.py +++ b/storage/devices.py @@ -783,6 +783,10 @@ class DiskDevice(StorageDevice): return getattr(self.partedDevice, "model", None) @property + def description(self): + return self.model + + @property def size(self): """ The disk's size in MB """ return super(DiskDevice, self).size |