diff --git a/NEWS b/NEWS index f840b87b7aa7aace0b3ff4bccb1a7ff44cc17202..328b18ad5c21105b371d31e94038c040141feec2 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,7 @@ Patch by Eric Koegel. - Respect ThunarIconFactory::show-thumbnails. Fixes a regression. - Fix crash when removing an ancestor of the current folder (bug #8168). +- Fix handling %U when launching multiple files with an app (bug #7456). 1.3.0 ===== diff --git a/thunar/thunar-launcher.c b/thunar/thunar-launcher.c index 6d31dee1cf8a497151cf1c39a93c9ab6b0c57ff0..f525f898fd13912fbe9d1d0732b5c2541fd08532 100644 --- a/thunar/thunar-launcher.c +++ b/thunar/thunar-launcher.c @@ -546,17 +546,28 @@ thunar_launcher_execute_files (ThunarLauncher *launcher, +static guint +thunar_launcher_g_app_info_hash (gconstpointer app_info) +{ + return 0; +} + + + static void thunar_launcher_open_files (ThunarLauncher *launcher, GList *files) { - GAppInfo *app_info; GHashTable *applications; + GAppInfo *app_info; GList *file_list; GList *lp; - /* allocate a hash table to associate applications to URIs */ - applications = g_hash_table_new_full (g_direct_hash, + /* allocate a hash table to associate applications to URIs. since GIO allocates + * new GAppInfo objects every time, g_direct_hash does not work. we therefor use + * a fake hash function to always hit the collision list of the hash table and + * avoid storing multiple equal GAppInfos by means of g_app_info_equal(). */ + applications = g_hash_table_new_full (thunar_launcher_g_app_info_hash, (GEqualFunc) g_app_info_equal, (GDestroyNotify) g_object_unref, (GDestroyNotify) thunar_g_file_list_free);