From 86650ffc94f555abc128f23de6e74a59fbb1bc68 Mon Sep 17 00:00:00 2001 From: Mike Fulbright Date: Wed, 7 May 2003 02:03:30 +0000 Subject: Disk capacity is probably more useful than geometry in this day and age --- iw/partition_gui.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'iw') 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() -- cgit