After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 697183 - can't resize columns after adding/removing them
can't resize columns after adding/removing them
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Views: List View
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-03 15:29 UTC by Adam Dingle
Modified: 2013-07-13 21:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bug 697183 - Fix resize columns after adding/removing them (3.19 KB, patch)
2013-07-12 13:43 UTC, Garrett Regier
committed Details | Review

Description Adam Dingle 2013-04-03 15:29:28 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.
Comment 1 Garrett Regier 2013-07-12 13:43:08 UTC
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.
Comment 2 Cosimo Cecchi 2013-07-12 17:14:55 UTC
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.
Comment 3 Cosimo Cecchi 2013-07-12 17:16:08 UTC
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.
Comment 4 Garrett Regier 2013-07-12 20:35:19 UTC
(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.
Comment 5 Cosimo Cecchi 2013-07-12 22:02:17 UTC
Review of attachment 249004 [details] [review]:

Feel free to push this then.
Comment 6 Garrett Regier 2013-07-13 21:58:06 UTC
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.