diff options
Diffstat (limited to 'gtk3-filechooser-icon-view.patch')
-rw-r--r-- | gtk3-filechooser-icon-view.patch | 490 |
1 files changed, 337 insertions, 153 deletions
diff --git a/gtk3-filechooser-icon-view.patch b/gtk3-filechooser-icon-view.patch index 2f95ead87439..676288f50d26 100644 --- a/gtk3-filechooser-icon-view.patch +++ b/gtk3-filechooser-icon-view.patch @@ -18,7 +18,7 @@ index 0094beb299..433a623963 100644 #define SETTINGS_KEY_SHOW_SIZE_COLUMN "show-size-column" #define SETTINGS_KEY_SORT_COLUMN "sort-column" diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c -index d1dd2f0059..cfbc18d715 100644 +index d1dd2f0059..b28eb29709 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -1,4 +1,4 @@ @@ -74,7 +74,20 @@ index d1dd2f0059..cfbc18d715 100644 GtkWidget *remote_warning_bar; GtkWidget *browse_files_popover; -@@ -252,6 +264,7 @@ struct _GtkFileChooserWidgetPrivate { +@@ -236,6 +248,12 @@ struct _GtkFileChooserWidgetPrivate { + GtkWidget *delete_file_item; + GtkWidget *sort_directories_item; + GtkWidget *show_time_item; ++ GtkWidget *arrange_item; ++ GtkWidget *sort_by_name_item; ++ GtkWidget *sort_by_size_item; ++ GtkWidget *sort_by_time_item; ++ GtkWidget *ascending_item; ++ GtkWidget *descending_item; + + GtkWidget *browse_new_folder_button; + GtkSizeGroup *browse_path_bar_size_group; +@@ -252,6 +270,7 @@ struct _GtkFileChooserWidgetPrivate { GtkGesture *long_press_gesture; @@ -82,7 +95,7 @@ index d1dd2f0059..cfbc18d715 100644 GtkFileSystemModel *browse_files_model; char *browse_files_last_selected_name; -@@ -336,10 +349,17 @@ struct _GtkFileChooserWidgetPrivate { +@@ -336,10 +355,17 @@ struct _GtkFileChooserWidgetPrivate { guint location_changed_id; gulong settings_signal_id; @@ -101,7 +114,7 @@ index d1dd2f0059..cfbc18d715 100644 gulong toplevel_set_focus_id; GtkWidget *toplevel_last_focus_widget; -@@ -402,7 +422,8 @@ enum { +@@ -402,7 +428,8 @@ enum { MODEL_COL_NAME_COLLATED, MODEL_COL_IS_FOLDER, MODEL_COL_IS_SENSITIVE, @@ -111,7 +124,7 @@ index d1dd2f0059..cfbc18d715 100644 MODEL_COL_SIZE_TEXT, MODEL_COL_DATE_TEXT, MODEL_COL_TIME_TEXT, -@@ -421,7 +442,8 @@ enum { +@@ -421,7 +448,8 @@ enum { G_TYPE_STRING, /* MODEL_COL_NAME_COLLATED */ \ G_TYPE_BOOLEAN, /* MODEL_COL_IS_FOLDER */ \ G_TYPE_BOOLEAN, /* MODEL_COL_IS_SENSITIVE */ \ @@ -121,7 +134,7 @@ index d1dd2f0059..cfbc18d715 100644 G_TYPE_STRING, /* MODEL_COL_SIZE_TEXT */ \ G_TYPE_STRING, /* MODEL_COL_DATE_TEXT */ \ G_TYPE_STRING, /* MODEL_COL_TIME_TEXT */ \ -@@ -431,7 +453,10 @@ enum { +@@ -431,7 +459,10 @@ enum { #define DEFAULT_RECENT_FILES_LIMIT 50 /* Icon size for if we can't get it from the theme */ @@ -133,7 +146,7 @@ index d1dd2f0059..cfbc18d715 100644 #define PREVIEW_HBOX_SPACING 12 #define NUM_LINES 45 -@@ -552,7 +577,7 @@ static gboolean list_select_func (GtkTreeSelection *selection, +@@ -552,7 +583,7 @@ static gboolean list_select_func (GtkTreeSelection *selection, gboolean path_currently_selected, gpointer data); @@ -142,7 +155,7 @@ index d1dd2f0059..cfbc18d715 100644 GtkFileChooserWidget *impl); static void list_row_activated (GtkTreeView *tree_view, GtkTreePath *path, -@@ -560,6 +585,13 @@ static void list_row_activated (GtkTreeView *tree_view, +@@ -560,6 +591,13 @@ static void list_row_activated (GtkTreeView *tree_view, GtkFileChooserWidget *impl); static void list_cursor_changed (GtkTreeView *treeview, GtkFileChooserWidget *impl); @@ -156,7 +169,7 @@ index d1dd2f0059..cfbc18d715 100644 static void path_bar_clicked (GtkPathBar *path_bar, GFile *file, -@@ -572,6 +604,13 @@ static void update_cell_renderer_attributes (GtkFileChooserWidget *impl); +@@ -572,6 +610,13 @@ static void update_cell_renderer_attributes (GtkFileChooserWidget *impl); static void load_remove_timer (GtkFileChooserWidget *impl, LoadState new_load_state); static void browse_files_center_selected_row (GtkFileChooserWidget *impl); @@ -170,7 +183,7 @@ index d1dd2f0059..cfbc18d715 100644 static void location_switch_to_path_bar (GtkFileChooserWidget *impl); static void stop_loading_and_clear_list_model (GtkFileChooserWidget *impl, -@@ -601,13 +640,33 @@ static gboolean recent_should_respond (GtkFileChooserWidget *impl); +@@ -601,13 +646,33 @@ static gboolean recent_should_respond (GtkFileChooserWidget *impl); static void set_file_system_backend (GtkFileChooserWidget *impl); static void unset_file_system_backend (GtkFileChooserWidget *impl); @@ -205,7 +218,7 @@ index d1dd2f0059..cfbc18d715 100644 G_DEFINE_TYPE_WITH_CODE (GtkFileChooserWidget, gtk_file_chooser_widget, GTK_TYPE_BOX, G_ADD_PRIVATE (GtkFileChooserWidget) -@@ -936,7 +995,7 @@ update_preview_widget_visibility (GtkFileChooserWidget *impl) +@@ -936,7 +1001,7 @@ update_preview_widget_visibility (GtkFileChooserWidget *impl) } } @@ -214,7 +227,7 @@ index d1dd2f0059..cfbc18d715 100644 gtk_widget_show (priv->preview_box); else gtk_widget_hide (priv->preview_box); -@@ -1204,19 +1263,17 @@ selection_check (GtkFileChooserWidget *impl, +@@ -1204,19 +1269,17 @@ selection_check (GtkFileChooserWidget *impl, gboolean *all_files, gboolean *all_folders) { @@ -238,7 +251,7 @@ index d1dd2f0059..cfbc18d715 100644 g_assert (closure.num_selected == 0 || !(closure.all_files && closure.all_folders)); -@@ -1338,7 +1395,7 @@ browse_files_key_press_event_cb (GtkWidget *widget, +@@ -1338,7 +1401,7 @@ browse_files_key_press_event_cb (GtkWidget *widget, return TRUE; } @@ -247,7 +260,7 @@ index d1dd2f0059..cfbc18d715 100644 { if (gtk_widget_child_focus (priv->places_sidebar, GTK_DIR_LEFT)) return TRUE; -@@ -1441,12 +1498,8 @@ add_to_shortcuts_cb (GSimpleAction *action, +@@ -1441,12 +1504,8 @@ add_to_shortcuts_cb (GSimpleAction *action, gpointer data) { GtkFileChooserWidget *impl = data; @@ -261,7 +274,186 @@ index d1dd2f0059..cfbc18d715 100644 add_bookmark_foreach_cb, impl); } -@@ -2262,26 +2315,51 @@ file_list_build_popover (GtkFileChooserWidget *impl) +@@ -1801,6 +1860,86 @@ open_folder_cb (GSimpleAction *action, + } + G_GNUC_END_IGNORE_DEPRECATIONS + ++/* callback used when "Sort by Name" menu item is activated */ ++static void ++sort_by_name_cb (GSimpleAction *action, ++ GVariant *parameter, ++ gpointer data) ++{ ++ GtkFileChooserWidget *impl = data; ++ GtkFileChooserWidgetPrivate *priv = impl->priv; ++ GtkTreeSortable *sortable; ++ ++ sortable = GTK_TREE_SORTABLE (priv->browse_files_model); ++ gtk_tree_sortable_set_sort_column_id (sortable, ++ priv->sort_column=MODEL_COL_NAME, ++ priv->sort_order); ++} ++ ++/* callback used when "Sort by Size" menu item is activated */ ++static void ++sort_by_size_cb (GSimpleAction *action, ++ GVariant *parameter, ++ gpointer data) ++{ ++ GtkFileChooserWidget *impl = data; ++ GtkFileChooserWidgetPrivate *priv = impl->priv; ++ GtkTreeSortable *sortable; ++ ++ sortable = GTK_TREE_SORTABLE (priv->browse_files_model); ++ gtk_tree_sortable_set_sort_column_id (sortable, ++ priv->sort_column=MODEL_COL_SIZE, ++ priv->sort_order); ++} ++ ++/* callback used when "Sort by Time" menu item is activated */ ++static void ++sort_by_time_cb (GSimpleAction *action, ++ GVariant *parameter, ++ gpointer data) ++{ ++ GtkFileChooserWidget *impl = data; ++ GtkFileChooserWidgetPrivate *priv = impl->priv; ++ GtkTreeSortable *sortable; ++ ++ sortable = GTK_TREE_SORTABLE (priv->browse_files_model); ++ gtk_tree_sortable_set_sort_column_id (sortable, ++ priv->sort_column=MODEL_COL_TIME, ++ priv->sort_order); ++} ++ ++/* callback used when "Ascending" menu item is activated */ ++static void ++ascending_cb (GSimpleAction *action, ++ GVariant *parameter, ++ gpointer data) ++{ ++ GtkFileChooserWidget *impl = data; ++ GtkFileChooserWidgetPrivate *priv = impl->priv; ++ GtkTreeSortable *sortable; ++ ++ sortable = GTK_TREE_SORTABLE (priv->browse_files_model); ++ gtk_tree_sortable_set_sort_column_id (sortable, ++ priv->sort_column, ++ priv->sort_order=GTK_SORT_ASCENDING); ++} ++ ++/* callback used when "Descending" menu item is activated */ ++static void ++descending_cb (GSimpleAction *action, ++ GVariant *parameter, ++ gpointer data) ++{ ++ GtkFileChooserWidget *impl = data; ++ GtkFileChooserWidgetPrivate *priv = impl->priv; ++ GtkTreeSortable *sortable; ++ ++ sortable = GTK_TREE_SORTABLE (priv->browse_files_model); ++ gtk_tree_sortable_set_sort_column_id (sortable, ++ priv->sort_column, ++ priv->sort_order=GTK_SORT_DESCENDING); ++} ++ + /* callback used when the "Show Hidden Files" menu item is toggled */ + static void + change_show_hidden_state (GSimpleAction *action, +@@ -2112,6 +2251,7 @@ check_file_list_popover_sensitivity (GtkFileChooserWidget *impl) + gboolean all_files; + gboolean all_folders; + gboolean active; ++ gboolean always_active; + GActionGroup *actions; + GAction *action, *action2; + +@@ -2120,6 +2260,7 @@ check_file_list_popover_sensitivity (GtkFileChooserWidget *impl) + selection_check (impl, &num_selected, &all_files, &all_folders); + + active = (num_selected != 0); ++ always_active = (num_selected >= 0); + + action = g_action_map_lookup_action (G_ACTION_MAP (actions), "copy-location"); + g_simple_action_set_enabled (G_SIMPLE_ACTION (action), active); +@@ -2133,6 +2274,21 @@ check_file_list_popover_sensitivity (GtkFileChooserWidget *impl) + action = g_action_map_lookup_action (G_ACTION_MAP (actions), "open"); + g_simple_action_set_enabled (G_SIMPLE_ACTION (action), (num_selected == 1) && all_folders); + ++ action = g_action_map_lookup_action (G_ACTION_MAP (actions), "sort-by-name"); ++ g_simple_action_set_enabled (G_SIMPLE_ACTION (action), always_active); ++ ++ action = g_action_map_lookup_action (G_ACTION_MAP (actions), "sort-by-size"); ++ g_simple_action_set_enabled (G_SIMPLE_ACTION (action), always_active); ++ ++ action = g_action_map_lookup_action (G_ACTION_MAP (actions), "sort-by-time"); ++ g_simple_action_set_enabled (G_SIMPLE_ACTION (action), always_active); ++ ++ action = g_action_map_lookup_action (G_ACTION_MAP (actions), "ascending"); ++ g_simple_action_set_enabled (G_SIMPLE_ACTION (action), always_active); ++ ++ action = g_action_map_lookup_action (G_ACTION_MAP (actions), "descending"); ++ g_simple_action_set_enabled (G_SIMPLE_ACTION (action), always_active); ++ + action = g_action_map_lookup_action (G_ACTION_MAP (actions), "rename"); + if (num_selected == 1) + { +@@ -2198,6 +2354,11 @@ static GActionEntry entries[] = { + { "rename", rename_file_cb, NULL, NULL, NULL }, + { "delete", delete_file_cb, NULL, NULL, NULL }, + { "trash", trash_file_cb, NULL, NULL, NULL }, ++ { "sort-by-name", sort_by_name_cb, NULL, NULL, NULL }, ++ { "sort-by-size", sort_by_size_cb, NULL, NULL, NULL }, ++ { "sort-by-time", sort_by_time_cb, NULL, NULL, NULL }, ++ { "ascending", ascending_cb, NULL, NULL, NULL }, ++ { "descending", descending_cb, NULL, NULL, NULL }, + { "toggle-show-hidden", NULL, NULL, "false", change_show_hidden_state }, + { "toggle-show-size", NULL, NULL, "false", change_show_size_state }, + { "toggle-show-time", NULL, NULL, "false", change_show_time_state }, +@@ -2221,17 +2382,9 @@ static GtkWidget * + append_separator (GtkWidget *box) + { + GtkWidget *separator; +- +- separator = g_object_new (GTK_TYPE_SEPARATOR, +- "orientation", GTK_ORIENTATION_HORIZONTAL, +- "visible", TRUE, +- "margin-start", 12, +- "margin-end", 12, +- "margin-top", 6, +- "margin-bottom", 6, +- NULL); +- gtk_container_add (GTK_CONTAINER (box), separator); +- ++ separator = gtk_separator_menu_item_new (); ++ gtk_widget_set_visible (GTK_WIDGET (separator), TRUE); ++ gtk_menu_shell_append (GTK_MENU_SHELL (box), separator); + return separator; + } + +@@ -2243,13 +2396,13 @@ add_button (GtkWidget *box, + { + GtkWidget *item; + +- item = g_object_new (GTK_TYPE_MODEL_BUTTON, +- "visible", TRUE, +- "action-name", action, +- "text", label, +- NULL); +- gtk_container_add (GTK_CONTAINER (box), item); +- ++ if (g_str_match_string ("toggle", action, TRUE)) ++ item = gtk_check_menu_item_new_with_mnemonic (label); ++ else ++ item = gtk_menu_item_new_with_mnemonic (label); ++ g_object_set (G_OBJECT (item), "action-name", action, NULL); ++ gtk_widget_set_visible (GTK_WIDGET (item), TRUE); ++ gtk_menu_shell_append (GTK_MENU_SHELL (box), item); + return item; + } + +@@ -2262,11 +2415,9 @@ file_list_build_popover (GtkFileChooserWidget *impl) if (priv->browse_files_popover) return; @@ -270,99 +462,91 @@ index d1dd2f0059..cfbc18d715 100644 - g_object_set (box, "margin", 10, NULL); - gtk_widget_show (box); - gtk_container_add (GTK_CONTAINER (priv->browse_files_popover), box); ++ priv->browse_files_popover = gtk_menu_new (); ++ gtk_menu_attach_to_widget (GTK_MENU (priv->browse_files_popover), GTK_WIDGET (priv->browse_files_tree_view), NULL); ++ box = priv->browse_files_popover; + + priv->visit_file_item = add_button (box, _("_Visit File"), "item.visit"); + priv->open_folder_item = add_button (box, _("_Open With File Manager"), "item.open"); +@@ -2275,13 +2426,30 @@ file_list_build_popover (GtkFileChooserWidget *impl) + priv->rename_file_item = add_button (box, _("_Rename"), "item.rename"); + priv->delete_file_item = add_button (box, _("_Delete"), "item.delete"); + priv->trash_file_item = add_button (box, _("_Move to Trash"), "item.trash"); +- + append_separator (box); + if (priv->view_mode == VIEW_MODE_LIST) + { -+ priv->browse_files_popover = gtk_popover_new (priv->browse_files_tree_view); -+ box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); -+ g_object_set (box, "margin", 10, NULL); -+ gtk_widget_show (box); -+ gtk_container_add (GTK_CONTAINER (priv->browse_files_popover), box); -+ -+ priv->visit_file_item = add_button (box, _("_Visit File"), "item.visit"); -+ priv->open_folder_item = add_button (box, _("_Open With File Manager"), "item.open"); -+ priv->copy_file_location_item = add_button (box, _("_Copy Location"), "item.copy-location"); -+ priv->add_shortcut_item = add_button (box, _("_Add to Bookmarks"), "item.add-shortcut"); -+ priv->rename_file_item = add_button (box, _("_Rename"), "item.rename"); -+ priv->delete_file_item = add_button (box, _("_Delete"), "item.delete"); -+ priv->trash_file_item = add_button (box, _("_Move to Trash"), "item.trash"); -+ -+ append_separator (box); -+ + priv->hidden_files_item = add_button (box, _("Show _Hidden Files"), "item.toggle-show-hidden"); + priv->size_column_item = add_button (box, _("Show _Size Column"), "item.toggle-show-size"); + priv->show_time_item = add_button (box, _("Show _Time"), "item.toggle-show-time"); + priv->sort_directories_item = add_button (box, _("Sort _Folders before Files"), "item.toggle-sort-dirs-first"); -+ } - -- priv->visit_file_item = add_button (box, _("_Visit File"), "item.visit"); -- priv->open_folder_item = add_button (box, _("_Open With File Manager"), "item.open"); -- priv->copy_file_location_item = add_button (box, _("_Copy Location"), "item.copy-location"); -- priv->add_shortcut_item = add_button (box, _("_Add to Bookmarks"), "item.add-shortcut"); -- priv->rename_file_item = add_button (box, _("_Rename"), "item.rename"); -- priv->delete_file_item = add_button (box, _("_Delete"), "item.delete"); -- priv->trash_file_item = add_button (box, _("_Move to Trash"), "item.trash"); ++ } + if (priv->view_mode == VIEW_MODE_ICON) + { -+ priv->browse_files_popover = gtk_popover_new (priv->browse_files_tree_view); -+ box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); -+ g_object_set (box, "margin", 10, NULL); -+ gtk_widget_show (box); -+ gtk_container_add (GTK_CONTAINER (priv->browse_files_popover), box); -+ -+ priv->visit_file_item = add_button (box, _("_Visit File"), "item.visit"); -+ priv->open_folder_item = add_button (box, _("_Open With File Manager"), "item.open"); -+ priv->copy_file_location_item = add_button (box, _("_Copy Location"), "item.copy-location"); -+ priv->add_shortcut_item = add_button (box, _("_Add to Bookmarks"), "item.add-shortcut"); -+ priv->rename_file_item = add_button (box, _("_Rename"), "item.rename"); -+ priv->delete_file_item = add_button (box, _("_Delete"), "item.delete"); -+ priv->trash_file_item = add_button (box, _("_Move to Trash"), "item.trash"); - -- append_separator (box); -+ append_separator (box); ++ GtkWidget *menu; - priv->hidden_files_item = add_button (box, _("Show _Hidden Files"), "item.toggle-show-hidden"); - priv->size_column_item = add_button (box, _("Show _Size Column"), "item.toggle-show-size"); - priv->show_time_item = add_button (box, _("Show _Time"), "item.toggle-show-time"); - priv->sort_directories_item = add_button (box, _("Sort _Folders before Files"), "item.toggle-sort-dirs-first"); ++ priv->arrange_item = add_button (box, _("Arrange Items"), NULL); ++ menu = gtk_menu_new (); ++ gtk_menu_item_set_submenu (GTK_MENU_ITEM (priv->arrange_item), menu); ++ priv->sort_by_name_item = add_button (menu, _("Sort _by Name"), "item.sort-by-name"); ++ priv->sort_by_size_item = add_button (menu, _("Sort _by Size"), "item.sort-by-size"); ++ priv->sort_by_time_item = add_button (menu, _("Sort _by Time"), "item.sort-by-time"); ++ append_separator (menu); ++ priv->ascending_item = add_button (menu, _("Ascending"), "item.ascending"); ++ priv->descending_item = add_button (menu, _("Descending"), "item.descending"); + priv->hidden_files_item = add_button (box, _("Show _Hidden Files"), "item.toggle-show-hidden"); + priv->sort_directories_item = add_button (box, _("Sort _Folders before Files"), "item.toggle-sort-dirs-first"); -+ } ++ } } /* Updates the popover for the file list, creating it if necessary */ -@@ -2331,9 +2409,9 @@ file_list_show_popover (GtkFileChooserWidget *impl, +@@ -2330,39 +2498,10 @@ file_list_show_popover (GtkFileChooserWidget *impl, + gdouble y) { GtkFileChooserWidgetPrivate *priv = impl->priv; - GdkRectangle rect; -+ GList *list; - GtkTreeSelection *selection; - GtkTreeModel *model; +- GdkRectangle rect; +- GtkTreeSelection *selection; +- GtkTreeModel *model; - GList *list; - GtkTreePath *path; - - -@@ -2341,15 +2419,16 @@ file_list_show_popover (GtkFileChooserWidget *impl, +- GtkTreePath *path; +- - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view)); - list = gtk_tree_selection_get_selected_rows (selection, &model); -+ - if (list) - { - path = list->data; + file_list_update_popover (impl); +- +- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view)); +- list = gtk_tree_selection_get_selected_rows (selection, &model); +- if (list) +- { +- path = list->data; - gtk_tree_view_get_cell_area (GTK_TREE_VIEW (priv->browse_files_tree_view), path, NULL, &rect); - gtk_tree_view_convert_bin_window_to_widget_coords (GTK_TREE_VIEW (priv->browse_files_tree_view), - rect.x, rect.y, &rect.x, &rect.y); -+ gtk_tree_view_get_cell_area (GTK_TREE_VIEW (priv->browse_files_tree_view), path, NULL, &rect); -+ gtk_tree_view_convert_bin_window_to_widget_coords (GTK_TREE_VIEW (priv->browse_files_tree_view), -+ rect.x, rect.y, &rect.x, &rect.y); - - rect.x = CLAMP (x - 20, 0, gtk_widget_get_allocated_width (priv->browse_files_tree_view) - 40); +- +- rect.x = CLAMP (x - 20, 0, gtk_widget_get_allocated_width (priv->browse_files_tree_view) - 40); - rect.width = 40; -+ rect.width = 40; +- +- g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free); +- } +- else +- { +- rect.x = x; +- rect.y = y; +- rect.width = 1; +- rect.height = 1; +- } +- +- gtk_popover_set_pointing_to (GTK_POPOVER (priv->browse_files_popover), &rect); +- gtk_popover_popup (GTK_POPOVER (priv->browse_files_popover)); ++ gtk_menu_popup_at_pointer (GTK_MENU (priv->browse_files_popover), NULL); ++ return; + } - g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free); - } -@@ -2386,7 +2465,6 @@ list_button_press_event_cb (GtkWidget *widget, + /* Callback used for the GtkWidget::popup-menu signal of the file list */ +@@ -2386,7 +2525,6 @@ list_button_press_event_cb (GtkWidget *widget, GdkEventButton *event, GtkFileChooserWidget *impl) { @@ -370,7 +554,7 @@ index d1dd2f0059..cfbc18d715 100644 static gboolean in_press = FALSE; if (in_press) -@@ -2396,7 +2474,7 @@ list_button_press_event_cb (GtkWidget *widget, +@@ -2396,7 +2534,7 @@ list_button_press_event_cb (GtkWidget *widget, return FALSE; in_press = TRUE; @@ -379,7 +563,7 @@ index d1dd2f0059..cfbc18d715 100644 in_press = FALSE; file_list_show_popover (impl, event->x, event->y); -@@ -2427,12 +2505,15 @@ file_list_set_sort_column_ids (GtkFileChooserWidget *impl) +@@ -2427,12 +2565,15 @@ file_list_set_sort_column_ids (GtkFileChooserWidget *impl) { GtkFileChooserWidgetPrivate *priv = impl->priv; @@ -400,7 +584,7 @@ index d1dd2f0059..cfbc18d715 100644 } static gboolean -@@ -2455,11 +2536,22 @@ file_list_query_tooltip_cb (GtkWidget *widget, +@@ -2455,11 +2596,22 @@ file_list_query_tooltip_cb (GtkWidget *widget, return FALSE; @@ -428,7 +612,7 @@ index d1dd2f0059..cfbc18d715 100644 gtk_tree_model_get (model, &iter, MODEL_COL_FILE, &file, -@@ -2473,10 +2565,18 @@ file_list_query_tooltip_cb (GtkWidget *widget, +@@ -2473,10 +2625,18 @@ file_list_query_tooltip_cb (GtkWidget *widget, filename = g_file_get_path (file); gtk_tooltip_set_text (tooltip, filename); @@ -451,7 +635,7 @@ index d1dd2f0059..cfbc18d715 100644 g_free (filename); g_object_unref (file); gtk_tree_path_free (path); -@@ -2492,8 +2592,8 @@ set_icon_cell_renderer_fixed_size (GtkFileChooserWidget *impl) +@@ -2492,8 +2652,8 @@ set_icon_cell_renderer_fixed_size (GtkFileChooserWidget *impl) gtk_cell_renderer_get_padding (priv->list_pixbuf_renderer, &xpad, &ypad); gtk_cell_renderer_set_fixed_size (priv->list_pixbuf_renderer, @@ -462,7 +646,7 @@ index d1dd2f0059..cfbc18d715 100644 } static gboolean -@@ -2777,7 +2877,7 @@ location_mode_set (GtkFileChooserWidget *impl, +@@ -2777,7 +2937,7 @@ location_mode_set (GtkFileChooserWidget *impl, location_switch_to_path_bar (impl); if (switch_to_file_list) @@ -471,7 +655,7 @@ index d1dd2f0059..cfbc18d715 100644 break; -@@ -2848,6 +2948,118 @@ location_toggle_popup_handler (GtkFileChooserWidget *impl) +@@ -2848,6 +3008,118 @@ location_toggle_popup_handler (GtkFileChooserWidget *impl) } } @@ -590,7 +774,7 @@ index d1dd2f0059..cfbc18d715 100644 static void gtk_file_chooser_widget_constructed (GObject *object) { -@@ -2883,7 +3095,6 @@ set_extra_widget (GtkFileChooserWidget *impl, +@@ -2883,7 +3155,6 @@ set_extra_widget (GtkFileChooserWidget *impl, if (extra_widget) { g_object_ref (extra_widget); @@ -598,7 +782,7 @@ index d1dd2f0059..cfbc18d715 100644 gtk_widget_show (extra_widget); } -@@ -2956,18 +3167,11 @@ set_select_multiple (GtkFileChooserWidget *impl, +@@ -2956,18 +3227,11 @@ set_select_multiple (GtkFileChooserWidget *impl, gboolean property_notify) { GtkFileChooserWidgetPrivate *priv = impl->priv; @@ -618,7 +802,7 @@ index d1dd2f0059..cfbc18d715 100644 priv->select_multiple = select_multiple; g_object_notify (G_OBJECT (impl), "select-multiple"); -@@ -3094,6 +3298,7 @@ operation_mode_set_enter_location (GtkFileChooserWidget *impl) +@@ -3094,6 +3358,7 @@ operation_mode_set_enter_location (GtkFileChooserWidget *impl) gtk_stack_set_visible_child_name (GTK_STACK (priv->browse_header_stack), "location"); gtk_revealer_set_reveal_child (GTK_REVEALER (priv->browse_header_revealer), TRUE); location_bar_update (impl); @@ -626,7 +810,7 @@ index d1dd2f0059..cfbc18d715 100644 gtk_widget_set_sensitive (priv->filter_combo, TRUE); location_mode_set (impl, LOCATION_MODE_FILENAME_ENTRY); } -@@ -3123,7 +3328,7 @@ operation_mode_set_search (GtkFileChooserWidget *impl) +@@ -3123,7 +3388,7 @@ operation_mode_set_search (GtkFileChooserWidget *impl) visible_widget = gtk_stack_get_visible_child (GTK_STACK (priv->browse_files_stack)); if (visible_widget != priv->places_view && @@ -635,7 +819,7 @@ index d1dd2f0059..cfbc18d715 100644 { gtk_stack_set_visible_child_name (GTK_STACK (priv->browse_files_stack), "list"); } -@@ -3248,6 +3453,12 @@ update_appearance (GtkFileChooserWidget *impl) +@@ -3248,6 +3513,12 @@ update_appearance (GtkFileChooserWidget *impl) location_mode_set (impl, priv->location_mode); } @@ -648,7 +832,7 @@ index d1dd2f0059..cfbc18d715 100644 if (priv->location_entry) _gtk_file_chooser_entry_set_action (GTK_FILE_CHOOSER_ENTRY (priv->location_entry), priv->action); -@@ -3256,7 +3467,7 @@ update_appearance (GtkFileChooserWidget *impl) +@@ -3256,7 +3527,7 @@ update_appearance (GtkFileChooserWidget *impl) /* This *is* needed; we need to redraw the file list because the "sensitivity" * of files may change depending whether we are in a file or folder-only mode. */ @@ -657,21 +841,21 @@ index d1dd2f0059..cfbc18d715 100644 emit_default_size_changed (impl); } -@@ -3686,14 +3897,28 @@ change_icon_theme (GtkFileChooserWidget *impl) +@@ -3686,14 +3957,28 @@ change_icon_theme (GtkFileChooserWidget *impl) profile_start ("start", NULL); if (gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, &height)) - priv->icon_size = MAX (width, height); + priv->list_view_icon_size = MAX (width, height); - else -- priv->icon_size = FALLBACK_ICON_SIZE; ++ else + priv->list_view_icon_size = FALLBACK_LIST_VIEW_ICON_SIZE; + + if (gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &width, &height)) + { + priv->icon_view_icon_size = MAX (width, height); + } -+ else + else +- priv->icon_size = FALLBACK_ICON_SIZE; + priv->list_view_icon_size = FALLBACK_LIST_VIEW_ICON_SIZE; /* the first cell in the first column is the icon column, and we have a fixed size there */ @@ -690,7 +874,7 @@ index d1dd2f0059..cfbc18d715 100644 gtk_widget_queue_resize (priv->browse_files_tree_view); profile_end ("end", NULL); -@@ -3794,7 +4019,7 @@ set_sort_column (GtkFileChooserWidget *impl) +@@ -3794,7 +4079,7 @@ set_sort_column (GtkFileChooserWidget *impl) GtkFileChooserWidgetPrivate *priv = impl->priv; GtkTreeSortable *sortable; @@ -699,7 +883,7 @@ index d1dd2f0059..cfbc18d715 100644 /* can happen when we're still populating the model */ if (sortable == NULL) -@@ -3809,11 +4034,12 @@ static void +@@ -3809,11 +4094,12 @@ static void settings_load (GtkFileChooserWidget *impl) { GtkFileChooserWidgetPrivate *priv = impl->priv; @@ -713,7 +897,7 @@ index d1dd2f0059..cfbc18d715 100644 GtkSortType sort_order; StartupMode startup_mode; gint sidebar_width; -@@ -3821,6 +4047,8 @@ settings_load (GtkFileChooserWidget *impl) +@@ -3821,6 +4107,8 @@ settings_load (GtkFileChooserWidget *impl) settings = _gtk_file_chooser_get_settings_for_widget (GTK_WIDGET (impl)); @@ -722,7 +906,7 @@ index d1dd2f0059..cfbc18d715 100644 show_hidden = g_settings_get_boolean (settings, SETTINGS_KEY_SHOW_HIDDEN); show_size_column = g_settings_get_boolean (settings, SETTINGS_KEY_SHOW_SIZE_COLUMN); sort_column = g_settings_get_enum (settings, SETTINGS_KEY_SORT_COLUMN); -@@ -3830,10 +4058,16 @@ settings_load (GtkFileChooserWidget *impl) +@@ -3830,10 +4118,16 @@ settings_load (GtkFileChooserWidget *impl) sort_directories_first = g_settings_get_boolean (settings, SETTINGS_KEY_SORT_DIRECTORIES_FIRST); date_format = g_settings_get_enum (settings, SETTINGS_KEY_DATE_FORMAT); @@ -740,7 +924,7 @@ index d1dd2f0059..cfbc18d715 100644 priv->sort_column = sort_column; priv->sort_order = sort_order; -@@ -3861,6 +4095,8 @@ settings_save (GtkFileChooserWidget *impl) +@@ -3861,6 +4155,8 @@ settings_save (GtkFileChooserWidget *impl) /* All the other state */ g_settings_set_enum (settings, SETTINGS_KEY_LOCATION_MODE, priv->location_mode); @@ -749,7 +933,7 @@ index d1dd2f0059..cfbc18d715 100644 g_settings_set_boolean (settings, SETTINGS_KEY_SHOW_HIDDEN, gtk_file_chooser_get_show_hidden (GTK_FILE_CHOOSER (impl))); g_settings_set_boolean (settings, SETTINGS_KEY_SHOW_SIZE_COLUMN, priv->show_size_column); -@@ -4335,10 +4571,14 @@ load_set_model (GtkFileChooserWidget *impl) +@@ -4335,10 +4631,14 @@ load_set_model (GtkFileChooserWidget *impl) g_assert (priv->browse_files_model != NULL); profile_msg (" gtk_tree_view_set_model start", NULL); @@ -768,7 +952,7 @@ index d1dd2f0059..cfbc18d715 100644 set_sort_column (impl); profile_msg (" gtk_tree_view_set_model end", NULL); priv->list_sort_ascending = TRUE; -@@ -4418,7 +4658,7 @@ browse_files_select_first_row (GtkFileChooserWidget *impl) +@@ -4418,7 +4718,7 @@ browse_files_select_first_row (GtkFileChooserWidget *impl) GtkTreeIter dummy_iter; GtkTreeModel *tree_model; @@ -777,7 +961,7 @@ index d1dd2f0059..cfbc18d715 100644 if (!tree_model) return; -@@ -4437,8 +4677,7 @@ browse_files_select_first_row (GtkFileChooserWidget *impl) +@@ -4437,8 +4737,7 @@ browse_files_select_first_row (GtkFileChooserWidget *impl) */ priv->auto_selecting_first_row = TRUE; @@ -787,7 +971,7 @@ index d1dd2f0059..cfbc18d715 100644 priv->auto_selecting_first_row = FALSE; } gtk_tree_path_free (path); -@@ -4464,7 +4703,13 @@ center_selected_row_foreach_cb (GtkTreeModel *model, +@@ -4464,7 +4763,13 @@ center_selected_row_foreach_cb (GtkTreeModel *model, if (closure->already_centered) return; @@ -802,7 +986,7 @@ index d1dd2f0059..cfbc18d715 100644 closure->already_centered = TRUE; } -@@ -4472,15 +4717,12 @@ center_selected_row_foreach_cb (GtkTreeModel *model, +@@ -4472,15 +4777,12 @@ center_selected_row_foreach_cb (GtkTreeModel *model, static void browse_files_center_selected_row (GtkFileChooserWidget *impl) { @@ -819,7 +1003,7 @@ index d1dd2f0059..cfbc18d715 100644 } static gboolean -@@ -4488,7 +4730,6 @@ show_and_select_files (GtkFileChooserWidget *impl, +@@ -4488,7 +4790,6 @@ show_and_select_files (GtkFileChooserWidget *impl, GSList *files) { GtkFileChooserWidgetPrivate *priv = impl->priv; @@ -827,7 +1011,7 @@ index d1dd2f0059..cfbc18d715 100644 GtkFileSystemModel *fsmodel; gboolean enabled_hidden, removed_filters; gboolean selected_a_file; -@@ -4497,8 +4738,7 @@ show_and_select_files (GtkFileChooserWidget *impl, +@@ -4497,8 +4798,7 @@ show_and_select_files (GtkFileChooserWidget *impl, g_assert (priv->load_state == LOAD_FINISHED); g_assert (priv->browse_files_model != NULL); @@ -837,7 +1021,7 @@ index d1dd2f0059..cfbc18d715 100644 g_assert (fsmodel == priv->browse_files_model); -@@ -4553,11 +4793,10 @@ show_and_select_files (GtkFileChooserWidget *impl, +@@ -4553,11 +4853,10 @@ show_and_select_files (GtkFileChooserWidget *impl, { GtkTreePath *path; @@ -851,7 +1035,7 @@ index d1dd2f0059..cfbc18d715 100644 gtk_tree_path_free (path); selected_a_file = TRUE; -@@ -4678,12 +4917,14 @@ stop_loading_and_clear_list_model (GtkFileChooserWidget *impl, +@@ -4678,12 +4977,14 @@ stop_loading_and_clear_list_model (GtkFileChooserWidget *impl, { GtkFileChooserWidgetPrivate *priv = impl->priv; @@ -867,7 +1051,7 @@ index d1dd2f0059..cfbc18d715 100644 } /* Replace 'target' with 'replacement' in the input string. */ -@@ -4861,6 +5102,18 @@ file_system_model_got_thumbnail (GObject *object, +@@ -4861,6 +5162,18 @@ file_system_model_got_thumbnail (GObject *object, gdk_threads_leave (); } @@ -886,7 +1070,7 @@ index d1dd2f0059..cfbc18d715 100644 static gboolean file_system_model_set (GtkFileSystemModel *model, GFile *file, -@@ -4920,12 +5173,15 @@ file_system_model_set (GtkFileSystemModel *model, +@@ -4920,12 +5233,15 @@ file_system_model_set (GtkFileSystemModel *model, else g_value_set_boolean (value, TRUE); break; @@ -904,7 +1088,7 @@ index d1dd2f0059..cfbc18d715 100644 } else { -@@ -4979,6 +5235,76 @@ file_system_model_set (GtkFileSystemModel *model, +@@ -4979,6 +5295,76 @@ file_system_model_set (GtkFileSystemModel *model, else g_value_set_boxed (value, NULL); break; @@ -981,7 +1165,7 @@ index d1dd2f0059..cfbc18d715 100644 case MODEL_COL_SIZE: g_value_set_int64 (value, info ? g_file_info_get_size (info) : 0); break; -@@ -5161,7 +5487,6 @@ static void +@@ -5161,7 +5547,6 @@ static void update_chooser_entry (GtkFileChooserWidget *impl) { GtkFileChooserWidgetPrivate *priv = impl->priv; @@ -989,7 +1173,7 @@ index d1dd2f0059..cfbc18d715 100644 struct update_chooser_entry_selected_foreach_closure closure; /* no need to update the file chooser's entry if there's no entry */ -@@ -5178,9 +5503,8 @@ update_chooser_entry (GtkFileChooserWidget *impl) +@@ -5178,9 +5563,8 @@ update_chooser_entry (GtkFileChooserWidget *impl) g_assert (priv->location_entry != NULL); @@ -1000,7 +1184,7 @@ index d1dd2f0059..cfbc18d715 100644 if (closure.num_selected == 0) { -@@ -5677,19 +6001,15 @@ gtk_file_chooser_widget_unselect_file (GtkFileChooser *chooser, +@@ -5677,19 +6061,15 @@ gtk_file_chooser_widget_unselect_file (GtkFileChooser *chooser, { GtkFileChooserWidget *impl = GTK_FILE_CHOOSER_WIDGET (chooser); GtkFileChooserWidgetPrivate *priv = impl->priv; @@ -1024,7 +1208,7 @@ index d1dd2f0059..cfbc18d715 100644 } static gboolean -@@ -5700,12 +6020,9 @@ maybe_select (GtkTreeModel *model, +@@ -5700,12 +6080,9 @@ maybe_select (GtkTreeModel *model, { GtkFileChooserWidget *impl = GTK_FILE_CHOOSER_WIDGET (data); GtkFileChooserWidgetPrivate *priv = impl->priv; @@ -1037,7 +1221,7 @@ index d1dd2f0059..cfbc18d715 100644 gtk_tree_model_get (model, iter, MODEL_COL_IS_FOLDER, &is_folder, MODEL_COL_IS_SENSITIVE, &is_sensitive, -@@ -5714,9 +6031,9 @@ maybe_select (GtkTreeModel *model, +@@ -5714,9 +6091,9 @@ maybe_select (GtkTreeModel *model, if (is_sensitive && ((is_folder && priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) || (!is_folder && priv->action == GTK_FILE_CHOOSER_ACTION_OPEN))) @@ -1049,7 +1233,7 @@ index d1dd2f0059..cfbc18d715 100644 return FALSE; } -@@ -5732,8 +6049,15 @@ gtk_file_chooser_widget_select_all (GtkFileChooser *chooser) +@@ -5732,8 +6109,15 @@ gtk_file_chooser_widget_select_all (GtkFileChooser *chooser) { GtkTreeSelection *selection; @@ -1067,7 +1251,7 @@ index d1dd2f0059..cfbc18d715 100644 return; } -@@ -5746,10 +6070,7 @@ static void +@@ -5746,10 +6130,7 @@ static void gtk_file_chooser_widget_unselect_all (GtkFileChooser *chooser) { GtkFileChooserWidget *impl = GTK_FILE_CHOOSER_WIDGET (chooser); @@ -1079,7 +1263,7 @@ index d1dd2f0059..cfbc18d715 100644 pending_select_files_free (impl); } -@@ -5905,15 +6226,13 @@ gtk_file_chooser_widget_get_files (GtkFileChooser *chooser) +@@ -5905,15 +6286,13 @@ gtk_file_chooser_widget_get_files (GtkFileChooser *chooser) current_focus = NULL; file_list_seen = FALSE; @@ -1098,7 +1282,7 @@ index d1dd2f0059..cfbc18d715 100644 /* If there is no selection in the file list, we probably have this situation: * -@@ -5947,7 +6266,7 @@ gtk_file_chooser_widget_get_files (GtkFileChooser *chooser) +@@ -5947,7 +6326,7 @@ gtk_file_chooser_widget_get_files (GtkFileChooser *chooser) else return NULL; } @@ -1107,7 +1291,7 @@ index d1dd2f0059..cfbc18d715 100644 goto file_list; else if (priv->location_entry && priv->toplevel_last_focus_widget == priv->location_entry) goto file_entry; -@@ -6225,8 +6544,6 @@ switch_folder_foreach_cb (GtkTreeModel *model, +@@ -6225,8 +6604,6 @@ switch_folder_foreach_cb (GtkTreeModel *model, static void switch_to_selected_folder (GtkFileChooserWidget *impl) { @@ -1116,7 +1300,7 @@ index d1dd2f0059..cfbc18d715 100644 struct switch_folder_closure closure; /* We do this with foreach() rather than get_selected() as we may be in -@@ -6237,8 +6554,7 @@ switch_to_selected_folder (GtkFileChooserWidget *impl) +@@ -6237,8 +6614,7 @@ switch_to_selected_folder (GtkFileChooserWidget *impl) closure.file = NULL; closure.num_selected = 0; @@ -1126,7 +1310,7 @@ index d1dd2f0059..cfbc18d715 100644 g_assert (closure.file && closure.num_selected == 1); -@@ -6256,19 +6572,33 @@ get_selected_file_info_from_file_list (GtkFileChooserWidget *impl, +@@ -6256,19 +6632,33 @@ get_selected_file_info_from_file_list (GtkFileChooserWidget *impl, GtkTreeSelection *selection; GtkTreeIter iter; GFileInfo *info; @@ -1168,7 +1352,7 @@ index d1dd2f0059..cfbc18d715 100644 return info; } -@@ -6761,7 +7091,7 @@ gtk_file_chooser_widget_should_respond (GtkFileChooserEmbed *chooser_embed) +@@ -6761,7 +7151,7 @@ gtk_file_chooser_widget_should_respond (GtkFileChooserEmbed *chooser_embed) current_focus = gtk_window_get_focus (GTK_WINDOW (toplevel)); @@ -1177,7 +1361,7 @@ index d1dd2f0059..cfbc18d715 100644 { /* The following array encodes what we do based on the priv->action and the * number of files selected. -@@ -7008,7 +7338,7 @@ gtk_file_chooser_widget_initial_focus (GtkFileChooserEmbed *chooser_embed) +@@ -7008,7 +7398,7 @@ gtk_file_chooser_widget_initial_focus (GtkFileChooserEmbed *chooser_embed) { if (priv->location_mode == LOCATION_MODE_PATH_BAR || priv->operation_mode == OPERATION_MODE_RECENT) @@ -1186,7 +1370,7 @@ index d1dd2f0059..cfbc18d715 100644 else widget = priv->location_entry; } -@@ -7046,45 +7376,24 @@ selected_foreach_get_file_cb (GtkTreeModel *model, +@@ -7046,45 +7436,24 @@ selected_foreach_get_file_cb (GtkTreeModel *model, static GSList * get_selected_files (GtkFileChooserWidget *impl) { @@ -1234,7 +1418,7 @@ index d1dd2f0059..cfbc18d715 100644 result = g_slist_reverse (result); return result; -@@ -7155,6 +7464,7 @@ search_engine_finished_cb (GtkSearchEngine *engine, +@@ -7155,6 +7524,7 @@ search_engine_finished_cb (GtkSearchEngine *engine, gtk_stack_set_visible_child_name (GTK_STACK (priv->browse_files_stack), "empty"); gtk_entry_grab_focus_without_selecting (GTK_ENTRY (priv->search_entry)); } @@ -1242,7 +1426,7 @@ index d1dd2f0059..cfbc18d715 100644 } static void -@@ -7180,7 +7490,7 @@ search_clear_model (GtkFileChooserWidget *impl, +@@ -7180,7 +7550,7 @@ search_clear_model (GtkFileChooserWidget *impl, if (remove && gtk_tree_view_get_model (GTK_TREE_VIEW (priv->browse_files_tree_view)) == GTK_TREE_MODEL (priv->search_model)) @@ -1251,7 +1435,7 @@ index d1dd2f0059..cfbc18d715 100644 g_clear_object (&priv->search_model); } -@@ -7389,7 +7699,7 @@ recent_clear_model (GtkFileChooserWidget *impl, +@@ -7389,7 +7759,7 @@ recent_clear_model (GtkFileChooserWidget *impl, return; if (remove) @@ -1260,7 +1444,7 @@ index d1dd2f0059..cfbc18d715 100644 g_set_object (&priv->recent_model, NULL); } -@@ -7442,8 +7752,7 @@ recent_idle_cleanup (gpointer data) +@@ -7442,8 +7812,7 @@ recent_idle_cleanup (gpointer data) GtkFileChooserWidget *impl = load_data->impl; GtkFileChooserWidgetPrivate *priv = impl->priv; @@ -1270,7 +1454,7 @@ index d1dd2f0059..cfbc18d715 100644 gtk_tree_view_set_search_column (GTK_TREE_VIEW (priv->browse_files_tree_view), -1); gtk_tree_view_column_set_sort_column_id (priv->list_name_column, -1); -@@ -7570,12 +7879,10 @@ static gboolean +@@ -7570,12 +7939,10 @@ static gboolean recent_should_respond (GtkFileChooserWidget *impl) { GtkFileChooserWidgetPrivate *priv = impl->priv; @@ -1284,7 +1468,7 @@ index d1dd2f0059..cfbc18d715 100644 } static void -@@ -7635,29 +7942,41 @@ check_preview_change (GtkFileChooserWidget *impl) +@@ -7635,29 +8002,41 @@ check_preview_change (GtkFileChooserWidget *impl) GtkTreeModel *model; GtkTreeSelection *selection; @@ -1342,7 +1526,7 @@ index d1dd2f0059..cfbc18d715 100644 { GtkTreeIter iter; -@@ -7741,15 +8060,13 @@ list_select_func (GtkTreeSelection *selection, +@@ -7741,15 +8120,13 @@ list_select_func (GtkTreeSelection *selection, return TRUE; } @@ -1361,7 +1545,7 @@ index d1dd2f0059..cfbc18d715 100644 if (priv->location_entry) update_chooser_entry (impl); -@@ -7773,16 +8090,35 @@ list_row_activated (GtkTreeView *tree_view, +@@ -7773,16 +8150,35 @@ list_row_activated (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, GtkFileChooserWidget *impl) @@ -1400,7 +1584,7 @@ index d1dd2f0059..cfbc18d715 100644 if (!gtk_tree_model_get_iter (model, &iter, path)) return; -@@ -7802,7 +8138,7 @@ list_row_activated (GtkTreeView *tree_view, +@@ -7802,7 +8198,7 @@ list_row_activated (GtkTreeView *tree_view, priv->action == GTK_FILE_CHOOSER_ACTION_SAVE) g_signal_emit_by_name (impl, "file-activated"); @@ -1409,7 +1593,7 @@ index d1dd2f0059..cfbc18d715 100644 if (file) g_object_unref (file); -@@ -7833,10 +8169,13 @@ static void +@@ -7833,10 +8229,13 @@ static void update_cell_renderer_attributes (GtkFileChooserWidget *impl) { GtkFileChooserWidgetPrivate *priv = impl->priv; @@ -1424,7 +1608,7 @@ index d1dd2f0059..cfbc18d715 100644 "sensitive", MODEL_COL_IS_SENSITIVE, NULL); gtk_tree_view_column_set_attributes (priv->list_name_column, -@@ -8412,16 +8751,20 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class) +@@ -8412,16 +8811,20 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class) gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_widgets_hpaned); gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, browse_files_stack); gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, places_sidebar); @@ -1446,7 +1630,7 @@ index d1dd2f0059..cfbc18d715 100644 gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, preview_box); gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, extra_align); gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, extra_and_filters); -@@ -8438,6 +8781,7 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class) +@@ -8438,6 +8841,7 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class) gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, list_size_renderer); gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, list_location_column); gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, list_location_renderer); @@ -1454,7 +1638,7 @@ index d1dd2f0059..cfbc18d715 100644 gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, new_folder_name_entry); gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, new_folder_create_button); gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, new_folder_error_label); -@@ -8447,6 +8791,7 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class) +@@ -8447,6 +8851,7 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class) gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, rename_file_error_label); gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, rename_file_popover); gtk_widget_class_bind_template_child_private (widget_class, GtkFileChooserWidget, remote_warning_bar); @@ -1462,7 +1646,7 @@ index d1dd2f0059..cfbc18d715 100644 /* And a *lot* of callbacks to bind ... */ gtk_widget_class_bind_template_callback (widget_class, browse_files_key_press_event_cb); -@@ -8461,6 +8806,10 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class) +@@ -8461,6 +8866,10 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class) gtk_widget_class_bind_template_callback (widget_class, file_list_drag_end_cb); gtk_widget_class_bind_template_callback (widget_class, list_selection_changed); gtk_widget_class_bind_template_callback (widget_class, list_cursor_changed); @@ -1473,7 +1657,7 @@ index d1dd2f0059..cfbc18d715 100644 gtk_widget_class_bind_template_callback (widget_class, filter_combo_changed); gtk_widget_class_bind_template_callback (widget_class, path_bar_clicked); gtk_widget_class_bind_template_callback (widget_class, places_sidebar_open_location_cb); -@@ -8507,6 +8856,18 @@ post_process_ui (GtkFileChooserWidget *impl) +@@ -8507,6 +8916,18 @@ post_process_ui (GtkFileChooserWidget *impl) GDK_ACTION_COPY | GDK_ACTION_MOVE); gtk_drag_dest_add_uri_targets (impl->priv->browse_files_tree_view); @@ -1492,7 +1676,7 @@ index d1dd2f0059..cfbc18d715 100644 /* File browser treemodel columns are shared between GtkFileChooser implementations, * so we don't set cell renderer attributes in GtkBuilder, but rather keep that * in code. -@@ -8538,6 +8899,8 @@ post_process_ui (GtkFileChooserWidget *impl) +@@ -8538,6 +8959,8 @@ post_process_ui (GtkFileChooserWidget *impl) * that priv->icon_size be already setup. */ set_icon_cell_renderer_fixed_size (impl); @@ -1501,7 +1685,7 @@ index d1dd2f0059..cfbc18d715 100644 gtk_popover_set_default_widget (GTK_POPOVER (impl->priv->new_folder_popover), impl->priv->new_folder_create_button); gtk_popover_set_default_widget (GTK_POPOVER (impl->priv->rename_file_popover), impl->priv->rename_file_rename_button); -@@ -8583,7 +8946,8 @@ gtk_file_chooser_widget_init (GtkFileChooserWidget *impl) +@@ -8583,7 +9006,8 @@ gtk_file_chooser_widget_init (GtkFileChooserWidget *impl) priv->select_multiple = FALSE; priv->show_hidden = FALSE; priv->show_size_column = TRUE; @@ -1511,7 +1695,7 @@ index d1dd2f0059..cfbc18d715 100644 priv->load_state = LOAD_EMPTY; priv->reload_state = RELOAD_EMPTY; priv->pending_select_files = NULL; -@@ -8594,6 +8958,7 @@ gtk_file_chooser_widget_init (GtkFileChooserWidget *impl) +@@ -8594,6 +9018,7 @@ gtk_file_chooser_widget_init (GtkFileChooserWidget *impl) priv->recent_manager = gtk_recent_manager_get_default (); priv->create_folders = TRUE; priv->auto_selecting_first_row = FALSE; @@ -1519,7 +1703,7 @@ index d1dd2f0059..cfbc18d715 100644 /* Ensure GTK+ private types used by the template * definition before calling gtk_widget_init_template() -@@ -8641,6 +9006,258 @@ gtk_file_chooser_widget_new (GtkFileChooserAction action) +@@ -8641,6 +9066,258 @@ gtk_file_chooser_widget_new (GtkFileChooserAction action) NULL); } @@ -1778,7 +1962,7 @@ index d1dd2f0059..cfbc18d715 100644 static void gtk_file_chooser_widget_add_choice (GtkFileChooser *chooser, const char *id, -@@ -8693,7 +9310,7 @@ gtk_file_chooser_widget_add_choice (GtkFileChooser *chooser, +@@ -8693,7 +9370,7 @@ gtk_file_chooser_widget_add_choice (GtkFileChooser *chooser, widget = check; } @@ -1787,7 +1971,7 @@ index d1dd2f0059..cfbc18d715 100644 gtk_container_add (GTK_CONTAINER (priv->choice_box), widget); } -@@ -8760,4 +9377,3 @@ gtk_file_chooser_widget_get_choice (GtkFileChooser *chooser, +@@ -8760,4 +9437,3 @@ gtk_file_chooser_widget_get_choice (GtkFileChooser *chooser, return NULL; } @@ -1830,7 +2014,7 @@ index c3753f2f6a..e35a9c7cb0 100644 <default>false</default> <summary>Show hidden files</summary> diff --git a/gtk/ui/gtkfilechooserwidget.ui b/gtk/ui/gtkfilechooserwidget.ui -index ef227bdc70..ee8d0e82f0 100644 +index ef227bdc70..ebd9f0af47 100644 --- a/gtk/ui/gtkfilechooserwidget.ui +++ b/gtk/ui/gtkfilechooserwidget.ui @@ -8,6 +8,56 @@ @@ -2069,7 +2253,7 @@ index ef227bdc70..ee8d0e82f0 100644 + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="has_tooltip">True</property> -+ <property name="column-spacing">2</property> ++ <property name="column-spacing">2</property> + <signal name="button-press-event" handler="list_button_press_event_cb" swapped="no"/> + <signal name="drag-data-received" handler="file_list_drag_data_received_cb" swapped="no"/> + <signal name="drag-drop" handler="file_list_drag_drop_cb" swapped="no"/> |