[gnome-boxes] libvirt-machine-props: Fix reboot code



commit 89ede18465cfa02cd3a2eb2294d64dd29b79f654
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Mar 21 01:04:58 2013 +0200

    libvirt-machine-props: Fix reboot code
    
    Due to a regression from commit e176e57, we were listening to 'state'
    property change notification on wrong object and as result we were not
    starting the box after its shutdown.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=696239

 src/libvirt-machine-properties.vala |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 5b6c829..8c486e8 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -414,7 +414,7 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
             else
                 property.changed.connect (on_ram_changed);
 
-            this.notify["state"].connect (() => {
+            machine.notify["state"].connect (() => {
                 if (!machine.is_on ())
                     property.reboot_required = false;
             });
@@ -461,7 +461,7 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
             ulong state_id = 0;
             Gd.Notification notification = null;
 
-            state_id = this.notify["state"].connect (() => {
+            state_id = machine.notify["state"].connect (() => {
                 if (machine.state == Machine.MachineState.STOPPED ||
                     machine.state == Machine.MachineState.FORCE_STOPPED) {
                     debug ("'%s' stopped.", machine.name);
@@ -472,7 +472,7 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
                             warning ("Failed to start '%s': %s", machine.domain.get_name (), error.message);
                         }
                     });
-                    this.disconnect (state_id);
+                    machine.disconnect (state_id);
                     if (shutdown_timeout != 0) {
                         Source.remove (shutdown_timeout);
                         shutdown_timeout = 0;


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