GNOME Bugzilla – Bug 697183
can't resize columns after adding/removing them
Last modified: 2013-07-13 21:58:10 UTC
To see the problem: 1. Open a list view on a folder. 2. Open the Visible Columns dialog and add several columns (e.g. Owner, Group, Permissions). 3. Remove the columns. Now try to resize the columns in the list view. No resize cursor appears when you place the mouse between two columns, and the columns can't be resized. The resizing problem persists even when you navigate to other folders.
Created attachment 249004 [details] [review] Bug 697183 - Fix resize columns after adding/removing them Instead of appending and removing the columns simply set their visibility. This seems to fix the issue after attempting to reproduce the bug for a few minutes.
Review of attachment 249004 [details] [review]: Thanks, looks good with the exception of the following comment. ::: src/nautilus-list-view.c @@ +1516,2 @@ for (l = view_columns; l != NULL; l = l->next) { + if (!gtk_tree_view_column_get_visible (l->data)) { I don't think this check is necessary anymore, as gtk_tree_view_column_set_visible() will simply return in this case if the column is already visible.
While this patch makes sense to me, I don't see any reason why the original approach shouldn't work either - maybe it's worth reporting the original bug to GTK+ with a minimal testcase.
(In reply to comment #2) > Review of attachment 249004 [details] [review]: > > Thanks, looks good with the exception of the following comment. > > ::: src/nautilus-list-view.c > @@ +1516,2 @@ > for (l = view_columns; l != NULL; l = l->next) { > + if (!gtk_tree_view_column_get_visible (l->data)) { > > I don't think this check is necessary anymore, as > gtk_tree_view_column_set_visible() will simply return in this case if the > column is already visible. Thats needed for Bug 622941, otherwise the handler would be connected twice. (In reply to comment #3) > While this patch makes sense to me, I don't see any reason why the original > approach shouldn't work either - maybe it's worth reporting the original bug to > GTK+ with a minimal testcase. I agree, I tried to get a testcase working but it seems to happen in Nautilus randomly and I couldn't get it working well in my test.
Review of attachment 249004 [details] [review]: Feel free to push this then.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.