Mercurial > audlegacy-plugins
changeset 1256:84b837791e36
branch merge
author | Ralf Ertzinger <ralf@skytale.net> |
---|---|
date | Fri, 13 Jul 2007 13:13:00 +0200 |
parents | 37598c8f4425 (current diff) 5cdda0e144ab (diff) |
children | 574ee15195f3 |
files | |
diffstat | 3 files changed, 20 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/m3u/m3u.c Thu Jul 12 22:34:44 2007 +0200 +++ b/src/m3u/m3u.c Fri Jul 13 13:13:00 2007 +0200 @@ -85,10 +85,16 @@ gint ext_len = -1; gboolean is_extm3u = FALSE; Playlist *playlist = playlist_get_active(); + gchar *uri; + + uri = g_filename_to_uri(filename, NULL, NULL); - if ((file = vfs_fopen(filename, "rb")) == NULL) + if ((file = vfs_fopen(uri ? uri : filename, "rb")) == NULL) return; + if (uri) + g_free(uri); + line = g_malloc(line_len); while (vfs_fgets(line, line_len, file)) { while (strlen(line) == line_len - 1 && line[strlen(line) - 1] != '\n') { @@ -126,7 +132,11 @@ ext_info = NULL; } - playlist_load_ins_file(playlist, line, filename, pos, ext_title, ext_len); + uri = g_filename_to_uri(line, NULL, NULL); + playlist_load_ins_file(playlist, uri ? uri : line, filename, pos, ext_title, ext_len); + + if (uri) + g_free(uri); str_replace_in(&ext_title, NULL); ext_len = -1; @@ -146,6 +156,7 @@ gchar *outstr = NULL; VFSFile *file; Playlist *playlist = playlist_get_active(); + gchar *fn; g_return_if_fail(filename != NULL); g_return_if_fail(playlist != NULL); @@ -180,7 +191,11 @@ } } - vfs_fprintf(file, "%s\n", entry->filename); + fn = g_filename_from_uri(entry->filename, NULL, NULL); + vfs_fprintf(file, "%s\n", fn ? fn : entry->filename); + + if (fn) + g_free(fn); } PLAYLIST_UNLOCK(playlist->mutex);
--- a/src/paranormal/paranormal.c Thu Jul 12 22:34:44 2007 +0200 +++ b/src/paranormal/paranormal.c Fri Jul 13 13:13:00 2007 +0200 @@ -13,7 +13,6 @@ #include <gtk/gtk.h> #include <gdk/gdk.h> -#include <gdk/gdkx.h> #include "paranormal.h" #include "actuators.h"
--- a/src/timidity/libtimidity/common.c Thu Jul 12 22:34:44 2007 +0200 +++ b/src/timidity/libtimidity/common.c Fri Jul 13 13:13:00 2007 +0200 @@ -54,7 +54,7 @@ /* First try the given name */ DEBUG_MSG("Trying to open %s\n", name); - if ((fp = vfs_fopen(name, OPEN_MODE))) + if ((fp = vfs_fopen(g_filename_to_uri(name, NULL, NULL), OPEN_MODE))) return fp; if (name[0] != PATH_SEP) @@ -78,7 +78,7 @@ } strcat(current_filename, name); DEBUG_MSG("Trying to open %s\n", current_filename); - if ((fp = vfs_fopen(current_filename, OPEN_MODE))) + if ((fp = vfs_fopen(g_filename_to_uri(current_filename, NULL, NULL), OPEN_MODE))) return fp; plp = plp->next; }