[gnome-boxes] vm-creator: Only unpause VMs automatically on startup



commit 30515e2b7b7af2cba7e58f9d262e52447d0617ec
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Wed Nov 21 20:59:15 2012 +0200

    vm-creator: Only unpause VMs automatically on startup
    
    This fixes the issue of user unable to pause under-installation VMs
    for good.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688831

 src/vm-creator.vala |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index 69f3e98..580183d 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -24,7 +24,8 @@ private class Boxes.VMCreator {
         machine.vm_creator = this;
         update_machine_info (machine);
 
-        on_machine_state_changed (machine);
+        if (machine.state == Machine.MachineState.SAVED && VMConfigurator.is_install_config (machine.domain_config))
+            machine.domain.start_async.begin (0, null);
     }
 
     public async LibvirtMachine create_vm (Cancellable? cancellable) throws GLib.Error {
@@ -99,11 +100,9 @@ private class Boxes.VMCreator {
             return;
 
         if (machine.state == Machine.MachineState.SAVED) {
-            debug ("'%s' has saved state, no need for post-installation setup on it", machine.name);
             // This means the domain was just saved and thefore this is not yet the time to take any post-install
             // steps for this domain.
-            if (VMConfigurator.is_install_config (machine.domain_config))
-                domain.start_async.begin (0, null);
+            debug ("'%s' has saved state, no need for post-installation setup on it", machine.name);
 
             return;
         }



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