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
This commit is contained in:
Timothy OBrien 2019-02-09 02:26:38 +11:00 committed by Carlos Soriano
parent 6a9c7f3fd4
commit 8078950532

View file

@ -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,