changeset 3829:710a31107239

Automated merge with ssh://hg.atheme.org//hg/audacious
author William Pitcock <nenolod@atheme.org>
date Sun, 21 Oct 2007 07:07:09 -0500
parents d31089ffe40a (diff) 53c5ec0aed0d (current diff)
children 10053e99d90f
files
diffstat 2 files changed, 13 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/dbus.c	Sat Oct 20 13:20:23 2007 +0200
+++ b/src/audacious/dbus.c	Sun Oct 21 07:07:09 2007 -0500
@@ -180,9 +180,13 @@
     TupleValueType type;
     type = tuple_get_value_type(tuple, -1, key);
     if (type == TUPLE_STRING) {
+        gchar *result = str_to_utf8(tuple_get_string(tuple, -1, key));
+
         val = g_new0(GValue, 1);
         g_value_init(val, G_TYPE_STRING);
-        g_value_set_string(val, tuple_get_string(tuple, -1, key));
+        g_value_set_string(val, result);
+
+        g_free(result);
         return val;
     } else if (type == TUPLE_INT) {
         val = g_new0(GValue, 1);
@@ -379,7 +383,7 @@
 }
 
 gboolean mpris_emit_track_change(MprisPlayer *obj) {
-	GHashTable *metadata;
+    GHashTable *metadata;
     Tuple *tuple = NULL;
     GValue *value;
     Playlist *active;
@@ -391,13 +395,13 @@
     metadata = mpris_metadata_from_tuple(tuple);
 
     if (metadata != NULL) {
-		// Song URI
-		value = g_new0(GValue, 1);
-		g_value_init(value, G_TYPE_STRING);
-		g_value_set_string(value, playlist_get_filename(active, pos));
+	// Song URI
+	value = g_new0(GValue, 1);
+	g_value_init(value, G_TYPE_STRING);
+	g_value_set_string(value, playlist_get_filename(active, pos));
 
-		g_hash_table_insert(metadata, "URI", value);
-	}
+	g_hash_table_insert(metadata, "URI", value);
+    }
 
     g_signal_emit(obj, signals[TRACK_CHANGE_SIG], 0, metadata);
     return TRUE;
--- a/src/audacious/tuple.c	Sat Oct 20 13:20:23 2007 +0200
+++ b/src/audacious/tuple.c	Sun Oct 21 07:07:09 2007 -0500
@@ -253,7 +253,7 @@
     if (string == NULL)
         value->value.string = NULL;
     else
-        value->value.string = g_strdup(string);
+        value->value.string = str_to_utf8(string);
 
     TUPLE_UNLOCK_WRITE();
     return TRUE;