Sorting of files and folders in Pantheon Files is inconsistent with sorting of files and folders in open/save dialog

Bug #1533882 reported by Benjamin Carlisle
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Files
Confirmed
Wishlist
Unassigned

Bug Description

The elementary OS open/save dialog (i.e. the one used in Scratch) sorts files and folders together when sorted by name, while Pantheon Files segregates files from folders.

E.g. if I had the following in a folder, they are sorted in this order when I view them in the open/save dialog:

* a_file.txt
* a_folder/
* another_file.txt

Note that they're alphabetical, with the folder(s) mixed in with the files. I'll call this the "non-segregated" method of sorting.

In Pantheon Files, if I open the same folder with the same files and sub-folder inside it, it's sorted like this:

* a_folder/
* a_file.txt
* another_file.txt

Note that the folders are sorted first, and then the files come afterward. I'll call this the "segregated" method of sorting.

The first way of sorting (non-segregated) is also the same way that files and folders are sorted on a Mac. This is actually my preferred way of sorting. There's lots of reasons why it's my preference, but I can see why people might want folders separate too.

This is inconsistent and kind of annoying. I would love to have a little toggle switch in the Settings app to go from one to the other, so that everyone could be accommodated. Is there already a way to do this by changing some setting in Pantheon Files?

Tags: sort
Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

You can have the file-chooser dialog sort the directories first by changing the Gtk setting:

org.gtk.Settings.FileChooser.sort-directories-first

to true.

You can use dconf-editor to do this with the GUI or through the terminal using

gsettings set org.gtk.Settings.FileChooser sort-directories-first true

At the moment Files does not honour this setting - it always sorts directories first. This could be changed if there is enough support and UX team approval. I'll set this as a wishlist item.

Changed in pantheon-files:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

If you wish to have this changeable in Settings you should raise a bug against that app (if you have not already done so).

tags: added: sort
Revision history for this message
Niccolo Brogi (nbrogi) wrote :

Can I add something to this?

It's not alphabetical, either, because hidden files--files and folders that start with the dot character (".") appear after all the other ones.

The dot and other special characters come before all other letters when you sort alphabetically, since they appear first in the ASCII table.

I'll call this the "unintuitive" method of sorting, although it would work as "unpredictable" way of sorting, too.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.