[PATCH 2/2] Reset the back_clicked flag if we stay on the Storage spoke (#1210003)

Vratislav Podzimek vpodzime at redhat.com
Thu Apr 9 10:44:24 UTC 2015


Otherwise later click on the Done button would look like if the user clicked the
Done button twice in a row without our handler being finished and would thus be
ignored.

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

diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index a84e13e..3cba326 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -794,6 +794,7 @@ class StorageSpoke(NormalSpoke, StorageChecker):
                     # there was no formatting done.
                     # NOTE: rc == 2 means the user clicked on the link that takes t
                     # back to the hub.
+                    self._back_clicked = False
                     return
 
         # Figure out if the existing disk labels will work on this platform
@@ -855,6 +856,7 @@ class StorageSpoke(NormalSpoke, StorageChecker):
 
                 # We might first need to ask about an encryption passphrase.
                 if not self._check_encrypted():
+                    self._back_clicked = False
                     return
 
                 # Oh and then we might also want to go to the reclaim dialog.
@@ -863,10 +865,12 @@ class StorageSpoke(NormalSpoke, StorageChecker):
                     if not self._show_resize_dialog(disks):
                         # User pressed cancel on the reclaim dialog, so don't leave
                         # the storage spoke.
+                        self._back_clicked = False
                         return
         elif rc == RESPONSE_CANCEL:
             # A cancel button was clicked on one of the dialogs.  Stay on this
             # spoke.  Generally, this is because the user wants to add more disks.
+            self._back_clicked = False
             return
         elif rc == RESPONSE_MODIFY_SW:
             # The "Fedora software selection" link was clicked on one of the
@@ -884,6 +888,7 @@ class StorageSpoke(NormalSpoke, StorageChecker):
             if not self._show_resize_dialog(disks):
                 # User pressed cancel on the reclaim dialog, so don't leave
                 # the storage spoke.
+                self._back_clicked = False
                 return
 
             # And then go to the custom partitioning spoke if they chose to
@@ -900,6 +905,7 @@ class StorageSpoke(NormalSpoke, StorageChecker):
         else:
             # I don't know how we'd get here, but might as well have a
             # catch-all.  Just stay on this spoke.
+            self._back_clicked = False
             return
 
         if self.autopart:
-- 
2.1.0



More information about the anaconda-patches mailing list