mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
Bug 686137 - Add Access Date column and set as default for recent
This commit is contained in:
parent
7f438463c7
commit
1fd016ed96
4 changed files with 23 additions and 2 deletions
|
@ -36,6 +36,7 @@ static const char *default_column_order[] = {
|
|||
"size",
|
||||
"type",
|
||||
"date_modified",
|
||||
"date_accessed",
|
||||
"owner",
|
||||
"group",
|
||||
"permissions",
|
||||
|
@ -79,6 +80,14 @@ get_builtin_columns (void)
|
|||
"description", _("The date the file was modified."),
|
||||
"default-sort-order", GTK_SORT_DESCENDING,
|
||||
NULL));
|
||||
columns = g_list_append (columns,
|
||||
g_object_new (NAUTILUS_TYPE_COLUMN,
|
||||
"name", "date_accessed",
|
||||
"attribute", "date_accessed",
|
||||
"label", _("Accessed"),
|
||||
"description", _("The date the file was accessed."),
|
||||
"default-sort-order", GTK_SORT_DESCENDING,
|
||||
NULL));
|
||||
|
||||
columns = g_list_append (columns,
|
||||
g_object_new (NAUTILUS_TYPE_COLUMN,
|
||||
|
|
|
@ -7647,7 +7647,9 @@ nautilus_file_get_default_sort_type (NautilusFile *file,
|
|||
res = get_attributes_for_default_sort_type (file, &is_recent, &is_download, &is_trash, &is_search);
|
||||
|
||||
if (res) {
|
||||
if (is_recent || is_download) {
|
||||
if (is_recent) {
|
||||
retval = NAUTILUS_FILE_SORT_BY_ATIME;
|
||||
} else if (is_download) {
|
||||
retval = NAUTILUS_FILE_SORT_BY_MTIME;
|
||||
} else if (is_trash) {
|
||||
retval = NAUTILUS_FILE_SORT_BY_TRASHED_TIME;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<menuitem name="Sort by Size" action="Sort by Size"/>
|
||||
<menuitem name="Sort by Type" action="Sort by Type"/>
|
||||
<menuitem name="Sort by Modification Date" action="Sort by Modification Date"/>
|
||||
<menuitem name="Sort by Access Date" action="Sort by Access Date"/>
|
||||
<menuitem name="Sort by Trash Time" action="Sort by Trash Time"/>
|
||||
<menuitem name="Sort by Search Relevance" action="Sort by Search Relevance"/>
|
||||
</placeholder>
|
||||
|
|
|
@ -135,6 +135,11 @@ static const SortCriterion sort_criteria[] = {
|
|||
"modification date",
|
||||
"Sort by Modification Date"
|
||||
},
|
||||
{
|
||||
NAUTILUS_FILE_SORT_BY_ATIME,
|
||||
"access date",
|
||||
"Sort by Access Date"
|
||||
},
|
||||
{
|
||||
NAUTILUS_FILE_SORT_BY_TRASHED_TIME,
|
||||
"trashed",
|
||||
|
@ -592,7 +597,7 @@ get_default_sort_order (NautilusFile *file, gboolean *reversed)
|
|||
}
|
||||
|
||||
retval = CLAMP (default_sort_order, NAUTILUS_FILE_SORT_BY_DISPLAY_NAME,
|
||||
NAUTILUS_FILE_SORT_BY_MTIME);
|
||||
NAUTILUS_FILE_SORT_BY_ATIME);
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
@ -1133,6 +1138,10 @@ static const GtkRadioActionEntry arrange_radio_entries[] = {
|
|||
N_("By Modification _Date"), NULL,
|
||||
N_("Keep icons sorted by modification date in rows"),
|
||||
NAUTILUS_FILE_SORT_BY_MTIME },
|
||||
{ "Sort by Access Date", NULL,
|
||||
N_("By _Access Date"), NULL,
|
||||
N_("Keep icons sorted by access date in rows"),
|
||||
NAUTILUS_FILE_SORT_BY_ATIME },
|
||||
{ NAUTILUS_ACTION_SORT_TRASH_TIME, NULL,
|
||||
N_("By T_rash Time"), NULL,
|
||||
N_("Keep icons sorted by trash time in rows"),
|
||||
|
|
Loading…
Reference in a new issue