[gnome-boxes] libvirt-machine: Add private 'saving' boolean field



commit 31e28837b53ee7664b87fe10fef9a8168bc226b2
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Oct 24 13:36:30 2014 +0100

    libvirt-machine: Add private 'saving' boolean field
    
    This field is set to true if machine is being saved currently.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=730793

 src/libvirt-machine.vala |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index 8f48162..ff7111c 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -78,6 +78,7 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
     private MachineStat[] stats;
 
     private bool force_stopped;
+    private bool saving; // Machine is being saved currently..
 
     construct {
         stats = new MachineStat[STATS_SIZE];
@@ -431,7 +432,9 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
     }
 
     public async override void save_real () throws GLib.Error {
+        saving = true;
         yield domain.save_async (0, null);
+        saving = false;
     }
 
     public async void suspend () throws GLib.Error {


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