[Nautilus-list] [PATCH] make the music-view show song info as it should - this time it works (tm)



Hope i get it right this time...

regards,
Diego
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.5121
diff -u -r1.5121 ChangeLog
--- ChangeLog	10 Mar 2002 05:23:57 -0000	1.5121
+++ ChangeLog	10 Mar 2002 17:06:28 -0000
@@ -1,3 +1,8 @@
+2002-03-10  Diego González  <dggonz yahoo com>
+
+	* components/music/nautilus-music-vew.c (read_id_tag): convert
+	title, comments, artist and album to UTF-8
+
 2002-03-10  Alexander Larsson  <alla lysator liu se>
 
 	* src/nautilus-property-browser.c (element_clicked_callback):
Index: components/music/nautilus-music-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/components/music/nautilus-music-view.c,v
retrieving revision 1.166
diff -u -r1.166 nautilus-music-view.c
--- components/music/nautilus-music-view.c	7 Mar 2002 19:35:45 -0000	1.166
+++ components/music/nautilus-music-view.c	10 Mar 2002 17:06:30 -0000
@@ -886,11 +886,19 @@
 	}
 	
 	/* Copy data from tag into our info struct */
-	song_info->title = g_strdup (tag.title);
-	song_info->artist = g_strdup (tag.artist);
-	song_info->album = g_strdup (tag.album); 
-        song_info->year = filter_out_unset_year (tag.year);
-	song_info->comment = g_strdup (tag.comment);
+	if (tag.title != NULL) {
+		song_info->title = g_locale_to_utf8 (tag.title, -1, NULL, NULL, NULL);
+	}
+	if (tag.artist != NULL) {
+		song_info->artist = g_locale_to_utf8 (tag.artist, -1, NULL, NULL, NULL);
+	}
+	if (tag.album != NULL) {
+		song_info->album = g_locale_to_utf8 (tag.album, -1, NULL, NULL, NULL); 
+	}
+	if (tag.comment != NULL) {
+		song_info->comment = g_locale_to_utf8 (tag.comment, -1, NULL, NULL, NULL);
+	}
+	song_info->year = filter_out_unset_year (tag.year);
 	song_info->track_number = atoi (tag.track);
 
 	/* Clean up */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]