summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-05-07 02:03:30 +0000
committerMike Fulbright <msf@redhat.com>2003-05-07 02:03:30 +0000
commit86650ffc94f555abc128f23de6e74a59fbb1bc68 (patch)
tree64ff93c559a167aa975362bd3c178e872fd849b2
parent8b878dfd9a8b25dc52c911bda9fa5610c37fef3d (diff)
downloadanaconda-86650ffc94f555abc128f23de6e74a59fbb1bc68.tar.gz
anaconda-86650ffc94f555abc128f23de6e74a59fbb1bc68.tar.xz
anaconda-86650ffc94f555abc128f23de6e74a59fbb1bc68.zip
Disk capacity is probably more useful than geometry in this day and age
-rw-r--r--iw/partition_gui.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 260c1e6ef..97247b981 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -303,12 +303,21 @@ class DiskStripeGraph:
x=0.0, y=yoff,
font="sans",
size_points=9)
- drivetext = ("Drive %s (Geom: %s/%s/%s) "
- "(Model: %s)") % ('/dev/' + drive,
- disk.dev.cylinders,
- disk.dev.heads,
- disk.dev.sectors,
- disk.dev.model)
+ show_geometry = 0
+ if show_geometry:
+ drivetext = ("Drive %s (Geom: %s/%s/%s) "
+ "(Model: %s)") % ('/dev/' + drive,
+ disk.dev.cylinders,
+ disk.dev.heads,
+ disk.dev.sectors,
+ disk.dev.model)
+ else:
+ drivetext = ("Drive %s (%-0.f MB) "
+ "(Model: %s)") % ('/dev/' + drive,
+ partedUtils.getDeviceSizeMB(disk.dev),
+ disk.dev.model)
+
+
text.set(text=drivetext, fill_color='black', anchor=gtk.ANCHOR_NW,
weight=pango.WEIGHT_BOLD)
(xxx1, yyy1, xxx2, yyy2) = text.get_bounds()