[gtk/gbsneto/filechooser-column-view: 62/105] filechooserwidget: Stop autosizing treeview




commit 7e2ff57ad1f60fca748b629756d22112fb8425df
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat Oct 8 12:10:55 2022 -0300

    filechooserwidget: Stop autosizing treeview

 gtk/gtkfilechooserwidget.c | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 5f47f34a6b..aae037c0b1 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -3740,25 +3740,8 @@ update_columns (GtkFileChooserWidget *impl,
                 gboolean              location_visible,
                 const char           *time_title)
 {
-  gboolean need_resize = FALSE;
-
-  if (gtk_column_view_column_get_visible (impl->column_view_location_column) != location_visible)
-    {
-      gtk_column_view_column_set_visible (impl->column_view_location_column, location_visible);
-      need_resize = TRUE;
-    }
-
-  if (g_strcmp0 (gtk_column_view_column_get_title (impl->column_view_time_column), time_title) != 0)
-    {
-      gtk_column_view_column_set_title (impl->column_view_time_column, time_title);
-      need_resize = TRUE;
-    }
-
-  if (need_resize)
-    {
-      /* This undoes user resizing of columns when the columns change. */
-      gtk_tree_view_columns_autosize (GTK_TREE_VIEW (impl->browse_files_tree_view));
-    }
+  gtk_column_view_column_set_visible (impl->column_view_location_column, location_visible);
+  gtk_column_view_column_set_title (impl->column_view_time_column, time_title);
 }
 
 /* Creates a sort model to wrap the file system model and sets it on the tree view */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]