diff options
author | Moritz Bruder <[email protected]> | 2018-04-04 09:39:47 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2018-04-08 15:01:05 -0400 |
commit | 0585258dc117b50cf8e8f6b5361fd815cc292cca (patch) | |
tree | 07f4a10ba806c9acd9b46989e6649c3a24880107 /src/caja-file-management-properties.c | |
parent | 68ace006c2443c5f4f263bcdb949ad4685a42081 (diff) | |
download | caja-0585258dc117b50cf8e8f6b5361fd815cc292cca.tar.bz2 caja-0585258dc117b50cf8e8f6b5361fd815cc292cca.tar.xz |
Add sort criterion by reversed extension segments
The basenames of files are split by dots and then starting from the end
each segment is compared to find a sort order. Example:
bar.tar.bz2
foo.tar.bz2
a.bar.gz
x.tar.gz
z.tar.gz
test.tex
A heuristic determines what extension segments are part of the
extension. There is probably no perfect solution but there are much
less false positives. As a result the sorting is more intuitive and the
displayed column in the list view is better readable and displays
extensions more accurately.
In addition a bug related to the default sort criteria in the
preferences has been fixed.
Diffstat (limited to 'src/caja-file-management-properties.c')
-rw-r--r-- | src/caja-file-management-properties.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/caja-file-management-properties.c b/src/caja-file-management-properties.c index dc687688..0568f360 100644 --- a/src/caja-file-management-properties.c +++ b/src/caja-file-management-properties.c @@ -94,6 +94,12 @@ static const char * const zoom_values[] = NULL }; +/* + * This array corresponds to the object with id "model2" in + * caja-file-management-properties.ui. It has to positionally match with it. + * The purpose is to map values from a combo box to values of the gsettings + * enum. + */ static const char * const sort_order_values[] = { "name", @@ -104,6 +110,7 @@ static const char * const sort_order_values[] = "mtime", "atime", "emblems", + "extension", "trash-time", NULL }; |