[nautilus/636-default-sort-order-settings-not-respected-in-3-30-no-docs-no-ui-regression-since-3-26: 13/13] file: Drop NAUTILUS_FILE_SORT_NONE



commit 29733c26e2da9d266c716b23d5578cf741c91cd5
Author: António Fernandes <antoniof gnome org>
Date:   Thu Nov 29 00:52:55 2018 +0000

    file: Drop NAUTILUS_FILE_SORT_NONE
    
    This was needed for manual layout, which was still used for handling
    desktop icons. Non-desktop views still have code to gracefully handle
    this value.
    
    With the refactoring from the last commit, we can finally drop this.

 data/org.gnome.nautilus.gschema.xml | 13 ++++++-------
 src/nautilus-canvas-view.c          |  7 -------
 src/nautilus-file.h                 | 13 ++++++-------
 src/nautilus-list-view.c            |  1 -
 src/nautilus-view-icon-controller.c |  7 -------
 5 files changed, 12 insertions(+), 29 deletions(-)
---
diff --git a/data/org.gnome.nautilus.gschema.xml b/data/org.gnome.nautilus.gschema.xml
index 13a593974..e557e845d 100644
--- a/data/org.gnome.nautilus.gschema.xml
+++ b/data/org.gnome.nautilus.gschema.xml
@@ -27,13 +27,12 @@
       When touching this, make sure to keep the values in sync with the
       #NautilusFileSortType enum in the `src/nautilus-file.h` code header file.
     -->
-    <value value="0" nick="manually"/>
-    <value value="1" nick="name"/>
-    <value value="2" nick="size"/>
-    <value value="3" nick="type"/>
-    <value value="4" nick="mtime"/>
-    <value value="5" nick="atime"/>
-    <value value="6" nick="starred"/>
+    <value value="0" nick="name"/>
+    <value value="1" nick="size"/>
+    <value value="2" nick="type"/>
+    <value value="3" nick="mtime"/>
+    <value value="4" nick="atime"/>
+    <value value="5" nick="starred"/>
   </enum>
 
   <enum id="org.gnome.nautilus.CanvasZoomLevel">
diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c
index ffbc59814..6674433d2 100644
--- a/src/nautilus-canvas-view.c
+++ b/src/nautilus-canvas-view.c
@@ -412,13 +412,6 @@ get_default_sort_order (NautilusFile *file)
 
     sort_type = nautilus_file_get_default_sort_type (file, &reversed);
 
-    if (sort_type == NAUTILUS_FILE_SORT_NONE)
-    {
-        sort_type = CLAMP (sort_type,
-                           NAUTILUS_FILE_SORT_BY_DISPLAY_NAME,
-                           NAUTILUS_FILE_SORT_BY_ATIME);
-    }
-
     return get_sort_criterion_by_sort_type (sort_type, reversed);
 }
 
diff --git a/src/nautilus-file.h b/src/nautilus-file.h
index 5f120a874..2164808ca 100644
--- a/src/nautilus-file.h
+++ b/src/nautilus-file.h
@@ -55,13 +55,12 @@ typedef enum {
         * `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,
-       NAUTILUS_FILE_SORT_BY_SIZE = 2,
-       NAUTILUS_FILE_SORT_BY_TYPE = 3,
-       NAUTILUS_FILE_SORT_BY_MTIME = 4,
-       NAUTILUS_FILE_SORT_BY_ATIME = 5,
-       NAUTILUS_FILE_SORT_BY_STARRED = 6,
+       NAUTILUS_FILE_SORT_BY_DISPLAY_NAME = 0,
+       NAUTILUS_FILE_SORT_BY_SIZE = 1,
+       NAUTILUS_FILE_SORT_BY_TYPE = 2,
+       NAUTILUS_FILE_SORT_BY_MTIME = 3,
+       NAUTILUS_FILE_SORT_BY_ATIME = 4,
+       NAUTILUS_FILE_SORT_BY_STARRED = 5,
 
        /* The following are specific to special locations and as such are not to be
         * included in the "org.gnome.nautilus.SortOrder" enum.
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 82f377570..e478151cf 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -136,7 +136,6 @@ get_default_sort_order (NautilusFile *file,
      */
     const char *attributes[] =
     {
-        "name",         /* is really "manually" which doesn't apply to lists */
         "name",
         "size",
         "type",
diff --git a/src/nautilus-view-icon-controller.c b/src/nautilus-view-icon-controller.c
index 2a9f1c7e2..e8e3cb1a9 100644
--- a/src/nautilus-view-icon-controller.c
+++ b/src/nautilus-view-icon-controller.c
@@ -160,13 +160,6 @@ get_default_sort_order (NautilusFile *file)
 
     sort_type = nautilus_file_get_default_sort_type (file, &reversed);
 
-    if (sort_type == NAUTILUS_FILE_SORT_NONE)
-    {
-        sort_type = CLAMP (sort_type,
-                           NAUTILUS_FILE_SORT_BY_DISPLAY_NAME,
-                           NAUTILUS_FILE_SORT_BY_ATIME);
-    }
-
     return get_sorts_constants_from_sort_type (sort_type, reversed);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]