[gnome-boxes] display-toolbar: Show back button only on main window



commit c390167d74f6673ded6634af006a31f13c8cc5e7
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Thu Aug 14 09:11:59 2014 +0200

    display-toolbar: Show back button only on main window
    
    This forbids non-main windows to access the collection view.
    
    This is needed to make multiple windows possible.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=734486

 src/display-toolbar.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/display-toolbar.vala b/src/display-toolbar.vala
index 2de6165..072869d 100644
--- a/src/display-toolbar.vala
+++ b/src/display-toolbar.vala
@@ -55,6 +55,10 @@ private class Boxes.DisplayToolbar: Gtk.HeaderBar {
 
     public void setup_ui (AppWindow window) {
         this.window = window;
+
+        App.app.notify["main-window"].connect (() => {
+            back.visible = (window == App.app.main_window);
+        });
 }
 
     private bool button_down;


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