[gnome-control-center] Don't barf on XML comments in background files
- From: Jens Granseuer <jensg src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-control-center] Don't barf on XML comments in background files
- Date: Sun, 26 Jul 2009 12:51:36 +0000 (UTC)
commit 9985e70d35991dcdc8a0be51c38f1960650f43ab
Author: Jens Granseuer <jensgr gmx net>
Date: Sun Jul 26 14:49:14 2009 +0200
Don't barf on XML comments in background files
Don't print "Unknown tag" warnings when XML comments are encountered
in a wallpaper file (bug #588497).
capplets/appearance/gnome-wp-xml.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/capplets/appearance/gnome-wp-xml.c b/capplets/appearance/gnome-wp-xml.c
index 10b7f92..59d742b 100644
--- a/capplets/appearance/gnome-wp-xml.c
+++ b/capplets/appearance/gnome-wp-xml.c
@@ -126,7 +126,9 @@ static void gnome_wp_xml_load_xml (AppearanceData *data,
wp->deleted = gnome_wp_xml_get_bool (list, "deleted");
for (wpa = list->children; wpa != NULL; wpa = wpa->next) {
- if (!strcmp ((gchar *)wpa->name, "filename")) {
+ if (wpa->type == XML_COMMENT_NODE) {
+ continue;
+ } else if (!strcmp ((gchar *)wpa->name, "filename")) {
if (wpa->last != NULL && wpa->last->content != NULL) {
const char * none = "(none)";
gchar *content = g_strstrip ((gchar *)wpa->last->content);
@@ -182,7 +184,7 @@ static void gnome_wp_xml_load_xml (AppearanceData *data,
} else if (!strcmp ((gchar *)wpa->name, "text")) {
/* Do nothing here, libxml2 is being weird */
} else {
- g_warning ("Unknown Tag: %s\n", wpa->name);
+ g_warning ("Unknown Tag: %s", wpa->name);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]