diff --git a/configure.ac.in b/configure.ac.in index 5d27c2c00fc090f80ad9cb812a23086f663bf206..0db550506068e7c6ff78e1d1ac766d50aece3907 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -152,7 +152,7 @@ XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.56.0]) XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.22.0]) XDT_CHECK_PACKAGE([GDK_PIXBUF], [gdk-pixbuf-2.0], [2.14.0]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.17.2]) -XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.17.4]) +XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.17.6]) XDT_CHECK_PACKAGE([LIBXFCE4KBD_PRIVATE], [libxfce4kbd-private-3], [4.17.2]) XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.12.0]) XDT_CHECK_PACKAGE([PANGO], [pango], [1.38.0]) diff --git a/thunar/thunar-location-buttons.c b/thunar/thunar-location-buttons.c index ccfc908e1bc177e7fc263181b7af3b4494933e9b..c0b4a393852bb76b3579d1e789d5aa0dccdaa60a 100644 --- a/thunar/thunar-location-buttons.c +++ b/thunar/thunar-location-buttons.c @@ -67,7 +67,6 @@ static void thunar_location_buttons_set_current_directory (Thuna ThunarFile *current_directory); static void thunar_location_buttons_unmap (GtkWidget *widget); static void thunar_location_buttons_on_filler_clicked (ThunarLocationButtons *buttons); -static void thunar_location_buttons_on_search_clicked (ThunarLocationButtons *buttons); static void thunar_location_buttons_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natural); @@ -141,7 +140,6 @@ struct _ThunarLocationButtons GtkWidget *left_slider; GtkWidget *right_slider; GtkWidget *filler_widget; - GtkWidget *search_widget; ThunarFile *current_directory; @@ -231,15 +229,6 @@ thunar_location_buttons_on_filler_clicked (ThunarLocationButtons *buttons) -static void -thunar_location_buttons_on_search_clicked (ThunarLocationButtons *buttons) -{ - GtkWidget *window = gtk_widget_get_toplevel (GTK_WIDGET (buttons)); - thunar_window_action_search (THUNAR_WINDOW (window)); -} - - - static void thunar_location_buttons_init (ThunarLocationButtons *buttons) { @@ -281,17 +270,6 @@ thunar_location_buttons_init (ThunarLocationButtons *buttons) gtk_container_add (GTK_CONTAINER (buttons), buttons->filler_widget); gtk_widget_show (buttons->filler_widget); - buttons->search_widget = gtk_button_new (); - g_signal_connect_swapped (buttons->search_widget, "clicked", G_CALLBACK (thunar_location_buttons_on_search_clicked), buttons); - - icon = gtk_image_new_from_icon_name ("system-search-symbolic", GTK_ICON_SIZE_BUTTON); - gtk_widget_set_halign (icon, GTK_ALIGN_END); - gtk_container_add (GTK_CONTAINER (buttons->search_widget), icon); - gtk_widget_show (icon); - - gtk_container_add (GTK_CONTAINER (buttons), buttons->search_widget); - gtk_widget_show (buttons->search_widget); - g_object_set (buttons, "valign", GTK_ALIGN_CENTER, NULL); /* setup style classes */ @@ -307,8 +285,6 @@ thunar_location_buttons_init (ThunarLocationButtons *buttons) "path-bar-button"); gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (buttons->filler_widget)), "path-bar-button"); - gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (buttons->search_widget)), - "path-bar-button"); buttons->launcher = g_object_new (THUNAR_TYPE_LAUNCHER, "widget", GTK_WIDGET (buttons), NULL); g_signal_connect_swapped (G_OBJECT (buttons->launcher), "change-directory", G_CALLBACK (thunar_location_buttons_set_current_directory), buttons); @@ -554,7 +530,6 @@ thunar_location_buttons_get_path_for_child (GtkContainer *container, */ visible_children = NULL; visible_children = g_list_prepend (visible_children, path_bar->right_slider); - visible_children = g_list_prepend (visible_children, path_bar->search_widget); visible_children = g_list_prepend (visible_children, path_bar->filler_widget); for (l = path_bar->list; l; l = l->next) @@ -677,7 +652,6 @@ thunar_location_buttons_size_allocate (GtkWidget *widget, GtkAllocation folder_button_allocation; GtkAllocation first_slider_allocation; /* left slider if direction is LTR */ GtkAllocation second_slider_allocation; /* right slider if direction is LTR */ - GtkAllocation search_allocation; GtkAllocation filler_allocation; GList *lp; gint required_width_total = 0; @@ -705,25 +679,19 @@ thunar_location_buttons_size_allocate (GtkWidget *widget, second_slider_allocation.height = available_space.height; second_slider_allocation.y = available_space.y; - search_allocation.width = buttons->slider_width; - search_allocation.height = available_space.height; - search_allocation.y = available_space.y; - if (G_LIKELY (direction == GTK_TEXT_DIR_LTR)) { first_slider_allocation.x = available_space.x; second_slider_allocation.x = available_space.x + available_space.width - buttons->slider_width; - search_allocation.x = available_space.x + available_space.width - buttons->slider_width - search_allocation.width; } else { first_slider_allocation.x = available_space.x + available_space.width - buttons->slider_width; second_slider_allocation.x = available_space.x; - search_allocation.x = available_space.x + buttons->slider_width; } gtk_widget_get_preferred_width (buttons->filler_widget, &filler_allocation.width, NULL); - required_width_total += buttons->slider_width * 2 + filler_allocation.width + search_allocation.width; + required_width_total += buttons->slider_width * 2 + filler_allocation.width; filler_allocation.height = available_space.height; filler_allocation.y = available_space.y; @@ -747,7 +715,7 @@ thunar_location_buttons_size_allocate (GtkWidget *widget, else { /* reset calculation for required_width_total .. we need to cut off some folders */ - required_width_total = first_slider_allocation.width + second_slider_allocation.width + search_allocation.width + filler_allocation.width; + required_width_total = first_slider_allocation.width + second_slider_allocation.width + filler_allocation.width; /* No scrolling defined ? Use last button as fixed start! */ if(buttons->last_visible_button == NULL && buttons->first_visible_button == NULL) @@ -815,10 +783,8 @@ thunar_location_buttons_size_allocate (GtkWidget *widget, /* allocate the sliders */ gtk_widget_get_preferred_width (GTK_WIDGET (buttons->left_slider), &temp_width, NULL); //to dont get gtk warnings gtk_widget_get_preferred_width (GTK_WIDGET (buttons->right_slider), &temp_width, NULL); - gtk_widget_get_preferred_width (GTK_WIDGET (buttons->search_widget), &temp_width, NULL); gtk_widget_size_allocate (buttons->left_slider, &first_slider_allocation); gtk_widget_size_allocate (buttons->right_slider, &second_slider_allocation); - gtk_widget_size_allocate (buttons->search_widget, &search_allocation); thunar_location_buttons_update_sliders (buttons); if (need_reorder) @@ -942,9 +908,6 @@ thunar_location_buttons_forall (GtkContainer *container, if (buttons->filler_widget != NULL && include_internals) (*callback) (buttons->filler_widget, callback_data); - - if (buttons->filler_widget != NULL && include_internals) - (*callback) (buttons->search_widget, callback_data); } diff --git a/thunar/thunar-preferences.c b/thunar/thunar-preferences.c index 8c486044bd61ced2d94799c4727cc83411cdc10a..7bc94951a6cee5919beea62bb8b14ebcf5cca870 100644 --- a/thunar/thunar-preferences.c +++ b/thunar/thunar-preferences.c @@ -447,7 +447,7 @@ thunar_preferences_class_init (ThunarPreferencesClass *klass) g_param_spec_string ("last-toolbar-visible-buttons", "LastToolbarVisibleButtons", NULL, - "1,1,1,1,1", + "1,1,1,1,0,0,0,1,0,1", EXO_PARAM_READWRITE); /** @@ -459,7 +459,7 @@ thunar_preferences_class_init (ThunarPreferencesClass *klass) g_param_spec_string ("last-toolbar-item-order", "LastToolbarButtonOrder", NULL, - "0,1,2,3,4", + "0,1,2,3,4,5,6,7,8,9", EXO_PARAM_READWRITE); /** diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c index 95886f7abce68c5cac661a236ece27bf9e33f8ab..66324039015bdab2b919ee20844a232ab6fe353a 100644 --- a/thunar/thunar-window.c +++ b/thunar/thunar-window.c @@ -408,6 +408,9 @@ struct _ThunarWindow GtkWidget *location_toolbar_item_forward; GtkWidget *location_toolbar_item_parent; GtkWidget *location_toolbar_item_home; + GtkWidget *location_toolbar_item_zoom_in; + GtkWidget *location_toolbar_item_zoom_out; + GtkWidget *location_toolbar_item_search; ThunarLauncher *launcher; @@ -496,7 +499,7 @@ static XfceGtkActionEntry thunar_window_action_entries[] = { THUNAR_WINDOW_ACTION_FORWARD, "<Actions>/ThunarStandardView/forward", "<Alt>Right", XFCE_GTK_IMAGE_MENU_ITEM, N_ ("Forward"), N_ ("Go to the next visited folder"), "go-next-symbolic", G_CALLBACK (thunar_window_action_forward), }, { THUNAR_WINDOW_ACTION_SWITCH_PREV_TAB, "<Actions>/ThunarWindow/switch-previous-tab", "<Primary>Page_Up", XFCE_GTK_IMAGE_MENU_ITEM, N_ ("_Previous Tab"), N_ ("Switch to Previous Tab"), "go-previous", G_CALLBACK (thunar_window_action_switch_previous_tab), }, { THUNAR_WINDOW_ACTION_SWITCH_NEXT_TAB, "<Actions>/ThunarWindow/switch-next-tab", "<Primary>Page_Down", XFCE_GTK_IMAGE_MENU_ITEM, N_ ("_Next Tab"), N_ ("Switch to Next Tab"), "go-next", G_CALLBACK (thunar_window_action_switch_next_tab), }, - { THUNAR_WINDOW_ACTION_SEARCH, "<Actions>/ThunarWindow/search", "<Primary>f", XFCE_GTK_IMAGE_MENU_ITEM, N_ ("_Search for Files..."), N_ ("Search for a specific file in the current folder and Recent"), "", G_CALLBACK (thunar_window_action_search), }, + { THUNAR_WINDOW_ACTION_SEARCH, "<Actions>/ThunarWindow/search", "<Primary>f", XFCE_GTK_IMAGE_MENU_ITEM, N_ ("_Search for Files..."), N_ ("Search for a specific file in the current folder and Recent"), "system-search-symbolic", G_CALLBACK (thunar_window_action_search), }, { THUNAR_WINDOW_ACTION_CANCEL_SEARCH, "<Actions>/ThunarWindow/cancel-search", "Escape", XFCE_GTK_MENU_ITEM, N_ ("Cancel search for files"),NULL, "", G_CALLBACK (thunar_window_action_cancel_search), }, { 0, "<Actions>/ThunarWindow/open-file-menu", "F10", 0, NULL, NULL, NULL, G_CALLBACK (thunar_window_action_open_file_menu), }, }; @@ -1715,10 +1718,7 @@ thunar_window_zoom_in (ThunarWindow *window) /* check if we can still zoom in */ if (G_LIKELY (window->zoom_level < THUNAR_ZOOM_N_LEVELS - 1)) - { - thunar_window_set_zoom_level (window, window->zoom_level + 1); - return TRUE; - } + thunar_window_set_zoom_level (window, window->zoom_level + 1); /* required in case of shortcut activation, in order to signal that the accel key got handled */ return TRUE; @@ -1733,10 +1733,7 @@ thunar_window_zoom_out (ThunarWindow *window) /* check if we can still zoom out */ if (G_LIKELY (window->zoom_level > 0)) - { - thunar_window_set_zoom_level (window, window->zoom_level - 1); - return TRUE; - } + thunar_window_set_zoom_level (window, window->zoom_level - 1); /* required in case of shortcut activation, in order to signal that the accel key got handled */ return TRUE; @@ -3067,6 +3064,10 @@ thunar_window_resume_search (ThunarWindow *window, /* the check is useless as long as the workaround is in place */ if (THUNAR_IS_DETAILS_VIEW (window->view)) thunar_details_view_set_location_column_visible (THUNAR_DETAILS_VIEW (window->view), TRUE); + + g_signal_handlers_block_by_func (G_OBJECT (window->location_toolbar_item_search), thunar_window_action_search, window); + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (window->location_toolbar_item_search), TRUE); + g_signal_handlers_unblock_by_func (G_OBJECT (window->location_toolbar_item_search), thunar_window_action_search, window); } @@ -3122,6 +3123,9 @@ thunar_window_action_cancel_search (ThunarWindow *window) thunar_standard_view_save_view_type (THUNAR_STANDARD_VIEW (window->view), 0); } + g_signal_handlers_block_by_func (G_OBJECT (window->location_toolbar_item_search), thunar_window_action_search, window); + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (window->location_toolbar_item_search), FALSE); + g_signal_handlers_unblock_by_func (G_OBJECT (window->location_toolbar_item_search), thunar_window_action_search, window); /* required in case of shortcut activation, in order to signal that the accel key got handled */ return TRUE; } @@ -4352,8 +4356,16 @@ thunar_window_action_search (ThunarWindow *window) { _thunar_return_val_if_fail (THUNAR_IS_WINDOW (window), FALSE); - /* initiate search */ - thunar_window_start_open_location (window, SEARCH_PREFIX); + if (window->is_searching == FALSE) + { + /* initiate search */ + thunar_window_start_open_location (window, SEARCH_PREFIX); + g_signal_handlers_block_by_func (G_OBJECT (window->location_toolbar_item_search), thunar_window_action_search, window); + gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (window->location_toolbar_item_search), TRUE); + g_signal_handlers_unblock_by_func (G_OBJECT (window->location_toolbar_item_search), thunar_window_action_search, window); + } + else + thunar_window_action_cancel_search (window); /* required in case of shortcut activation, in order to signal that the accel key got handled */ return TRUE; @@ -4648,6 +4660,11 @@ thunar_window_set_zoom_level (ThunarWindow *window, /* notify listeners */ g_object_notify (G_OBJECT (window), "zoom-level"); } + + /* check if we can still zoom in and set the sensitivity of the button */ + gtk_widget_set_sensitive (window->location_toolbar_item_zoom_in, (window->zoom_level < THUNAR_ZOOM_N_LEVELS - 1)); + /* check if we can still zoom out and set the sensitivity of the button */ + gtk_widget_set_sensitive (window->location_toolbar_item_zoom_out, (window->zoom_level > 0)); } @@ -5496,8 +5513,10 @@ thunar_window_location_toolbar_add_uca (ThunarWindow *window, static void thunar_window_location_toolbar_create (ThunarWindow *window) { + GtkWidget *button; GtkToolItem *tool_item; - guint *item_order; + guint *item_order_ptr; + guint item_order; gboolean small_icons; g_object_get (G_OBJECT (window->preferences), "misc-small-toolbar-icons", &small_icons, NULL); @@ -5518,34 +5537,62 @@ thunar_window_location_toolbar_create (ThunarWindow *window) gtk_widget_set_hexpand (window->location_toolbar, TRUE); gtk_grid_attach (GTK_GRID (window->grid), window->location_toolbar, 0, 1, 1, 1); + item_order = 0; window->location_toolbar_item_back = xfce_gtk_tool_button_new_from_action_entry (get_action_entry (THUNAR_WINDOW_ACTION_BACK), G_OBJECT (window), GTK_TOOLBAR (window->location_toolbar)); g_object_set_data_full (G_OBJECT (window->location_toolbar_item_back), "label", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_BACK)->menu_item_label_text), g_free); g_object_set_data_full (G_OBJECT (window->location_toolbar_item_back), "icon", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_BACK)->menu_item_icon_name), g_free); - item_order = g_malloc (sizeof (gint)); - *item_order = 0; - g_object_set_data_full (G_OBJECT (window->location_toolbar_item_back), "default-order", item_order, g_free); - item_order = g_object_get_data (G_OBJECT (window->location_toolbar_item_back), "default-order"); + item_order_ptr = g_malloc (sizeof (gint)); + *item_order_ptr = item_order; + g_object_set_data_full (G_OBJECT (window->location_toolbar_item_back), "default-order", item_order_ptr, g_free); + item_order_ptr = g_object_get_data (G_OBJECT (window->location_toolbar_item_back), "default-order"); + item_order++; window->location_toolbar_item_forward = xfce_gtk_tool_button_new_from_action_entry (get_action_entry (THUNAR_WINDOW_ACTION_FORWARD), G_OBJECT (window), GTK_TOOLBAR (window->location_toolbar)); g_object_set_data_full(G_OBJECT (window->location_toolbar_item_forward), "label", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_FORWARD)->menu_item_label_text), g_free); g_object_set_data_full (G_OBJECT (window->location_toolbar_item_forward), "icon", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_FORWARD)->menu_item_icon_name), g_free); - item_order = g_malloc (sizeof (gint)); - *item_order = 1; - g_object_set_data_full (G_OBJECT (window->location_toolbar_item_forward), "default-order", item_order, g_free); + item_order_ptr = g_malloc (sizeof (gint)); + *item_order_ptr = item_order; + g_object_set_data_full (G_OBJECT (window->location_toolbar_item_forward), "default-order", item_order_ptr, g_free); + item_order++; window->location_toolbar_item_parent = xfce_gtk_tool_button_new_from_action_entry (get_action_entry (THUNAR_WINDOW_ACTION_OPEN_PARENT), G_OBJECT (window), GTK_TOOLBAR (window->location_toolbar)); g_object_set_data_full (G_OBJECT (window->location_toolbar_item_parent), "label", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_OPEN_PARENT)->menu_item_label_text), g_free); g_object_set_data_full (G_OBJECT (window->location_toolbar_item_parent), "icon", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_OPEN_PARENT)->menu_item_icon_name), g_free); - item_order = g_malloc (sizeof (gint)); - *item_order = 2; - g_object_set_data_full (G_OBJECT (window->location_toolbar_item_parent), "default-order", item_order, g_free); + item_order_ptr = g_malloc (sizeof (gint)); + *item_order_ptr = item_order; + g_object_set_data_full (G_OBJECT (window->location_toolbar_item_parent), "default-order", item_order_ptr, g_free); + item_order++; window->location_toolbar_item_home = xfce_gtk_tool_button_new_from_action_entry (get_action_entry (THUNAR_WINDOW_ACTION_OPEN_HOME), G_OBJECT (window), GTK_TOOLBAR (window->location_toolbar)); g_object_set_data_full (G_OBJECT (window->location_toolbar_item_home), "label", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_OPEN_HOME)->menu_item_label_text), g_free); g_object_set_data_full (G_OBJECT (window->location_toolbar_item_home), "icon", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_OPEN_HOME)->menu_item_icon_name), g_free); - item_order = g_malloc (sizeof (gint)); - *item_order = 3; - g_object_set_data_full (G_OBJECT (window->location_toolbar_item_home), "default-order", item_order, g_free); + item_order_ptr = g_malloc (sizeof (gint)); + *item_order_ptr = item_order; + g_object_set_data_full (G_OBJECT (window->location_toolbar_item_home), "default-order", item_order_ptr, g_free); + + item_order++; + window->location_toolbar_item_zoom_out = xfce_gtk_tool_button_new_from_action_entry (get_action_entry (THUNAR_WINDOW_ACTION_ZOOM_OUT), G_OBJECT (window), GTK_TOOLBAR (window->location_toolbar)); + g_object_set_data_full (G_OBJECT (window->location_toolbar_item_zoom_out), "label", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_ZOOM_OUT)->menu_item_label_text), g_free); + g_object_set_data_full (G_OBJECT (window->location_toolbar_item_zoom_out), "icon", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_ZOOM_OUT)->menu_item_icon_name), g_free); + item_order_ptr = g_malloc (sizeof (gint)); + *item_order_ptr = item_order; + g_object_set_data_full (G_OBJECT (window->location_toolbar_item_zoom_out), "default-order", item_order_ptr, g_free); + + item_order++; + window->location_toolbar_item_zoom_in = xfce_gtk_tool_button_new_from_action_entry (get_action_entry (THUNAR_WINDOW_ACTION_ZOOM_IN), G_OBJECT (window), GTK_TOOLBAR (window->location_toolbar)); + g_object_set_data_full (G_OBJECT (window->location_toolbar_item_zoom_in), "label", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_ZOOM_IN)->menu_item_label_text), g_free); + g_object_set_data_full (G_OBJECT (window->location_toolbar_item_zoom_in), "icon", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_ZOOM_IN)->menu_item_icon_name), g_free); + item_order_ptr = g_malloc (sizeof (gint)); + *item_order_ptr = item_order; + g_object_set_data_full (G_OBJECT (window->location_toolbar_item_zoom_in), "default-order", item_order_ptr, g_free); + + item_order++; + button = xfce_gtk_tool_button_new_from_action_entry (get_action_entry (THUNAR_WINDOW_ACTION_ZOOM_RESET), G_OBJECT (window), GTK_TOOLBAR (window->location_toolbar)); + g_object_set_data_full (G_OBJECT (button), "label", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_ZOOM_RESET)->menu_item_label_text), g_free); + g_object_set_data_full (G_OBJECT (button), "icon", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_ZOOM_RESET)->menu_item_icon_name), g_free); + item_order_ptr = g_malloc (sizeof (gint)); + *item_order_ptr = item_order; + g_object_set_data_full (G_OBJECT (button), "default-order", item_order_ptr, g_free); g_signal_connect (G_OBJECT (window->location_toolbar_item_back), "button-press-event", G_CALLBACK (thunar_window_history_clicked), G_OBJECT (window)); g_signal_connect (G_OBJECT (window->location_toolbar_item_forward), "button-press-event", G_CALLBACK (thunar_window_history_clicked), G_OBJECT (window)); @@ -5558,15 +5605,32 @@ thunar_window_location_toolbar_create (ThunarWindow *window) g_signal_connect (window, "key-press-event", G_CALLBACK (thunar_window_check_uca_key_activation), NULL); /* add the location bar to the toolbar */ + item_order++; tool_item = gtk_tool_item_new (); gtk_tool_item_set_expand (tool_item, TRUE); gtk_toolbar_insert (GTK_TOOLBAR (window->location_toolbar), tool_item, -1); gtk_toolbar_set_show_arrow (GTK_TOOLBAR (window->location_toolbar), FALSE); g_object_set_data_full (G_OBJECT (tool_item), "label", g_strdup ("Location Bar"), g_free); g_object_set_data_full (G_OBJECT (tool_item), "icon", g_strdup(""), g_free); - item_order = g_malloc (sizeof (gint)); - *item_order = 4; - g_object_set_data_full (G_OBJECT (tool_item), "default-order", item_order, g_free); + item_order_ptr = g_malloc (sizeof (gint)); + *item_order_ptr = item_order; + g_object_set_data_full (G_OBJECT (tool_item), "default-order", item_order_ptr, g_free); + + item_order++; + button = xfce_gtk_tool_button_new_from_action_entry (get_action_entry (THUNAR_WINDOW_ACTION_RELOAD), G_OBJECT (window), GTK_TOOLBAR (window->location_toolbar)); + g_object_set_data_full (G_OBJECT (button), "label", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_RELOAD)->menu_item_label_text), g_free); + g_object_set_data_full (G_OBJECT (button), "icon", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_RELOAD)->menu_item_icon_name), g_free); + item_order_ptr = g_malloc (sizeof (gint)); + *item_order_ptr = item_order; + g_object_set_data_full (G_OBJECT (button), "default-order", item_order_ptr, g_free); + + item_order++; + window->location_toolbar_item_search = xfce_gtk_toggle_tool_button_new_from_action_entry (get_action_entry (THUNAR_WINDOW_ACTION_SEARCH), G_OBJECT (window), window->is_searching, GTK_TOOLBAR (window->location_toolbar)); + g_object_set_data_full (G_OBJECT (window->location_toolbar_item_search), "label", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_SEARCH)->menu_item_label_text), g_free); + g_object_set_data_full (G_OBJECT (window->location_toolbar_item_search), "icon", g_strdup (get_action_entry (THUNAR_WINDOW_ACTION_SEARCH)->menu_item_icon_name), g_free); + item_order_ptr = g_malloc (sizeof (gint)); + *item_order_ptr = item_order; + g_object_set_data_full (G_OBJECT (window->location_toolbar_item_search), "default-order", item_order_ptr, g_free); /* add custom actions to the toolbar */ thunar_window_location_toolbar_add_ucas (window);