[gnome-boxes] libvirt-machine: Drop force shutdown warning dialog



commit a6e9494af1c79db71f91b23c026e8d3fabdf6907
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Wed Dec 10 00:17:58 2014 +0000

    libvirt-machine: Drop force shutdown warning dialog
    
    Users generally tend to dismiss such "Are you sure.." warnings and we
    are now decorating the 'Force shutdown' button as a destructive action
    (i-e in the normal theme, its a big red button) so lets ditch this
    dialog.

 src/libvirt-machine.vala |   19 ++-----------------
 1 files changed, 2 insertions(+), 17 deletions(-)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index a41f187..49caa69 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -457,22 +457,7 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
             domain.suspend ();
     }
 
-    public void force_shutdown (bool confirm = true) {
-        if (confirm) {
-            var dialog = new Gtk.MessageDialog (window,
-                                                Gtk.DialogFlags.DESTROY_WITH_PARENT,
-                                                Gtk.MessageType.QUESTION,
-                                                Gtk.ButtonsType.NONE,
-                                                _("When you force shutdown, the box may lose data."));
-            dialog.add_buttons (_("_Cancel"), Gtk.ResponseType.CANCEL,
-                                _("_Shutdown"), Gtk.ResponseType.OK);
-            var response = dialog.run ();
-            dialog.destroy ();
-
-            if (response != Gtk.ResponseType.OK)
-                return;
-        }
-
+    public void force_shutdown () {
         debug ("Force shutdown '%s'..", name);
         try {
             force_stopped = true;
@@ -615,7 +600,7 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
             // Seems guest ignored ACPI shutdown, lets force shutdown with user's consent
             Notification.OKFunc really_force_shutdown = () => {
                 notification = null;
-                force_shutdown (false);
+                force_shutdown ();
             };
 
             var message = _("Restart of '%s' is taking too long. Force it to shutdown?").printf (name);


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