Hi, On 08/25/2009 06:36 AM, David Cantrell wrote:
Prevent users from creating resize actions that would go past the end of the disk. Take in to account the disk geometry as well as the maximum size of the resizable filesystem.
Looks ok, Regards, Hans
--- iw/partition_ui_helpers_gui.py | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/iw/partition_ui_helpers_gui.py b/iw/partition_ui_helpers_gui.py index f5650e9..fe28088 100644 --- a/iw/partition_ui_helpers_gui.py +++ b/iw/partition_ui_helpers_gui.py @@ -380,13 +380,17 @@ def createPreExistFSOptionSection(origrequest, maintable, row, mountCombo, else: value = origrequest.size - reqlower = origrequest.minSize + reqlower = 1 requpper = origrequest.maxSize + if origfs.exists: - lower = reqlower - else: - lower = 1 - adj = gtk.Adjustment(value = value, lower = lower, + reqlower = origrequest.minSize + + geomsize = origrequest.partedPartition.geometry.getSize(unit="MB") + if (requpper != 0) and (requpper> geomsize): + requpper = geomsize + + adj = gtk.Adjustment(value = value, lower = reqlower, upper = requpper, step_incr = 1) resizesb = gtk.SpinButton(adj, digits = 0) resizesb.set_property('numeric', True)
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list