summaryrefslogtreecommitdiff
path: root/src/file-manager
diff options
context:
space:
mode:
authorGordon Norman Squash <[email protected]>2022-06-06 15:09:44 -0400
committerLuke from DC <[email protected]>2022-06-08 01:58:12 +0000
commitb90c1c21ded05281f5ed9dfbbaac764f918300f8 (patch)
tree1bd83582b9b81a8477669b05acf13eaf4cbfae0e /src/file-manager
parent764395ea7d56c79920fa5c75956096a713675848 (diff)
downloadcaja-b90c1c21ded05281f5ed9dfbbaac764f918300f8.tar.bz2
caja-b90c1c21ded05281f5ed9dfbbaac764f918300f8.tar.xz
Document and fix default-sort-order preference
This patch resolves three related issues: The first issue was that the GSettings schema for Caja did not include an entry to sort by the "btime", or creation date, of files. If the user chose such an option in the Caja Preferences, GSettings would produce a warning (often out-of-sight, as it was usually redirected into the user's .xsession-errors file), and Caja would not actually change the default sort-order of files. This patch adds the btime as a valid setting in the schema. The second issue was that. because of the above (an entry in the settings schema was missing), some of the alternative sort orders listed in the schema (everything after and including "atime") were not assigned the same numbers as the sort orders listed elsewhere in the Caja source code. Specifically, in icon- and compact-views, if the default sort-order was "emblems", the observed / actual sort-order would be the entry before "emblems", namely "atime" -- so instead of sorting by the names of associated emblems, Caja would sort by each file's access time. An array in the code for the list-view also was missing many values and included some values out of order, so the default sort-order setting affected directories viewed in list-view mode seemingly randomly. The former is taken care of using the fix described in the above paragraph; the latter is fixed in this patch by adding / reorganizing the array for the list-view sort-orders appropriately. The third issue (admittedly, a lesser issue) was that the documentation for the default-sort-order setting was lacking -- it at least did not list all the possible values that the setting could accept. In this patch, I resolve this issue by listing all values in the setting's description, and also go into more detail about what each value does. (However, perhaps I included a little too much detail. It'll only benefit [supposed power users who may already know this stuff] who use GSettings or DConf directly, and it'll certainly be a headache for translators. I'll admit that.)
Diffstat (limited to 'src/file-manager')
-rw-r--r--src/file-manager/fm-list-view.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index 87bb5d9e..b5a61459 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -179,12 +179,14 @@ get_default_sort_order (CajaFile *file, gboolean *reversed)
"name",
"uri",
"size",
- "size_on_disk",
"type",
"date_modified",
+ "date_created",
"date_accessed",
"emblems",
"trashed_on",
+ "size_on_disk",
+ "extension",
NULL
};