[gnome-boxes] props-toolbar: Only return to collection if prev state was display
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] props-toolbar: Only return to collection if prev state was display
- Date: Tue, 21 Oct 2014 14:55:49 +0000 (UTC)
commit 7f9d0dd331752c1a3e0c905cc5bacfe8d1305f18
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Oct 21 15:48:27 2014 +0100
props-toolbar: Only return to collection if prev state was display
In commit commit b68642b we started to always return to 'collection' UI
state on user clicking back button if VM is not running. This was to fix
an issue that is specific to display->properties->display transition and
it breaks for wizard->properties->wizard transition. Lets fix the latter
by making sure we only return to collection state if previous UI state
was 'display'.
https://bugzilla.gnome.org/show_bug.cgi?id=738851
src/properties-toolbar.vala | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/properties-toolbar.vala b/src/properties-toolbar.vala
index 6e6a3bc..af75efe 100644
--- a/src/properties-toolbar.vala
+++ b/src/properties-toolbar.vala
@@ -25,7 +25,8 @@ private class Boxes.PropertiesToolbar: HeaderBar {
[GtkCallback]
private void on_back_clicked () {
- if ((window.current_item as Machine).state != Machine.MachineState.RUNNING)
+ if ((window.current_item as Machine).state != Machine.MachineState.RUNNING &&
+ window.previous_ui_state == UIState.DISPLAY)
window.set_state (UIState.COLLECTION);
else
window.set_state (window.previous_ui_state);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]