[nautilus/sandboxed-recent: 4/4] mime-actions: Add activated files to recent
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/sandboxed-recent: 4/4] mime-actions: Add activated files to recent
- Date: Thu, 14 Jun 2018 13:23:08 +0000 (UTC)
commit 000c33009074dd0c6f89e6176361882b38b1d742
Author: Carlos Soriano <csoriano redhat com>
Date: Tue Jun 12 18:26:02 2018 +0200
mime-actions: Add activated files to recent
Until now we left applications to add the files to recent if they did
modify them. This usually works, specially for gtk applications, but it
doesn't work for applications using other toolkits.
Recently, as we move towards a more containerized Nautilus with Flatpak
the recent files set by other apps are not accessible, so we need to
add them ourselves when opening in Nautilus.
This work adds every file activated by other app from Nautilus be added
as recent.
src/nautilus-mime-actions.c | 1 +
src/nautilus-program-choosing.c | 10 +---------
2 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
index 1d00fa1a9..fdb8d9480 100644
--- a/src/nautilus-mime-actions.c
+++ b/src/nautilus-mime-actions.c
@@ -1700,6 +1700,7 @@ activate_files (ActivateParameters *parameters)
params = application_launch_parameters_new (parameters,
g_queue_copy (open_in_app_uris));
+ gtk_recent_manager_add_item (gtk_recent_manager_get_default (), uri);
nautilus_launch_default_for_uri_async (uri,
parameters->parent_window,
parameters->cancellable,
diff --git a/src/nautilus-program-choosing.c b/src/nautilus-program-choosing.c
index 84d9e6abd..7ce31ffe4 100644
--- a/src/nautilus-program-choosing.c
+++ b/src/nautilus-program-choosing.c
@@ -63,15 +63,7 @@ add_file_to_recent (NautilusFile *file,
recent_data.mime_type = nautilus_file_get_mime_type (file);
recent_data.app_name = g_strdup (g_get_application_name ());
-
- if (application != NULL)
- {
- recent_data.app_exec = g_strdup (g_app_info_get_commandline (application));
- }
- else
- {
- recent_data.app_exec = g_strdup ("gio open");
- }
+ recent_data.app_exec = g_strdup (g_app_info_get_commandline (application));
recent_data.groups = NULL;
recent_data.is_private = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]