diff options
author | Carlos Soriano <csoriano@redhat.com> | 2018-07-19 16:08:12 +0200 |
---|---|---|
committer | Carlos Soriano <csoriano@redhat.com> | 2018-07-19 22:11:52 +0200 |
commit | 544c1cca5692c5dc81a14ce8176b197f671c966c (patch) | |
tree | 8e99742073c17963352313bc069880bd63612c01 /src/nautilus-toolbar.c | |
parent | 28f2922a91f76400fa2b3fa2862f710c0b11fab5 (diff) | |
download | nautilus-544c1cca5692c5dc81a14ce8176b197f671c966c.tar.gz |
pathbar: Extend button menu with extensions and templates
One of the benefits of the new menu on the path bar buttons is that we
show the background menu.
This was the intended design since the start, but we didn't come to
finalize it earlier on.
Now with the 3.30 approaching, this work implements that.
Closes https://gitlab.gnome.org/GNOME/nautilus/issues/405
Diffstat (limited to 'src/nautilus-toolbar.c')
-rw-r--r-- | src/nautilus-toolbar.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c index 03dd73588..4664ae54a 100644 --- a/src/nautilus-toolbar.c +++ b/src/nautilus-toolbar.c @@ -1234,6 +1234,24 @@ container_remove_all_children (GtkContainer *container) } static void +slot_on_extensions_background_menu_changed (NautilusToolbar *self, + GParamSpec *param, + NautilusWindowSlot *slot) +{ + nautilus_path_bar_set_extensions_background_menu (NAUTILUS_PATH_BAR (self->path_bar), + nautilus_window_slot_get_extensions_background_menu (slot)); +} + +static void +slot_on_templates_menu_changed (NautilusToolbar *self, + GParamSpec *param, + NautilusWindowSlot *slot) +{ + nautilus_path_bar_set_templates_menu (NAUTILUS_PATH_BAR (self->path_bar), + nautilus_window_slot_get_templates_menu (slot)); +} + +static void on_slot_toolbar_menu_sections_changed (NautilusToolbar *self, GParamSpec *param, NautilusWindowSlot *slot) @@ -1344,7 +1362,10 @@ nautilus_toolbar_set_window_slot (NautilusToolbar *self, on_slot_toolbar_menu_sections_changed (self, NULL, self->window_slot); g_signal_connect_swapped (self->window_slot, "notify::toolbar-menu-sections", G_CALLBACK (on_slot_toolbar_menu_sections_changed), self); - + g_signal_connect_swapped (self->window_slot, "notify::extensions-background-menu", + G_CALLBACK (slot_on_extensions_background_menu_changed), self); + g_signal_connect_swapped (self->window_slot, "notify::templates-menu", + G_CALLBACK (slot_on_templates_menu_changed), self); g_signal_connect_swapped (window_slot, "notify::searching", G_CALLBACK (toolbar_update_appearance), self); |