[gnome-boxes] collection-toolbar: Move 'ui-state' connection to setup_ui()



commit 968e9e31d9d7dff4e6f9204651a3b14ac5a19cba
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Wed Jul 16 13:35:32 2014 +0200

    collection-toolbar: Move 'ui-state' connection to setup_ui()
    
    This moves the connection to the App's 'ui-state' notifications from the
    constuctor to setup_ui (). UIState will no more be implemented by App but
    rather by AppWindow, so we must ensure that the window is constructed when
    trying to connect to 'ui-state' notifications.
    
    This is needed to drop the use of AppWindow singleton and therefore to
    make multiple windows possible.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=732098

 src/collection-toolbar.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/collection-toolbar.vala b/src/collection-toolbar.vala
index aba7a9f..3f43137 100644
--- a/src/collection-toolbar.vala
+++ b/src/collection-toolbar.vala
@@ -18,8 +18,6 @@ private class Boxes.CollectionToolbar: HeaderBar {
         var back_icon = (get_direction () == TextDirection.RTL)? "go-previous-rtl-symbolic" :
                                                                  "go-previous-symbolic";
         back_image.set_from_icon_name (back_icon, IconSize.MENU);
-
-        App.app.notify["ui-state"].connect (ui_state_changed);
     }
 
     public void setup_ui () {
@@ -35,6 +33,8 @@ private class Boxes.CollectionToolbar: HeaderBar {
         App.app.collection.item_removed.connect (update_search_btn);
 
         search_btn.bind_property ("active", App.window.searchbar, "search-mode-enabled", 
BindingFlags.BIDIRECTIONAL);
+
+        App.app.notify["ui-state"].connect (ui_state_changed);
     }
 
     [GtkCallback]


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