From f51b36699477a01b2f6adaeb15f4f16a0fdf91be Mon Sep 17 00:00:00 2001 From: Alexander Schwinn Date: Tue, 9 Feb 2021 11:18:23 +0100 Subject: [PATCH] Regression: Skip app info updates on sendto actions (Issue #502) Was already fixed by 9c87733c03079fdf7b6de5cb5ded4ae10f22f0dd. That fix was rendered unusable by massive code-changes later on. Fixes #502 --- thunar/thunar-launcher.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/thunar/thunar-launcher.c b/thunar/thunar-launcher.c index 56deafba4..ab342defe 100644 --- a/thunar/thunar-launcher.c +++ b/thunar/thunar-launcher.c @@ -748,6 +748,10 @@ thunar_launcher_open_files (ThunarLauncher *launcher, if (application_to_use) { app_info = g_app_info_dup (application_to_use); + + /* Foreign data needs to be set explicitly to the new app_info */ + if (g_object_get_data (G_OBJECT (application_to_use), "skip-app-info-update") != NULL) + g_object_set_data (G_OBJECT (app_info), "skip-app-info-update", GUINT_TO_POINTER (1)); } else { @@ -1857,6 +1861,7 @@ thunar_launcher_build_sendto_submenu (ThunarLauncher *launcher) item = xfce_gtk_image_menu_item_new (label_text, tooltip_text, NULL, G_CALLBACK (thunar_launcher_menu_item_activated), G_OBJECT (launcher), image, GTK_MENU_SHELL (submenu)); g_object_set_qdata_full (G_OBJECT (item), thunar_launcher_appinfo_quark, g_object_ref (lp->data), g_object_unref); + g_object_set_data (G_OBJECT (lp->data), "skip-app-info-update", GUINT_TO_POINTER (1)); /* cleanup */ g_free (label_text);