[PATCH 5/5] Make size properties refreshing reused code

Vratislav Podzimek vpodzime at redhat.com
Thu Apr 3 11:56:37 UTC 2014


Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/ui/gui/spokes/custom.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index f5426f0..986cc69 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -634,6 +634,10 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
 
         return error
 
+    def _update_size_props(self):
+        self._update_selectors()
+        self._updateSpaceDisplay()
+
     def _save_right_side(self, selector):
         """ Save settings from RHS and apply changes to the device.
 
@@ -934,9 +938,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
             self._devices = self._storage_playground.devices
 
             # update size props of all btrfs devices' selectors
-            self._update_selectors()
-
-            self._updateSpaceDisplay()
+            self._updates_size_props()
 
             self._populate_right_side(selector)
             log.debug("leaving save_right_side")
@@ -1009,8 +1011,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
                         s.size = str(device.size)
 
                 # update size props of all btrfs devices' selectors
-                self._update_selectors()
-                self._updateSpaceDisplay()
+                self._update_size_props()
 
         # it's possible that reformat is active but fstype is unchanged, in
         # which case we're not going to schedule another reformat unless
-- 
1.9.0



More information about the anaconda-patches mailing list