diff options
author | Jeremy Katz <katzj@redhat.com> | 2007-11-29 11:20:05 -0500 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2007-11-29 16:43:45 -0500 |
commit | b8ea610073747bc8d5ddcd41531e38b7a351532f (patch) | |
tree | 4c13178546fb511938d14e6e583622937130e09f /iw | |
parent | c34349ac9ab37bb7ee1264057ab06f6b84608968 (diff) | |
download | anaconda-b8ea610073747bc8d5ddcd41531e38b7a351532f.tar.gz anaconda-b8ea610073747bc8d5ddcd41531e38b7a351532f.tar.xz anaconda-b8ea610073747bc8d5ddcd41531e38b7a351532f.zip |
Give access to partitions when determining min/max size to resize; also keep
track of the request being resizable rather than just the filesystem
Diffstat (limited to 'iw')
-rw-r--r-- | iw/lvm_dialog_gui.py | 2 | ||||
-rw-r--r-- | iw/partition_dialog_gui.py | 2 | ||||
-rw-r--r-- | iw/partition_ui_helpers_gui.py | 11 | ||||
-rw-r--r-- | iw/raid_dialog_gui.py | 2 |
4 files changed, 8 insertions, 9 deletions
diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py index 560970f1c..88ead9f33 100644 --- a/iw/lvm_dialog_gui.py +++ b/iw/lvm_dialog_gui.py @@ -463,7 +463,7 @@ class VolumeGroupEditor: self.fsoptionsDict = {} if logrequest.getPreExisting(): - (row, self.fsoptionsDict) = createPreExistFSOptionSection(logrequest, maintable, row, mountCombo, ignorefs = ["software RAID", "physical volume (LVM)", "vfat"]) + (row, self.fsoptionsDict) = createPreExistFSOptionSection(logrequest, maintable, row, mountCombo, self.partitions, ignorefs = ["software RAID", "physical volume (LVM)", "vfat"]) dialog.vbox.pack_start(maintable) dialog.show_all() diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py index fa7a6fd5a..0dc13acf5 100644 --- a/iw/partition_dialog_gui.py +++ b/iw/partition_dialog_gui.py @@ -444,7 +444,7 @@ class PartitionEditor: # aren't protected (we'd still like to be able to mount them, though) self.fsoptionsDict = {} if self.origrequest.type == REQUEST_PREEXIST and self.origrequest.fstype and not self.origrequest.getProtected(): - (row, self.fsoptionsDict) = createPreExistFSOptionSection(self.origrequest, maintable, row, self.mountCombo) + (row, self.fsoptionsDict) = createPreExistFSOptionSection(self.origrequest, maintable, row, self.mountCombo, self.partitions) # size options if self.origrequest.type == REQUEST_NEW: diff --git a/iw/partition_ui_helpers_gui.py b/iw/partition_ui_helpers_gui.py index e4477d238..4773e8ea3 100644 --- a/iw/partition_ui_helpers_gui.py +++ b/iw/partition_ui_helpers_gui.py @@ -270,7 +270,7 @@ def noformatCB(widget, data): resizesb - spinbutton with resize target """ def createPreExistFSOptionSection(origrequest, maintable, row, mountCombo, - ignorefs=[]): + partitions, ignorefs=[]): rc = {} ofstype = origrequest.fstype @@ -316,9 +316,8 @@ def createPreExistFSOptionSection(origrequest, maintable, row, mountCombo, migratecb = None migfstypeCombo = None - # FIXME: we should support resizing LVs too - if origrequest.origfstype.isResizable() and origrequest.type == REQUEST_PREEXIST: - resizecb = gtk.CheckButton(label=_("_Resize partition")) + if origrequest.isResizable(): + resizecb = gtk.CheckButton(label=_("_Resize")) resizecb.set_active(origrequest.targetSize is not None) rc["resizecb"] = resizecb maintable.attach(resizecb, 0, 1, row, row + 1) @@ -328,8 +327,8 @@ def createPreExistFSOptionSection(origrequest, maintable, row, mountCombo, else: value = origrequest.size - reqlower = origrequest.getMinimumResizeMB() - requpper = origrequest.getMaximumResizeMB() + reqlower = origrequest.getMinimumResizeMB(partitions) + requpper = origrequest.getMaximumResizeMB(partitions) if not origrequest.format: lower = reqlower else: diff --git a/iw/raid_dialog_gui.py b/iw/raid_dialog_gui.py index 22123f8b0..563cc4a76 100644 --- a/iw/raid_dialog_gui.py +++ b/iw/raid_dialog_gui.py @@ -444,7 +444,7 @@ class RaidEditor: maintable.attach(self.lukscb, 0, 2, row, row + 1) row = row + 1 else: - (row, self.fsoptionsDict) = createPreExistFSOptionSection(self.origrequest, maintable, row, self.mountCombo) + (row, self.fsoptionsDict) = createPreExistFSOptionSection(self.origrequest, maintable, row, self.mountCombo, self.partitions) # put main table into dialog dialog.vbox.pack_start(maintable) |