summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-02-12 09:47:50 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-02-12 11:30:18 -1000
commit8e8efbfb0d49191c811d9f5eef6f00ed9bf6a6e2 (patch)
tree8fda8f60e5d25677ffbc632aab75ebbaa1dd23f4 /iw
parentc4e53f5b148ec8cc78ea0ba69239fa2734182298 (diff)
downloadanaconda-8e8efbfb0d49191c811d9f5eef6f00ed9bf6a6e2.tar.gz
anaconda-8e8efbfb0d49191c811d9f5eef6f00ed9bf6a6e2.tar.xz
anaconda-8e8efbfb0d49191c811d9f5eef6f00ed9bf6a6e2.zip
Use device property on Disk and Geometry objects.
The property name for Device objects on a Disk or Geometry is 'device', not 'dev'.
Diffstat (limited to 'iw')
-rw-r--r--iw/autopart_type.py12
-rw-r--r--iw/partition_dialog_gui.py2
-rw-r--r--iw/partition_gui.py28
-rw-r--r--iw/partition_ui_helpers_gui.py12
4 files changed, 27 insertions, 27 deletions
diff --git a/iw/autopart_type.py b/iw/autopart_type.py
index d9ccb607f..3db0c4e3b 100644
--- a/iw/autopart_type.py
+++ b/iw/autopart_type.py
@@ -382,18 +382,18 @@ class PartitionTypeWindow(InstallWindow):
else:
defaultBoot = None
for disk in self.diskset.disks.values():
- if not disk.dev.path[5:] in self.anaconda.id.bootloader.drivelist:
+ if not disk.device.path[5:] in self.anaconda.id.bootloader.drivelist:
continue
- size = disk.dev.getSize(unit="MB")
- dispstr = "%s %8.0f MB %s" %(disk.dev.path[5:], size, disk.dev.model)
+ size = disk.device.getSize(unit="MB")
+ dispstr = "%s %8.0f MB %s" %(disk.device.path[5:], size, disk.device.model)
i = bootstore.append(None)
- bootstore[i] = (dispstr, disk.dev.path[5:])
- if disk.dev.path[5:] == defaultBoot:
+ bootstore[i] = (dispstr, disk.device.path[5:])
+ if disk.device.path[5:] == defaultBoot:
self.bootcombo.set_active_iter(i)
if len(bootstore) <= 1:
self.bootcombo.set_sensitive(False)
-
+
def getScreen(self, anaconda):
self.anaconda = anaconda
diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py
index d3e7d5885..77bbdb31a 100644
--- a/iw/partition_dialog_gui.py
+++ b/iw/partition_dialog_gui.py
@@ -384,7 +384,7 @@ class PartitionEditor:
lbl = createAlignedLabel(_("_Start Cylinder:"))
maintable.attach(lbl, 0, 1, row, row + 1)
- maxcyl = self.diskset.disks[origrequest.drive[0]].dev.cylinders
+ maxcyl = self.diskset.disks[origrequest.drive[0]].device.cylinders
cylAdj = gtk.Adjustment(value=origrequest.start,
lower=origrequest.start,
upper=maxcyl,
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 78df8962e..15fbe7b7b 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -154,9 +154,9 @@ class DiskStripeSlice:
def update(self):
disk = self.parent.getDisk()
- totalSectors = float(disk.dev.heads
- * disk.dev.sectors
- * disk.dev.cylinders)
+ totalSectors = float(disk.device.heads
+ * disk.device.sectors
+ * disk.device.cylinders)
# XXX hack but will work for now
if gtk.gdk.screen_width() > 640:
@@ -164,8 +164,8 @@ class DiskStripeSlice:
else:
width = CANVAS_WIDTH_640
- xoffset = self.partition.geom.start / totalSectors * width
- xlength = self.partition.geom.length / totalSectors * width
+ xoffset = self.partition.geometry.start / totalSectors * width
+ xlength = self.partition.geometry.length / totalSectors * width
if self.partition.type & parted.PARTITION_LOGICAL:
yoffset = 0.0 + LOGICAL_INSET
yheight = STRIPE_HEIGHT - (LOGICAL_INSET * 2)
@@ -319,15 +319,15 @@ class DiskStripeGraph:
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)
+ disk.device.cylinders,
+ disk.device.heads,
+ disk.device.sectors,
+ disk.device.model)
else:
drivetext = _("Drive %s (%-0.f MB) "
"(Model: %s)") % ('/dev/' + drive,
- disk.dev.getSize(unit="MB"),
- disk.dev.model)
+ disk.device.getSize(unit="MB"),
+ disk.device.model)
text.set(text=drivetext, fill_color='black', anchor=gtk.ANCHOR_NW,
@@ -826,7 +826,7 @@ class PartitionWindow(InstallWindow):
parent = self.tree.append(drvparent)
self.tree[parent]['Device'] = '/dev/%s' % (drive,)
self.tree[parent]['PyObject'] = str('/dev/%s' % (drive,))
- sectorsPerCyl = disk.dev.heads * disk.dev.sectors
+ sectorsPerCyl = disk.device.heads * disk.device.sectors
extendedParent = None
part = disk.next_partition()
@@ -941,8 +941,8 @@ class PartitionWindow(InstallWindow):
self.tree[iter]['Label'] = ""
self.tree[iter]['Type'] = ptype
- self.tree[iter]['Start'] = str(disk.dev.startSectorToCylinder(part.geom.start))
- self.tree[iter]['End'] = str(disk.dev.endSectorToCylinder(part.geom.end))
+ self.tree[iter]['Start'] = str(disk.device.startSectorToCylinder(part.geometry.start))
+ self.tree[iter]['End'] = str(disk.device.endSectorToCylinder(part.geometry.end))
size = part.getSize(unit="MB")
if size < 1.0:
sizestr = "< 1"
diff --git a/iw/partition_ui_helpers_gui.py b/iw/partition_ui_helpers_gui.py
index c2c491b6c..5697d2b1a 100644
--- a/iw/partition_ui_helpers_gui.py
+++ b/iw/partition_ui_helpers_gui.py
@@ -126,7 +126,7 @@ def setMntPtComboStateFromType(fstype, mountCombo):
mountCombo.set_sensitive(0)
mountCombo.set_data("prevmountable", fstype.isMountable())
-
+
def fstypechangeCB(widget, mountCombo):
fstype = widget.get_active_value()
setMntPtComboStateFromType(fstype, mountCombo)
@@ -137,8 +137,8 @@ def createAllowedDrivesStore(disks, reqdrives, drivelist, selectDrives=True,
drives = disks.keys()
drives.sort()
for drive in drives:
- size = disks[drive].dev.getSize(unit="MB")
- selected = 0
+ size = disks[drive].device.getSize(unit="MB")
+ selected = 0
if selectDrives:
if reqdrives:
@@ -148,11 +148,11 @@ def createAllowedDrivesStore(disks, reqdrives, drivelist, selectDrives=True,
if drive not in disallowDrives:
selected = 1
- sizestr = "%8.0f MB" % size
- drivelist.append_row((drive, sizestr, disks[drive].dev.model), selected)
+ sizestr = "%8.0f MB" % size
+ drivelist.append_row((drive, sizestr, disks[drive].device.model), selected)
if len(disks.keys()) < 2:
- drivelist.set_sensitive(False)
+ drivelist.set_sensitive(False)
else:
drivelist.set_sensitive(True)