[nautilus/wip/antoniof/meets-valgrind: 14/15] column-utilities: Add Created date column




commit 3b5d184f910d11b30202483adb55040c9cf882b6
Author: António Fernandes <antoniof gnome org>
Date:   Tue Dec 22 01:12:39 2020 +0000

    column-utilities: Add Created date column
    
    Now that we have backend support for showing and sorting by btime, add
    an optional "Created" column to the list view.
    
    This enables using the attribute as caption for icon view too.

 data/org.gnome.nautilus.gschema.xml |  2 +-
 src/nautilus-column-utilities.c     | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/data/org.gnome.nautilus.gschema.xml b/data/org.gnome.nautilus.gschema.xml
index 3b085ea52..7dd6bb2d8 100644
--- a/data/org.gnome.nautilus.gschema.xml
+++ b/data/org.gnome.nautilus.gschema.xml
@@ -248,7 +248,7 @@
       <summary>Columns visible in list view</summary>
     </key>
     <key type="as" name="default-column-order">
-      <default>[ 'name', 'size', 'type', 'owner', 'group', 'permissions', 'mime_type', 'where', 
'date_modified', 'date_modified_with_time', 'date_accessed', 'recency', 'starred' ]</default>
+      <default>[ 'name', 'size', 'type', 'owner', 'group', 'permissions', 'mime_type', 'where', 
'date_modified', 'date_modified_with_time', 'date_accessed', 'date_created', 'recency', 'starred' ]</default>
       <summary>Column order in list view</summary>
     </key>
     <key type="b" name="use-tree-view">
diff --git a/src/nautilus-column-utilities.c b/src/nautilus-column-utilities.c
index 7f43b0060..113270548 100644
--- a/src/nautilus-column-utilities.c
+++ b/src/nautilus-column-utilities.c
@@ -41,6 +41,7 @@ static const char *default_column_order[] =
     "date_modified_with_time",
     "date_modified",
     "date_accessed",
+    "date_created",
     "recency",
     "starred",
     NULL
@@ -97,6 +98,15 @@ get_builtin_columns (void)
                                            "default-sort-order", GTK_SORT_DESCENDING,
                                            "xalign", 1.0,
                                            NULL));
+    columns = g_list_append (columns,
+                             g_object_new (NAUTILUS_TYPE_COLUMN,
+                                           "name", "date_created",
+                                           "attribute", "date_created",
+                                           "label", _("Created"),
+                                           "description", _("The date the file was created."),
+                                           "default-sort-order", GTK_SORT_DESCENDING,
+                                           "xalign", 1.0,
+                                           NULL));
 
     columns = g_list_append (columns,
                              g_object_new (NAUTILUS_TYPE_COLUMN,


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