[nautilus/wip/corey/fix-sort] list-base: Make sort constants match attribute names



commit 92337288bf762d2028b50ad3c687430ad10ec9be
Author: Corey Berla <corey berla me>
Date:   Thu Oct 13 13:28:11 2022 -0700

    list-base: Make sort constants match attribute names
    
    In columnview we are setting them using the attribute value
    and they should match the toolbar dropdown.

 src/nautilus-list-base.c                       | 8 ++++----
 src/resources/ui/nautilus-toolbar-view-menu.ui | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/nautilus-list-base.c b/src/nautilus-list-base.c
index 2e2552a10..174105fcb 100644
--- a/src/nautilus-list-base.c
+++ b/src/nautilus-list-base.c
@@ -82,19 +82,19 @@ static const SortConstants sorts_constants[] =
     },
     {
         NAUTILUS_FILE_SORT_BY_MTIME,
-        "modification date",
+        "date_modified",
     },
     {
         NAUTILUS_FILE_SORT_BY_ATIME,
-        "access date",
+        "date_accessed",
     },
     {
         NAUTILUS_FILE_SORT_BY_BTIME,
-        "creation date",
+        "date_created",
     },
     {
         NAUTILUS_FILE_SORT_BY_TRASHED_TIME,
-        "trashed",
+        "trashed_on",
     },
     {
         NAUTILUS_FILE_SORT_BY_SEARCH_RELEVANCE,
diff --git a/src/resources/ui/nautilus-toolbar-view-menu.ui b/src/resources/ui/nautilus-toolbar-view-menu.ui
index 03c6e8e8d..de675f365 100644
--- a/src/resources/ui/nautilus-toolbar-view-menu.ui
+++ b/src/resources/ui/nautilus-toolbar-view-menu.ui
@@ -16,13 +16,13 @@
     </item>
     <item>
       <attribute name="action">view.sort</attribute>
-      <attribute name="target" type="(sb)">('modification date',true)</attribute>
+      <attribute name="target" type="(sbb)">('date_modified',true)</attribute>
       <attribute name="label" translatable="yes">Last _Modified</attribute>
       <attribute name="hidden-when">action-disabled</attribute>
     </item>
     <item>
       <attribute name="action">view.sort</attribute>
-      <attribute name="target" type="(sb)">('modification date',false)</attribute>
+      <attribute name="target" type="(sbb)">('date_modified',false)</attribute>
       <attribute name="label" translatable="yes">_First Modified</attribute>
       <attribute name="hidden-when">action-disabled</attribute>
     </item>
@@ -40,7 +40,7 @@
     </item>
     <item>
       <attribute name="action">view.sort</attribute>
-      <attribute name="target" type="(sb)">('trashed',true)</attribute>
+      <attribute name="target" type="(sbb)">('trashed_on',true)</attribute>
       <attribute name="label" translatable="yes">Last _Trashed</attribute>
       <attribute name="hidden-when">action-disabled</attribute>
       <attribute name="nautilus-menu-item">last_trashed</attribute>


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