Mercurial > audlegacy
diff src/audacious/dbus.c @ 2814:77a012c3b521 trunk
[svn] - give default values to audacious_remote_* functions. if dbus call fails, default value will be returned.
- now audacious_rc_song_filename() calls str_to_utf8() to ensure that the string to return is in utf-8.
| author | yaz |
|---|---|
| date | Mon, 28 May 2007 10:28:41 -0700 |
| parents | 182aa34ae6c4 |
| children | 0e39e903b0dc 3b6d316f8b09 |
line wrap: on
line diff
--- a/src/audacious/dbus.c Mon May 28 03:25:22 2007 -0700 +++ b/src/audacious/dbus.c Mon May 28 10:28:41 2007 -0700 @@ -38,6 +38,7 @@ #include "memorypool.h" #include "titlestring.h" #include "ui_jumptotrack.h" +#include "strings.h" static DBusGConnection *dbus_conn = NULL; static guint signals[LAST_SIG] = { 0 }; @@ -469,7 +470,15 @@ gboolean audacious_rc_song_filename(RemoteObject *obj, guint pos, gchar **filename, GError **error) { - *filename = playlist_get_filename(playlist_get_active(), pos); + gchar *tmp = NULL; + tmp = playlist_get_filename(playlist_get_active(), pos); + + if(tmp){ + *filename = str_to_utf8(tmp); + } + free(tmp); + tmp = NULL; + return TRUE; }
