# HG changeset patch # User William Pitcock # Date 1183509586 18000 # Node ID b93bd39923bf33e7c542d1ffc45f423e782dfef0 # Parent 8463de0cf728916d44dc85628369d7164a03f9ce Rework DnD received data function to use g_filename_from_uri(). diff -r 8463de0cf728 -r b93bd39923bf src/audacious/ui_main.c --- a/src/audacious/ui_main.c Tue Jul 03 07:18:43 2007 -0500 +++ b/src/audacious/ui_main.c Tue Jul 03 19:39:46 2007 -0500 @@ -1426,7 +1426,7 @@ * Remove all of this flaky iter/sourcelist/strsplit stuff. * All we care about is the filepath. * - * We can figure this out and easily pass it to xmms_urldecode_plain(). + * We can figure this out and easily pass it to g_filename_from_uri(). * - nenolod */ void @@ -1446,8 +1446,11 @@ if (str_has_prefix_nocase((gchar *) selection_data->data, "fonts:///")) { - gchar *path = (gchar *) selection_data->data + 9; /* skip fonts:/// */ - gchar *decoded = xmms_urldecode_plain(path); + gchar *path = (gchar *) selection_data->data; + gchar *decoded = g_filename_from_uri(path, NULL, NULL); + + if (decoded == NULL) + return; cfg.playlist_font = g_strconcat(decoded, strrchr(cfg.playlist_font, ' '), NULL); playlist_list_set_font(cfg.playlist_font);