! 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 !
Order of partitions in tree view not stable
Status:
RESOLVED: FIXED

Comments

Description Yousuf 'Jay' Philips 2020-02-25 21:50:03 CET
The partition order shown in tree view compared to shortcuts view or the desktop isnt the same and the order in tree view constantly changes after closing and reopening.

Here is a screencast showing the problem which was tested on Xubuntu 20.04 from Feb 24th.
https://www.youtube.com/watch?v=TrZDVlcifIY
Comment 1 alexxcons editbugs 2020-02-25 23:15:30 CET
Thanks for reporting!

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 Theo Linkspfeifer editbugs 2020-02-27 12:46:46 CET
The device entries in shortcuts view are sorted by timestamp. No sorting is applied in tree view.

https://git.xfce.org/xfce/thunar/tree/thunar/thunar-shortcuts-model.c#n1121
Comment 3 Theo Linkspfeifer editbugs 2020-02-27 17:50:03 CET
Created attachment 9491 
diff

Does this look good? How about inserting the entries below the "File System" one.
Comment 4 alexxcons editbugs 2020-02-27 23:34:46 CET
Just noticed that I cannot test, because I only have a single partition :F
(Saw that my USB devices are as well shown in different order, in bookmark/tree view, though not sure if that belongs here)

remark on the patch:

This check can be removed:
if (item->device != NULL && device != NULL)
- The if in 1085 already protects from item->device != NULL
- "_thunar_return_if_fail (THUNAR_IS_DEVICE (device));" already protects from "device == NULL"

a "git format-patch" would be nice.

Besides that, it looks good to me.

@Jay: Could you please give it a try ?
Comment 5 Yousuf 'Jay' Philips 2020-02-27 23:50:43 CET
@alexxcons: dont know how to build, so unfortunately cant test. i hit you up on irc with my jphilips handle asking how i can setup a build environment.
Comment 6 alexxcons editbugs 2020-02-28 00:05:50 CET
Seems like my irc bouncer is offline today :F .... could you please send me a  mail instead ?

( So you implemented the patches on Bug #16472 without any building/testing? nice ;)  )
Comment 7 Yousuf 'Jay' Philips 2020-02-28 00:17:53 CET
I've mailed you now.

( Yes those patches are just me, git, and no C++ experience :D )
Comment 8 Yousuf 'Jay' Philips 2020-02-28 02:39:43 CET
Tested it and it seems to be working
Comment 9 Theo Linkspfeifer editbugs 2020-02-28 11:41:46 CET
Created attachment 9497 
patch
Comment 10 Theo Linkspfeifer editbugs 2020-02-28 20:30:57 CET
Note that entries for remote folders still appear at random positions (Bug #10815).


The following condition could be used to move those entries up so that they appear below the "Network":

/* sort devices by type */
if (thunar_device_get_kind (item->device) < thunar_device_get_kind (device))
  continue;

https://git.xfce.org/xfce/thunar/tree/thunar/thunar-device.h#n35
Comment 11 Git Bot editbugs 2020-02-28 22:48:58 CET
Theo Linkspfeifer referenced this bugreport in commit 97420d160ab845cc8852b2e63e1de4b971d3b1d9

Sort device entries in tree view (Bug #16471)

https://git.xfce.org/xfce/thunar/commit?id=97420d160ab845cc8852b2e63e1de4b971d3b1d9
Comment 12 Git Bot editbugs 2020-02-28 22:50:24 CET
Theo Linkspfeifer referenced this bugreport in commit 1d46702563be0418cc3a18e413f958bb86ba30c8

Sort device entries in tree view (Bug #16471)

https://git.xfce.org/xfce/thunar/commit?id=1d46702563be0418cc3a18e413f958bb86ba30c8
Comment 13 alexxcons editbugs 2020-02-28 23:00:41 CET
Pushed to master and 4.14 branch, to be released in thunar 1.8.13

Thank you for your contribution !

(In reply to Theo Linkspfeifer from comment #10)
> Note that entries for remote folders still appear at random positions (Bug
> #10815).
> 
> 
> The following condition could be used to move those entries up so that they
> appear below the "Network":
> /* sort devices by type */
> if (thunar_device_get_kind (item->device) < thunar_device_get_kind (device))
>   continue;
> 
> https://git.xfce.org/xfce/thunar/tree/thunar/thunar-device.h#n35

Hmm, that would not help that much imo .. I would prefer the approach proposed in #10815 .. though imo it should be consistent for bookmark view and tree-view.

Bug #16471

Reported by:
Yousuf 'Jay' Philips
Reported on: 2020-02-25
Last modified on: 2020-02-28

People

Assignee:
Xfce Bug Triage
CC List:
2 users

Version

Version:
1.8.11

Attachments

diff (1.35 KB, patch)
2020-02-27 17:50 CET , Theo Linkspfeifer
no flags
patch (1.64 KB, patch)
2020-02-28 11:41 CET , Theo Linkspfeifer
no flags

Additional information