[gnome-boxes] Disable screenshots on machine deletion



commit 30eaf55d06090287faa54983552848d326908149
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Jan 17 00:05:54 2012 +0200

    Disable screenshots on machine deletion
    
    https://bugzilla.gnome.org/show_bug.cgi?id=668059

 src/libvirt-machine.vala |    6 ++++--
 src/machine.vala         |    4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index 0accdeb..7bcefce 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -319,6 +319,10 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
     }
 
     public override void delete (bool by_user = true) {
+        base.delete (by_user);
+
+        set_stats_enable (false);
+
         if (by_user) {
             try {
                 // The reason we fetch the volume before stopping the domain is that we need the domain's
@@ -341,8 +345,6 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
                 warning (err.message);
             }
         }
-
-        set_stats_enable (false);
     }
 
     public async void suspend () throws GLib.Error {
diff --git a/src/machine.vala b/src/machine.vala
index 651ce3f..5c5ea8d 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -222,7 +222,9 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
         return Gdk.pixbuf_get_from_surface (surface, 0, 0, width, height);
     }
 
-    public abstract void delete (bool by_user = true);
+    public virtual void delete (bool by_user = true) {
+        set_screenshot_enable (false);
+    }
 
     public override void ui_state_changed () {
         machine_actor.ui_state = ui_state;



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