[nautilus/wip/cdavis/toolbar-refactor: 5/5] window: Use bindings to manage toolbar slot




commit d4cab086918266ea9fbd966f02d3e4841fe23bd3
Author: Christopher Davis <christopherdavis gnome org>
Date:   Fri Jul 22 22:55:32 2022 -0400

    window: Use bindings to manage toolbar slot

 src/nautilus-window.c               | 2 --
 src/resources/ui/nautilus-window.ui | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 9f15be3b0..2c3c70f21 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -1695,7 +1695,6 @@ nautilus_window_set_active_slot (NautilusWindow     *window,
     {
         /* inform slot & view */
         nautilus_window_slot_set_active (old_slot, FALSE);
-        nautilus_toolbar_set_window_slot (NAUTILUS_TOOLBAR (window->toolbar), NULL);
     }
 
     g_set_weak_pointer (&window->active_slot, new_slot);
@@ -1705,7 +1704,6 @@ nautilus_window_set_active_slot (NautilusWindow     *window,
     {
         /* inform slot & view */
         nautilus_window_slot_set_active (new_slot, TRUE);
-        nautilus_toolbar_set_window_slot (NAUTILUS_TOOLBAR (window->toolbar), new_slot);
 
         on_location_changed (window);
     }
diff --git a/src/resources/ui/nautilus-window.ui b/src/resources/ui/nautilus-window.ui
index 7d5d21b3f..fed197148 100644
--- a/src/resources/ui/nautilus-window.ui
+++ b/src/resources/ui/nautilus-window.ui
@@ -37,6 +37,7 @@
               <object class="NautilusToolbar" id="toolbar">
                 <property name="show-sidebar-button" bind-source="content_flap" bind-property="folded" 
bind-flags="sync-create"/>
                 <property name="sidebar-button-active" bind-source="content_flap" 
bind-property="reveal-flap" bind-flags="bidirectional|sync-create"/>
+                <property name="window-slot" bind-source="NautilusWindow" bind-property="active-slot" 
bind-flags="sync-create"/>
               </object>
             </child>
             <child>


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