[gnome-boxes] machine: Don't switch away from properties on display disconnection
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] machine: Don't switch away from properties on display disconnection
- Date: Fri, 29 Aug 2014 16:15:26 +0000 (UTC)
commit cb1a3cced70d9e9ea67c3e03e7e4df566a5c9a16
Author: Timm Bäder <mail baedert org>
Date: Tue Aug 12 21:12:30 2014 +0200
machine: Don't switch away from properties on display disconnection
If the user reverts to a snapshots and the domain is running, it will
temporarily be paused, causing its display to disconnect. We normally
switch to the collections view, but let's not do it if the user is
currently in the properties view since the state change is just normal
when reverting to a snapshot.
https://bugzilla.gnome.org/show_bug.cgi?id=710306
src/machine.vala | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/machine.vala b/src/machine.vala
index f715936..da0d83e 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -72,6 +72,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
if (display != null && !stay_on_display &&
window.current_item == this &&
value != MachineState.RUNNING &&
+ window.ui_state != UIState.PROPERTIES &&
value != MachineState.UNKNOWN) {
window.set_state (Boxes.UIState.COLLECTION);
}
@@ -100,6 +101,13 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
widget.grab_focus ();
break;
+
+ case Boxes.UIState.PROPERTIES:
+ var widget = display.get_display (0);
+ widget_remove (widget);
+ display.set_enable_inputs (widget, true);
+ window.display_page.replace_display (display, widget);
+ break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]