[PATCH] Do not accept changes if the user presses Esc on summary screen.
mulhern
amulhern at redhat.com
Tue Oct 1 15:54:59 UTC 2013
Resolves: rhel7#998384
Changed summary.glade file so it returns numeric value for GTK_RESPONSE_CANCEL
for Cancel button and numeric value for GTK_RESPONSE_ACCEPT for Accept button.
Changed custom.py so returns to custom screen unless return code from summary
screen is GTK_RESPONSE_ACCEPT.
Signed-off-by: mulhern <amulhern at redhat.com>
---
pyanaconda/ui/gui/spokes/custom.py | 2 +-
pyanaconda/ui/gui/spokes/lib/summary.glade | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 8a2b9cd..64abc1d 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -1882,7 +1882,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
dialog.refresh(self.__storage.devicetree.findActions())
rc = dialog.run()
- if rc == 0:
+ if rc != int(Gtk.ResponseType.ACCEPT):
# Cancel. Stay on the custom screen.
return
diff --git a/pyanaconda/ui/gui/spokes/lib/summary.glade b/pyanaconda/ui/gui/spokes/lib/summary.glade
index 3d020e8..aba4914 100644
--- a/pyanaconda/ui/gui/spokes/lib/summary.glade
+++ b/pyanaconda/ui/gui/spokes/lib/summary.glade
@@ -197,8 +197,8 @@
</object>
</child>
<action-widgets>
- <action-widget response="0">summaryCancelButton</action-widget>
- <action-widget response="1">summaryAcceptButton</action-widget>
+ <action-widget response="-6">summaryCancelButton</action-widget>
+ <action-widget response="-3">summaryAcceptButton</action-widget>
</action-widgets>
</object>
</interface>
--
1.8.3.1
More information about the anaconda-patches
mailing list