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



Author: hadess
Date: Tue Apr 29 23:03:23 2008
New Revision: 104
URL: http://svn.gnome.org/viewvc/totem-pl-parser?rev=104&view=rev

Log:
2008-04-30  Bastien Nocera  <hadess hadess net>

	* plparse/totem-pl-parser.c (totem_pl_parser_add_url_valist):
	Remove trailing spaces from titles, to avoid new lines creeping up in
	UIs such as Rhythmbox' podcast list (Closes: #527854)



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

Modified: trunk/plparse/totem-pl-parser.c
==============================================================================
--- trunk/plparse/totem-pl-parser.c	(original)
+++ trunk/plparse/totem-pl-parser.c	Tue Apr 29 23:03:23 2008
@@ -1154,10 +1154,18 @@
 				}
 			}
 
+			/* Remove trailing spaces from titles */
+			if (strcmp (name, "title") == 0) {
+				if (fixed == NULL)
+					fixed = g_strchomp (g_strdup (string));
+				else
+					g_strchomp (fixed);
+			}
+
 			/* Add other values to the metadata hashtable */
 			g_hash_table_insert (metadata,
 					     g_strdup (name),
-					     g_strdup (fixed ? fixed : string));
+					     fixed ? fixed : g_strdup (string));
 		}
 
 		g_value_unset (&value);



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