totem-pl-parser r166 - in trunk: . plparse



Author: hadess
Date: Mon Aug 18 11:14:43 2008
New Revision: 166
URL: http://svn.gnome.org/viewvc/totem-pl-parser?rev=166&view=rev

Log:
2008-08-18  Bastien Nocera  <hadess hadess net>

	* plparse/totem-pl-parser-pls.c (totem_pl_parser_write_pls):
	Fix a crasher writing PLS files (wrong argument)
	* plparse/totem-pl-parser.c (totem_pl_parser_class_init):
	Fix parsing PLS files, missing object property



Modified:
   trunk/ChangeLog
   trunk/plparse/totem-pl-parser-pls.c
   trunk/plparse/totem-pl-parser.c

Modified: trunk/plparse/totem-pl-parser-pls.c
==============================================================================
--- trunk/plparse/totem-pl-parser-pls.c	(original)
+++ trunk/plparse/totem-pl-parser-pls.c	Mon Aug 18 11:14:43 2008
@@ -77,6 +77,7 @@
 	for (i = 1; i <= num_entries_total; i++) {
 		GtkTreeIter iter;
 		char *url, *title, *relative;
+		GFile *file;
 		gboolean custom_title;
 
 		if (gtk_tree_model_iter_nth_child (model, &iter, NULL, i - 1) == FALSE)
@@ -84,11 +85,14 @@
 
 		func (model, &iter, &url, &title, &custom_title, user_data);
 
-		if (totem_pl_parser_scheme_is_ignored (parser, url) != FALSE) {
+		file = g_file_new_for_uri (url);
+		if (totem_pl_parser_scheme_is_ignored (parser, file) != FALSE) {
 			g_free (url);
 			g_free (title);
+			g_object_unref (file);
 			continue;
 		}
+		g_object_unref (file);
 
 		relative = totem_pl_parser_relative (output, url);
 		buf = g_strdup_printf ("File%d=%s\n", i, relative ? relative : url);

Modified: trunk/plparse/totem-pl-parser.c
==============================================================================
--- trunk/plparse/totem-pl-parser.c	(original)
+++ trunk/plparse/totem-pl-parser.c	Mon Aug 18 11:14:43 2008
@@ -496,6 +496,10 @@
 				     "Object representing the GFile for an entry", G_TYPE_FILE,
 				     G_PARAM_READABLE & G_PARAM_WRITABLE);
 	g_param_spec_pool_insert (totem_pl_parser_pspec_pool, pspec, TOTEM_TYPE_PL_PARSER);
+	pspec = g_param_spec_object ("gfile-object-base", "gfile-object-base",
+				     "Object representing the GFile for base URI of an entry", G_TYPE_FILE,
+				     G_PARAM_READABLE & G_PARAM_WRITABLE);
+	g_param_spec_pool_insert (totem_pl_parser_pspec_pool, pspec, TOTEM_TYPE_PL_PARSER);
 	pspec = g_param_spec_string ("download-url", "download-url",
 				     "String representing the location of a download URL", NULL,
 				     G_PARAM_READABLE & G_PARAM_WRITABLE);



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