filechooserwidget: Stop autosizing treeview
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Sat, 8 Oct 2022 15:10:55 +0000 (12:10 -0300)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 21 Oct 2022 02:34:40 +0000 (22:34 -0400)
gtk/gtkfilechooserwidget.c

index e5488c67bd69c48c16f11b3a537279ff352b6e6e..032533adb0c2434c26d7ace7a41db47eb6523f45 100644 (file)
@@ -3804,25 +3804,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 */