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




commit 34916821622a7b77b6d1e12dcc300cec1fba207b
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 e0eec7971..ca037ab1a 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -1696,7 +1696,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);
@@ -1706,7 +1705,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]