diff --git a/thunar/thunar-gio-extensions.c b/thunar/thunar-gio-extensions.c index a3ce0dae7..28988b622 100644 --- a/thunar/thunar-gio-extensions.c +++ b/thunar/thunar-gio-extensions.c @@ -559,7 +559,7 @@ thunar_g_app_info_launch (GAppInfo *info, gboolean result = FALSE; gchar *new_path = NULL; gchar *old_path = NULL; - gboolean update_app_info = TRUE; + gboolean skip_app_info_update; _thunar_return_val_if_fail (G_IS_APP_INFO (info), FALSE); _thunar_return_val_if_fail (working_directory == NULL || G_IS_FILE (working_directory), FALSE); @@ -567,6 +567,8 @@ thunar_g_app_info_launch (GAppInfo *info, _thunar_return_val_if_fail (G_IS_APP_LAUNCH_CONTEXT (context), FALSE); _thunar_return_val_if_fail (error == NULL || *error == NULL, FALSE); + skip_app_info_update = (g_object_get_data (G_OBJECT (info), "skip-app-info-update") != NULL); + /* check if we want to set the working directory of the spawned app */ if (working_directory != NULL) { @@ -590,11 +592,12 @@ thunar_g_app_info_launch (GAppInfo *info, { for (lp = path_list; lp != NULL; lp = lp->next) { + gboolean update_app_info = !skip_app_info_update; + file = thunar_file_get (lp->data, NULL); if (file == NULL) continue; - update_app_info = TRUE; content_type = thunar_file_get_content_type (file); /* determine default application */ diff --git a/thunar/thunar-launcher.c b/thunar/thunar-launcher.c index 6443a8bda..20789fe7c 100644 --- a/thunar/thunar-launcher.c +++ b/thunar/thunar-launcher.c @@ -1772,6 +1772,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS /* allocate a new action for the device */ action = gtk_action_new (name, device_name, tooltip, NULL); g_object_set_qdata_full (G_OBJECT (action), thunar_launcher_handler_quark, lp->data, g_object_unref); + g_object_set_data (G_OBJECT (lp->data), "skip-app-info-update", GUINT_TO_POINTER (1)); g_signal_connect (G_OBJECT (action), "activate", G_CALLBACK (thunar_launcher_action_sendto_device), launcher); gtk_action_group_add_action (launcher->action_group, action); gtk_ui_manager_add_ui (launcher->ui_manager, launcher->ui_addons_merge_id, @@ -1829,6 +1830,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS action = gtk_action_new (name, label, tooltip, NULL); gtk_action_set_gicon (action, g_app_info_get_icon (lp->data)); g_object_set_qdata_full (G_OBJECT (action), thunar_launcher_handler_quark, lp->data, g_object_unref); + g_object_set_data (G_OBJECT (lp->data), "skip-app-info-update", GUINT_TO_POINTER (1)); g_signal_connect (G_OBJECT (action), "activate", G_CALLBACK (thunar_launcher_action_open), launcher); gtk_action_group_add_action (launcher->action_group, action); gtk_ui_manager_add_ui (launcher->ui_manager, launcher->ui_addons_merge_id,