summaryrefslogtreecommitdiff
path: root/src/nautilus-file.h
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2018-11-29 00:14:31 +0000
committerCarlos Soriano <csoriano1618@gmail.com>2018-12-07 15:44:15 +0000
commitbc4ea00e95a7e0cb0722a16dbef3d99241daf070 (patch)
tree5c17c2a0d4d33857485771e6c1f1145275f0cf37 /src/nautilus-file.h
parentd6effd2d6c4d222f1b7893dc12699d9272eea153 (diff)
downloadnautilus-bc4ea00e95a7e0cb0722a16dbef3d99241daf070.tar.gz
file: Centralize getting default sort order
nautilus_file_get_default_sort_type() has a misleading name. It doesn't actually get the default sort type for any folder, but only for certain special folders. For regular folders, the default comes from GSettings keys, but this is implemented in the views instead, with a lot of reduncant code. So, let's do that in nautilus_file_get_default_sort_type() directly, and clearly document it.
Diffstat (limited to 'src/nautilus-file.h')
-rw-r--r--src/nautilus-file.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nautilus-file.h b/src/nautilus-file.h
index ce5f57846..5f120a874 100644
--- a/src/nautilus-file.h
+++ b/src/nautilus-file.h
@@ -52,7 +52,8 @@ typedef struct NautilusFile NautilusFile;
typedef enum {
/* These may be set as default-sort-order. When touching this, make sure to
* keep the values in sync with the "org.gnome.nautilus.SortOrder" enum in the
- * `data/org.gnome.nautilus.gschema.xml` schemas file.
+ * `data/org.gnome.nautilus.gschema.xml` schemas file, and the attributes[]
+ * array in `src/nautilus-list-view.c`.
*/
NAUTILUS_FILE_SORT_NONE = 0, /* Formerly used for "manual" sorting. */
NAUTILUS_FILE_SORT_BY_DISPLAY_NAME = 1,
@@ -426,8 +427,6 @@ gboolean nautilus_file_is_local_or_fuse (Nautilu
/* Comparing two file objects for sorting */
NautilusFileSortType nautilus_file_get_default_sort_type (NautilusFile *file,
gboolean *reversed);
-const gchar * nautilus_file_get_default_sort_attribute (NautilusFile *file,
- gboolean *reversed);
int nautilus_file_compare_for_sort (NautilusFile *file_1,
NautilusFile *file_2,