[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 5/5] Limit the swap size when fill all available space is selected



Resolves: rhbz#744129
---
 iw/partition_dialog_gui.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py
index 2bf053a..cbd365c 100644
--- a/iw/partition_dialog_gui.py
+++ b/iw/partition_dialog_gui.py
@@ -93,7 +93,7 @@ class PartitionEditor:
 
 	frame.add(sizeoptiontable)
 
-	return (frame, fixedrb, fillmaxszrb, fillmaxszsb)
+	return (frame, fixedrb, fillmaxszrb, fillmaxszsb, fillunlimrb)
 
 
     def run(self):
@@ -163,6 +163,9 @@ class PartitionEditor:
                 else:
                     maxsize = 0
 
+                if self.fillunlimrb.get_active() and (fmt_class._type == "swap"):
+                    maxsize = SWAP_SIZE_LIMIT
+
                 allowdrives = []
                 model = self.driveview.get_model()
                 iter = model.get_iter_first()
@@ -526,8 +529,8 @@ class PartitionEditor:
         # size options
         if not self.origrequest.exists:
             (sizeframe, self.fixedrb, self.fillmaxszrb,
-             self.fillmaxszsb) = self.createSizeOptionsFrame(self.origrequest,
-                                                        self.fillmaxszCB)
+             self.fillmaxszsb, self.fillunlimrb) = self.createSizeOptionsFrame(
+                                                        self.origrequest, self.fillmaxszCB)
             self.sizespin.connect("value-changed", self.sizespinchangedCB,
                                   self.fillmaxszsb)
 
-- 
1.7.4.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]