[nautilus] nautilus-files-view: Add compressed archives to Recent files



commit d95a65e2b4194278dfef226c449a1ee00c716961
Author: Manny <itsmnny pm me>
Date:   Sun Dec 26 16:46:17 2021 -0500

    nautilus-files-view: Add compressed archives to Recent files
    
    Archives created with "Compress..." are not added to the Recent files
    list. The recently created compressed archive is not found in the
    Recent list.
    
    This patch adds the newly compressed archive resource to the Recent
    files list.
    
    Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2052

 src/nautilus-files-view.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 629411e55..63b26fb58 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -2146,6 +2146,7 @@ compress_done (GFile    *new_file,
     NautilusFilesView *view;
     NautilusFilesViewPrivate *priv;
     NautilusFile *file;
+    char *uri = NULL;
 
     data = user_data;
     view = data->view;
@@ -2181,6 +2182,9 @@ compress_done (GFile    *new_file,
                              GUINT_TO_POINTER (TRUE));
     }
 
+    uri = nautilus_file_get_uri (file);
+    gtk_recent_manager_add_item (gtk_recent_manager_get_default (), uri);
+
     nautilus_file_unref (file);
 out:
     g_hash_table_destroy (data->added_locations);
@@ -2191,6 +2195,7 @@ out:
                                       (gpointer *) &data->view);
     }
 
+    g_free (uri);
     g_free (data);
 }
 


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