[gtk/gbsneto/filechooser-column-view: 50/105] filechooserwidget: Drop name column from treeview
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gbsneto/filechooser-column-view: 50/105] filechooserwidget: Drop name column from treeview
- Date: Wed, 12 Oct 2022 20:42:35 +0000 (UTC)
commit f61f746d82ac26563f86338efef2a8acfd0ccd11
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Oct 8 08:22:53 2022 -0300
filechooserwidget: Drop name column from treeview
It is now entirely handled by the column view.
gtk/gtkfilechooserwidget.c | 8 +-------
gtk/ui/gtkfilechooserwidget.ui | 7 -------
2 files changed, 1 insertion(+), 14 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index d2908fa186..8f5f7d3afd 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -271,7 +271,6 @@ struct _GtkFileChooserWidget
GFile *current_folder;
GFile *renamed_file;
- GtkTreeViewColumn *list_name_column;
GtkTreeViewColumn *list_time_column;
GtkCellRenderer *list_date_renderer;
GtkCellRenderer *list_time_renderer;
@@ -1366,7 +1365,7 @@ rename_selected_cb (GtkTreeModel *model,
-1);
gtk_tree_view_get_cell_area (GTK_TREE_VIEW (impl->browse_files_tree_view),
- path, impl->list_name_column, &rect);
+ path, impl->list_size_column, &rect);
gtk_tree_view_convert_bin_window_to_widget_coords (GTK_TREE_VIEW (impl->browse_files_tree_view),
rect.x, rect.y,
@@ -2086,7 +2085,6 @@ file_list_set_sort_column_ids (GtkFileChooserWidget *impl)
gtk_tree_view_set_search_column (GTK_TREE_VIEW (impl->browse_files_tree_view), -1);
- gtk_tree_view_column_set_sort_column_id (impl->list_name_column, MODEL_COL_NAME);
gtk_tree_view_column_set_sort_column_id (impl->list_time_column, MODEL_COL_TIME);
gtk_tree_view_column_set_sort_column_id (impl->list_size_column, MODEL_COL_SIZE);
gtk_tree_view_column_set_sort_column_id (impl->list_type_column, MODEL_COL_TYPE);
@@ -3793,7 +3791,6 @@ update_columns (GtkFileChooserWidget *impl,
if (need_resize)
{
/* This undoes user resizing of columns when the columns change. */
- gtk_tree_view_column_set_expand (impl->list_name_column, TRUE);
gtk_tree_view_column_set_expand (impl->list_location_column, TRUE);
gtk_tree_view_columns_autosize (GTK_TREE_VIEW (impl->browse_files_tree_view));
}
@@ -6529,7 +6526,6 @@ search_setup_model (GtkFileChooserWidget *impl)
gtk_tree_view_set_model (GTK_TREE_VIEW (impl->browse_files_tree_view),
GTK_TREE_MODEL (impl->search_model));
- gtk_tree_view_column_set_sort_column_id (impl->list_name_column, -1);
gtk_tree_view_column_set_sort_column_id (impl->list_time_column, -1);
gtk_tree_view_column_set_sort_column_id (impl->list_size_column, -1);
gtk_tree_view_column_set_sort_column_id (impl->list_type_column, -1);
@@ -6769,7 +6765,6 @@ recent_start_loading (GtkFileChooserWidget *impl)
GTK_TREE_MODEL (impl->recent_model));
gtk_tree_view_set_search_column (GTK_TREE_VIEW (impl->browse_files_tree_view), -1);
- gtk_tree_view_column_set_sort_column_id (impl->list_name_column, -1);
gtk_tree_view_column_set_sort_column_id (impl->list_time_column, -1);
gtk_tree_view_column_set_sort_column_id (impl->list_size_column, -1);
gtk_tree_view_column_set_sort_column_id (impl->list_type_column, -1);
@@ -7586,7 +7581,6 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserWidget, location_entry_box);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserWidget, search_entry);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserWidget, search_spinner);
- gtk_widget_class_bind_template_child (widget_class, GtkFileChooserWidget, list_name_column);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserWidget, list_time_column);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserWidget, list_date_renderer);
gtk_widget_class_bind_template_child (widget_class, GtkFileChooserWidget, list_time_renderer);
diff --git a/gtk/ui/gtkfilechooserwidget.ui b/gtk/ui/gtkfilechooserwidget.ui
index 09fb17af36..e30550be1f 100644
--- a/gtk/ui/gtkfilechooserwidget.ui
+++ b/gtk/ui/gtkfilechooserwidget.ui
@@ -238,13 +238,6 @@
<signal name="changed" handler="list_selection_changed"
swapped="no"/>
</object>
</child>
- <child>
- <object class="GtkTreeViewColumn" id="list_name_column">
- <property name="title" translatable="yes">Name</property>
- <property name="resizable">1</property>
- <property name="expand">1</property>
- </object>
- </child>
<child>
<object class="GtkTreeViewColumn" id="list_location_column">
<property name="title" translatable="yes">Location</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]