summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMichael Natterer <mitch@imendio.com>2008-06-13 10:44:34 +0000
committerMichael Natterer <mitch@src.gnome.org>2008-06-13 10:44:34 +0000
commita40901c1155969297ee643acc2f8960c38ebfe6d (patch)
tree0a00c05362b9b7c994f8ad7efeb321c822ec77e2 /gtk
parent8677ed959d6c91f278151133106dc192a0662d54 (diff)
downloadgtk+-a40901c1155969297ee643acc2f8960c38ebfe6d.tar.gz
silently skip unknown attributes instead of bailing out with an error in
2008-06-13 Michael Natterer <mitch@imendio.com> * gtk/gtkuimanager.c (start_element_handler): silently skip unknown attributes instead of bailing out with an error in order to be compatible with possible future attribute names. This is related to the discussion in bug #516425 but actually needed for any kind of XML format extension. svn path=/trunk/; revision=20371
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkuimanager.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c
index 1db9e9bfe7..8ba5f1617a 100644
--- a/gtk/gtkuimanager.c
+++ b/gtk/gtkuimanager.c
@@ -1235,20 +1235,9 @@ start_element_handler (GMarkupParseContext *context,
{
expand = !strcmp (attribute_values[i], "true");
}
- else
- {
- gint line_number, char_number;
-
- g_markup_parse_context_get_position (context,
- &line_number, &char_number);
- g_set_error (error,
- G_MARKUP_ERROR,
- G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE,
- _("Unknown attribute '%s' on line %d char %d"),
- attribute_names[i],
- line_number, char_number);
- return;
- }
+ /* else silently skip unknown attributes to be compatible with
+ * future additional attributes.
+ */
}
/* Work out a name for this node. Either the name attribute, or