[PATCH 1/2] Confirm before resetting custom partitioning selections (#970093).
Chris Lumens
clumens at redhat.com
Thu Mar 13 20:07:59 UTC 2014
---
pyanaconda/ui/gui/spokes/custom.py | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 45ec28e..7cc1a48 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -2921,7 +2921,23 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# This callback is for the button that just resets the UI to anaconda's
# current understanding of the disk layout.
def on_reset_clicked(self, *args):
- self.refresh()
+ msg = _("Continuing with this action will reset all your partitioning selections "
+ "to their current on-disk state.")
+
+ dlg = Gtk.MessageDialog(flags=Gtk.DialogFlags.MODAL,
+ message_type=Gtk.MessageType.WARNING,
+ buttons=Gtk.ButtonsType.NONE,
+ message_format=msg)
+ dlg.set_decorated(False)
+ dlg.add_buttons(_("_Reset selections"), 0, _("_Preserve current selections"), 1)
+ dlg.set_default_response(1)
+
+ with enlightbox(self.window, dlg):
+ rc = dlg.run()
+ dlg.destroy()
+
+ if not rc:
+ self.refresh()
# This callback is for the button that has anaconda go back and rescan the
# disks to pick up whatever changes the user made outside our control.
--
1.8.3.1
More information about the anaconda-patches
mailing list