! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Remove Desktop entry in tree view
Status:
RESOLVED: FIXED

Comments

Description Yousuf 'Jay' Philips 2020-02-27 20:56:00 CET
Created attachment 9492 
screencast

In tree view, the top level 'Desktop' entry causes the selection focus to jump to itself and its child folders when you click on the desktop folder and its child folders found under Home. So this 'Desktop' top level entry should be removed or this jumping behaviour should be nullified.
Comment 1 alexxcons editbugs 2020-02-27 22:58:11 CET
Thanks for reporting !

Yes, would be nice to have a fix for that!

Possible duplicate: Bug #16024

Its unlikely that I will have time to work on a fix for that myself in the near future, so patches would be very welcome !
Comment 2 alexxcons editbugs 2020-02-27 23:00:42 CET
Method of interest: thunar-tree-view.c : thunar_tree_view_cursor_idle
Comment 3 Yousuf 'Jay' Philips 2020-02-27 23:19:13 CET
Wouldn't commenting out the below line inside thunar_tree_view_cursor_idle() solve the issue.

path = thunar_tree_view_get_preferred_toplevel_path (view, view->current_directory);
Comment 4 alexxcons editbugs 2020-02-27 23:36:46 CET
Possible .. to be tested, to be checked which other consequences that would have.
Comment 5 Yousuf 'Jay' Philips 2020-02-28 03:35:11 CET
Tested it and it is having the opposite effect of now when you click on Desktop > Folder, cursor is jumping to Home > Desktop > Folder, which is definitely a better, but this same behaviour happens when the Desktop entry is removed and the line is kept. Ultimately the Desktop entry has no real benefit in tree view and i'd recommend just removing it.

Yes this is a partial duplication of bug 16024, as this cursor jump behaviour happens whenever there is a duplicate entry of the same folder in multiple tree paths.

3 paths for Desktop - User > Desktop, Desktop, File System > home > user > Desktop
2 paths for mounted partitions - Windows 7, File System > media > user > Windows 7
Comment 6 alexxcons editbugs 2020-02-28 23:26:46 CET
I would not want to remove "Desktop", since it only would fix the bug for Desktop paths.

Even if "thunar_tree_view_get_preferred_toplevel_path" is removed, some jumping may happen. Thats because if path = NULL, just the first found path is taken.

So if you e.g. navigate to /filesystem/home/some_user/pictures, than the path will be opened at the very first "home" node, not on the filesystem not where you started.

Imo a proper fix would be, to modify thunar_tree_view_get_preferred_toplevel_path so, that it return the correct path (the one which currently is focused)
Comment 7 Yousuf 'Jay' Philips 2020-03-01 00:40:03 CET
Okay i'll await the proper fix that you have suggested, but still think the 'Desktop' entry is redundant in tree view and other file manager tree views also dont include it (e.g. Caja, Nemo).
Comment 8 alexxcons editbugs 2020-03-02 18:52:58 CET
(In reply to Jay Philips from comment #7)
> Okay i'll await the proper fix that you have suggested,

I have that on my very very very long TODO-List .. though it might take years till I come to that bug .. help would be very welcome !

> but still think the
> 'Desktop' entry is redundant in tree view and other file manager tree views
> also dont include it (e.g. Caja, Nemo).

I dont want to blindly follow other file-managers decisions. Why you think it is redundant in the tree-view ? Because it is a direct child of $HOME ? That argumentation as well would fit for the shortcut view, or ?
Comment 9 Yousuf 'Jay' Philips 2020-03-03 19:04:11 CET
(In reply to alexxcons from comment #8)
> I dont want to blindly follow other file-managers decisions. Why you think
> it is redundant in the tree-view ? Because it is a direct child of $HOME ?

The simplest argument would be that none of the other user folders under home have a top level position and I'm sure that you wouldn't agree if someone suggested that one of them be put as a new top level entry, so what makes Desktop so special to be put in that position?

> That argumentation as well would fit for the shortcut view, or ?

In shortcut view, all of the user folders are easily accessible, because it would require 2 clicks and a large amount of mouse movement to get to them if they weren't visible (you have to move the mouse from the pane to the file/folder area). This isnt the case for tree view, where you can easily expand home, if it isnt already expanded, and move the mouse a short distance to get to any of the user folder, without leaving the pane. I always launch thunar with home expanded in tree view and i think that might be a good default view for it, so its more resembles shortcut view.
Comment 10 alexxcons editbugs 2020-03-03 23:43:54 CET
(In reply to Jay Philips from comment #9)
> (In reply to alexxcons from comment #8)
> > I dont want to blindly follow other file-managers decisions. Why you think
> > it is redundant in the tree-view ? Because it is a direct child of $HOME ?
> 
> The simplest argument would be that none of the other user folders under
> home have a top level position and I'm sure that you wouldn't agree if
> someone suggested that one of them be put as a new top level entry, so what
> makes Desktop so special to be put in that position?
True, thats a fair argument.

> > That argumentation as well would fit for the shortcut view, or ?
> 
> In shortcut view, all of the user folders are easily accessible, because it
> would require 2 clicks and a large amount of mouse movement to get to them
> if they weren't visible (you have to move the mouse from the pane to the
> file/folder area). This isnt the case for tree view, where you can easily
> expand home, if it isnt already expanded, and move the mouse a short
> distance to get to any of the user folder, without leaving the pane.
Yes, for sure it would require much more mouse movement in shortcut view than in tree-view ... ok, finally you got me :)  .. could you please drop me a patch ?
Comment 11 Yousuf 'Jay' Philips 2020-03-04 14:04:28 CET
Created attachment 9535 
remove desktop from tree view

Glad i was able to convince you. :D
Comment 12 Git Bot editbugs 2020-03-04 21:24:00 CET
Yousuf Philips referenced this bugreport in commit ab36334d5a553da07f53b2791b05fd999184946c

Remove top level desktop entry from tree view (bug #16474)

https://git.xfce.org/xfce/thunar/commit?id=ab36334d5a553da07f53b2791b05fd999184946c
Comment 13 alexxcons editbugs 2020-03-04 21:25:13 CET
(In reply to Jay Philips from comment #11)
> Glad i was able to convince you. :D
Always open for good arguments :)

Pushed to master. Thanks alot for your contribution !
Comment 14 Yousuf 'Jay' Philips 2020-03-04 23:54:40 CET
So will these be in the next 1.8.x release?
Comment 15 alexxcons editbugs 2020-03-07 00:26:37 CET
No, only in 1.9.x and above. Since it is not a bugfix, its going to master only.

Bug #16474

Reported by:
Yousuf 'Jay' Philips
Reported on: 2020-02-27
Last modified on: 2020-03-07

People

Assignee:
Xfce Bug Triage
CC List:
1 user

Version

Version:
1.8.11

Attachments

screencast (324.72 KB, video/mp4)
2020-02-27 20:56 CET , Yousuf 'Jay' Philips
no flags
remove desktop from tree view (3.73 KB, patch)
2020-03-04 14:04 CET , Yousuf 'Jay' Philips
no flags

Additional information