Re: [Rhythmbox-devel] [BUILD FAILURE] In rb-playlist-source.crelated tototem_pl_parser_write_with_title ()



James Livingston wrote:
On Wed, 2006-01-11 at 22:35 +0000, Bastien Nocera wrote:
The  API of TotemPlParserIterFunc has changed this week-end to include a
gboolean telling whether the title name is "custom", meaning whether it
was deduced from the filename or gathered from a metadata tag/playlist
file.

Does anyone know what the best way to test for this is? Check for totem-plparser > 1.3.0? Try compiling a test? My auto-fu isn't good enough to know what is best.

We now [1] have TOTEM_PL_PARSER_CHECK_VERSION(major,minor,micro) that we can use for this in the future. I've added the equivalent to n-c-b too.


However, I think until we depend on 2.14 we have to wrap its use in #ifdef. For this case, maybe something like the attached?

Jon

[1] http://bugzilla.gnome.org/show_bug.cgi?id=326963
? rb-pl-fix.diff
Index: sources/rb-playlist-source.c
===================================================================
RCS file: /cvs/gnome/rhythmbox/sources/rb-playlist-source.c,v
retrieving revision 1.97
diff -p -u -r1.97 rb-playlist-source.c
--- sources/rb-playlist-source.c	13 Jan 2006 12:46:21 -0000	1.97
+++ sources/rb-playlist-source.c	14 Jan 2006 16:10:32 -0000
@@ -455,8 +455,13 @@ rb_playlist_source_drop_cb (GtkWidget *w
 	gtk_drag_finish (context, TRUE, FALSE, time);
 }
 
+#ifndef TOTEM_PL_PARSER_CHECK_VERSION
 static void
-playlist_iter_func (GtkTreeModel *model, GtkTreeIter *iter, char **uri, char **title, gpointer user_data)
+playlist_iter_func (GtkTreeModel *model,
+		    GtkTreeIter *iter,
+		    char **uri,
+		    char **title,
+		    gpointer user_data)
 {
 	RhythmDBEntry *entry;
 
@@ -465,6 +470,24 @@ playlist_iter_func (GtkTreeModel *model,
 	*uri = g_strdup (entry->location);
 	*title = g_strdup (rb_refstring_get (entry->title));
 }
+#else
+static void
+playlist_iter_func (GtkTreeModel *model,
+		    GtkTreeIter *iter,
+		    char **uri,
+		    char **title,
+		    gboolean *custom_title,
+		    gpointer user_data)
+{
+	RhythmDBEntry *entry;
+
+	gtk_tree_model_get (model, iter, 0, &entry, -1);
+
+	*uri = g_strdup (entry->location);
+	*title = g_strdup (rb_refstring_get (entry->title));
+	*custom_title = FALSE;
+}
+#endif /* TOTEM_PL_PARSER_CHECK_VERSION */
 
 void
 rb_playlist_source_save_playlist (RBPlaylistSource *source, const char *uri)


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