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




commit 9f42eac835fb219b93b11adc249fea7d18858755
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..ffdd3ac07 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="(sb)">('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="(sb)">('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="(sb)">('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]