From d60524355532d92961b118ce2bc7df8e4e18f35e Mon Sep 17 00:00:00 2001 From: Neil Herald Date: Sat, 21 May 2016 20:12:22 +0100 Subject: toolbar: move the new folder/tab/bookmark items into the shared popover The files view creates and owns these buttons currently, meaning they aren't shown on the menu when the Other Locations view is active. This change moves the menu items from the view's toolbar menu ui file and into the ui file for the shared popover, so that the buttons are also shown for Other Locations. https://bugzilla.gnome.org/show_bug.cgi?id=764632 --- src/nautilus-toolbar.c | 3 - src/resources/ui/nautilus-toolbar-view-menu.ui | 81 +------------------------- src/resources/ui/nautilus-toolbar.ui | 81 +++++++++++++++++++++++++- 3 files changed, 81 insertions(+), 84 deletions(-) diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c index 63aa3ff8b..767254e4a 100644 --- a/src/nautilus-toolbar.c +++ b/src/nautilus-toolbar.c @@ -65,7 +65,6 @@ struct _NautilusToolbarPrivate { guint operations_button_attention_timeout_id; GtkWidget *operations_button; - GtkWidget *view_button; GtkWidget *view_menu_slot_section; GtkWidget *view_toggle_button; GtkWidget *view_toggle_icon; @@ -889,7 +888,6 @@ nautilus_toolbar_class_init (NautilusToolbarClass *klass) gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, operations_popover); gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, operations_container); gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, operations_revealer); - gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, view_button); gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, view_menu_slot_section); gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, view_toggle_button); gtk_widget_class_bind_template_child_private (widget_class, NautilusToolbar, view_toggle_icon); @@ -972,7 +970,6 @@ on_slot_view_widget_changed (NautilusToolbar *toolbar, g_list_free (children); view_widget = nautilus_window_slot_get_view_widget (slot); - gtk_widget_set_sensitive (toolbar->priv->view_button, view_widget != NULL); if (view_widget == NULL) return; diff --git a/src/resources/ui/nautilus-toolbar-view-menu.ui b/src/resources/ui/nautilus-toolbar-view-menu.ui index f5cba450a..0d720752a 100644 --- a/src/resources/ui/nautilus-toolbar-view-menu.ui +++ b/src/resources/ui/nautilus-toolbar-view-menu.ui @@ -5,91 +5,12 @@ False vertical 160 - - - True - horizontal - True - 9 - - - - True - view.new-folder - - - True - folder-new-symbolic - 1 - - - - - New Folder - - - - - True - True - 0 - - - - - True - win.bookmark-current-location - - - True - bookmark-new-symbolic - 1 - - - - - Bookmark this Location - - - - - True - True - 1 - - - - - True - win.new-tab - - - True - tab-new-symbolic - 1 - - - - - New Tab - - - - - True - True - 2 - - - - True horizontal True + 9 diff --git a/src/resources/ui/nautilus-toolbar.ui b/src/resources/ui/nautilus-toolbar.ui index 21a751c3b..c63fa8abf 100644 --- a/src/resources/ui/nautilus-toolbar.ui +++ b/src/resources/ui/nautilus-toolbar.ui @@ -72,7 +72,7 @@ - + True True win.view-menu @@ -210,6 +210,85 @@ 9 vertical 160 + + + True + horizontal + True + + + + True + view.new-folder + + + True + folder-new-symbolic + 1 + + + + + New Folder + + + + + True + True + 0 + + + + + True + win.bookmark-current-location + + + True + bookmark-new-symbolic + 1 + + + + + Bookmark this Location + + + + + True + True + 1 + + + + + True + win.new-tab + + + True + tab-new-symbolic + 1 + + + + + New Tab + + + + + True + True + 2 + + + + True -- cgit v1.2.1