[nautilus] properties-window: Logic for displaying Modified and Accessed times



commit 8078950532922c78f35cb7140be0567c0f413d3c
Author: Timothy OBrien <obrien timothy a gmail com>
Date:   Sat Feb 9 02:26:38 2019 +1100

    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

 src/nautilus-properties-window.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 2fb932f44..464a131ca 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -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,


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