Bug 698501 - file browser: should display files in same order as Nautilus
file browser: should display files in same order as Nautilus
Status: UNCONFIRMED
Product: gedit
Classification: Applications
Component: plugins
git master
Other Linux
: Normal normal
: ---
Assigned To: Garrett Regier
Gedit maintainers
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-04-21 12:15 UTC by Adam Dingle
Modified: 2017-01-15 16:51 UTC (History)
2 users (show)

See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix sorting files in file browser (1.00 KB, patch)
2013-06-14 21:49 UTC, Garrett Regier
committed Details | Diff | Review
filebrowser: Sort files starting with a '.' like Nautilus (2.10 KB, patch)
2016-10-05 15:00 UTC, Garrett Regier
none Details | Diff | Review

Description Adam Dingle 2013-04-21 12:15:31 UTC
When I view hidden files in the gedit file browser, they may be listed in a different order than Nautilus would use.  For example, the file browser lists these files in this order:

bar
foo
bar~
foo~

But Nautilus lists the same files in this order:

bar
bar~
foo
foo~

For consistency, these should be the same.
Comment 1 Garrett Regier 2013-06-14 21:49:43 UTC
Created attachment 246859 [details] [review]
Fix sorting files in file browser

Hidden files were always at the end which is not the expected
behavior and conflicts with the behavior of nautilus. If one does
not wish to see hidden files they should instead use the filter.
Comment 2 Ignacio Casal Quinteiro (nacho) 2013-06-15 09:42:07 UTC
Review of attachment 246859 [details] [review]:

Looks good.
Comment 3 Garrett Regier 2013-06-15 10:14:48 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.
Comment 4 Adam Dingle 2013-12-15 18:47:28 UTC
It appears that the order is still not consistent with Nautilus.  I'm running gedit 3.10.1 (which includes Garrett's change above).  In the file browser files beginning with '.' come before files beginning with [A-Za-z]:

.cache/
.config/
.local/
bin/
Desktop/
Documents/
.bashrc
foobar

In Nautilus (in git master) these files appear in this order:

bin/
Desktop/
Documents/
.cache/
.config/
.local/
foobar
.bashrc

Reopening.
Comment 5 Garrett Regier 2016-10-05 15:00:43 UTC
Created attachment 336992 [details] [review]
filebrowser: Sort files starting with a '.' like Nautilus

Do the same behavior for '#' as well.

See:
https://git.gnome.org/browse/nautilus/tree/src/nautilus-file.c#n88
Comment 6 Garrett Regier 2017-01-15 16:51:21 UTC
ping, can I get a quick review for this patch?

Note You need to log in before you can comment on or make changes to this bug.