Index: plugins/launcher/launcher.c =================================================================== --- plugins/launcher/launcher.c (Revision 26691) +++ plugins/launcher/launcher.c (Arbeitskopie) @@ -133,21 +133,38 @@ gchar **uri_list; GSList *filenames = NULL; gchar *filename; + gboolean is_uri = TRUE; guint i; /* check whether the retrieval worked */ if (G_LIKELY (selection_data->length > 0)) { - /* split the received uri list */ - uri_list = g_uri_list_extract_uris ((gchar *) selection_data->data); + if (g_str_equal(gdk_atom_name(selection_data->target), "text/uri-list")) + { + /* split the received uri list */ + uri_list = g_uri_list_extract_uris ((gchar *) selection_data->data); + } + else + { + /* split input by \n, \r or \r\n, this might result in empty elements, we sort + * them out below */ + uri_list = g_strsplit_set ((gchar *) selection_data->data, "\n\r", 0); + is_uri = FALSE; + } if (G_LIKELY (uri_list)) { - /* walk though the list */ + /* walk through the list */ for (i = 0; uri_list[i] != NULL; i++) { + if (! uri_list[i][0]) /* skip emtpy elements */ + continue; + /* convert the uri to a filename */ - filename = g_filename_from_uri (uri_list[i], NULL, NULL); + if (is_uri) + filename = g_filename_from_uri (uri_list[i], NULL, NULL); + else + filename = g_strdup (uri_list[i]); /* prepend the filename */ if (G_LIKELY (filename)) Index: plugins/launcher/launcher.h =================================================================== --- plugins/launcher/launcher.h (Revision 26691) +++ plugins/launcher/launcher.h (Arbeitskopie) @@ -105,6 +105,9 @@ static const GtkTargetEntry drop_targets[] = { { "text/uri-list", 0, 0, }, + { "STRING", 0, 0 }, + { "UTF8_STRING", 0, 0 }, + { "text/plain", 0, 0 }, };