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



commit c7ad053c37580adb79d8d93026274e8a5baf64ef
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Thu Aug 14 09:10:58 2014 +0200

    collection-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/collection-toolbar.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/collection-toolbar.vala b/src/collection-toolbar.vala
index 5be4e18..71cc071 100644
--- a/src/collection-toolbar.vala
+++ b/src/collection-toolbar.vala
@@ -36,6 +36,7 @@ private class Boxes.CollectionToolbar: HeaderBar {
         search_btn.bind_property ("active", window.searchbar, "search-mode-enabled", 
BindingFlags.BIDIRECTIONAL);
 
         window.notify["ui-state"].connect (ui_state_changed);
+        App.app.notify["main-window"].connect (ui_state_changed);
     }
 
     [GtkCallback]
@@ -76,7 +77,7 @@ private class Boxes.CollectionToolbar: HeaderBar {
 
         case UIState.CREDS:
             new_btn.hide ();
-            back_btn.show ();
+            back_btn.visible = (window == App.app.main_window);
             select_btn.hide ();
             search_btn.hide ();
             break;


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