[gnome-boxes] machine: Ignore disconnection during props



commit 7c91133afd85307c6408b9e688e1436354b8c396
Author: Timm Bäder <mail baedert org>
Date:   Sun Aug 17 16:06:50 2014 +0200

    machine: Ignore disconnection during props
    
    State changes to STOPPED are completely normal if the user reverts to a
    snapshot that was taken when the machine was stopped, so don't show any
    error message in this case and don't switch to the collections view.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710306

 src/machine.vala |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/machine.vala b/src/machine.vala
index da0d83e..b99bff0 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -149,10 +149,13 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
 
             disconnected_id = _display.disconnected.connect ((failed) => {
                 message (@"display $name disconnected");
-                if (!stay_on_display && window.current_item == this)
-                    window.set_state (Boxes.UIState.COLLECTION);
-                if (failed)
-                    window.notificationbar.display_error (_("Connection to '%s' failed").printf (name));
+                if (window.ui_state != UIState.PROPERTIES) {
+                    if (!stay_on_display && window.current_item == this)
+                        window.set_state (Boxes.UIState.COLLECTION);
+
+                    if (failed)
+                        window.notificationbar.display_error (_("Connection to '%s' failed").printf (name));
+                }
             });
 
             need_password_id = _display.notify["need-password"].connect (handle_auth);


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