[PATCH rhel6 master] Update spinbutton value in dialogs (#621490)

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

 



NOTE: All 3 dialogs have been tested.

When the keyboard shortcut is used to exit the dialog without changing
focus the spinbutton value isn't updated properly.

This fixes:
 * The shrink dialog
 * The edit partition dialog
 * The lvm partition dialog

Resolves: rhbz#621490
---
 iw/autopart_type.py        |    4 +++-
 iw/lvm_dialog_gui.py       |    4 +++-
 iw/partition_dialog_gui.py |    4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/iw/autopart_type.py b/iw/autopart_type.py
index 9c0ae97..9e9c2cd 100644
--- a/iw/autopart_type.py
+++ b/iw/autopart_type.py
@@ -110,7 +110,9 @@ def whichToShrink(storage, intf):
             return (rc, [])
 
         request = getActive(combo)
-        newSize = dxml.get_widget("shrinkSB").get_value_as_int()
+        sb = dxml.get_widget("shrinkSB")
+        sb.update()
+        newSize = sb.get_value_as_int()
         actions = []
 
         try:
diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index 04a61d5..aca28d4 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -777,7 +777,9 @@ class VolumeGroupEditor:
                     format.migrate = True
 
                 if self.fsoptionsDict.has_key("resizecb") and self.fsoptionsDict["resizecb"].get_active():
-                    targetSize = self.fsoptionsDict["resizesb"].get_value_as_int()
+                    sb = self.fsoptionsDict["resizesb"]
+                    sb.update()
+                    targetSize = sb.get_value_as_int()
                     templv.targetSize = targetSize
 
             if format.exists and format.mountable and format.mountpoint:
diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py
index 6758250..dba78b3 100644
--- a/iw/partition_dialog_gui.py
+++ b/iw/partition_dialog_gui.py
@@ -362,7 +362,9 @@ class PartitionEditor:
 
                 if self.fsoptionsDict.has_key("resizecb") and \
                    self.fsoptionsDict["resizecb"].get_active():
-                    size = self.fsoptionsDict["resizesb"].get_value_as_int()
+                    sb = self.fsoptionsDict["resizesb"]
+                    sb.update()
+                    size = sb.get_value_as_int()
 
                     try:
                         actions.append(ActionResizeDevice(request, size))
-- 
1.7.3.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux