Commit 80789505 authored by Timothy OBrien's avatar Timothy OBrien Committed by Carlos Soriano

properties-window: Logic for displaying Modified and Accessed times

Modified times were not displaying when viewing directory properties.

Added logic to show the Accessed and Modified fields at appropriate times when either files or folders are selected.

Fixes #723
parent 6a9c7f3f
Pipeline #58236 passed with stages
in 9 minutes and 9 seconds
......@@ -2674,7 +2674,8 @@ should_show_accessed_date (NautilusPropertiesWindow *window)
* day decide that it is useful, we should separately
* consider whether it's useful for "trash:".
*/
if (file_list_all_directories (window->target_files))
if (file_list_all_directories (window->target_files)
|| is_multi_file_window (window))
{
return FALSE;
}
......@@ -2682,6 +2683,12 @@ should_show_accessed_date (NautilusPropertiesWindow *window)
return TRUE;
}
static gboolean
should_show_modified_date (NautilusPropertiesWindow *window)
{
return !is_multi_file_window (window);
}
static gboolean
should_show_trashed_on (NautilusPropertiesWindow *window)
{
......@@ -3252,14 +3259,22 @@ create_basic_page (NautilusPropertiesWindow *window)
FALSE);
}
if (should_show_accessed_date (window))
if (should_show_accessed_date (window)
|| should_show_modified_date (window))
{
append_blank_row (grid);
}
if (should_show_accessed_date (window))
{
append_title_value_pair (window, grid, _("Accessed:"),
"date_accessed_full",
INCONSISTENT_STATE_STRING,
FALSE);
}
if (should_show_modified_date (window))
{
append_title_value_pair (window, grid, _("Modified:"),
"date_modified_full",
INCONSISTENT_STATE_STRING,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment