]> Pileus Git - ~andy/gtk/commitdiff
silently skip unknown attributes instead of bailing out with an error in
authorMichael Natterer <mitch@imendio.com>
Fri, 13 Jun 2008 10:44:34 +0000 (10:44 +0000)
committerMichael Natterer <mitch@src.gnome.org>
Fri, 13 Jun 2008 10:44:34 +0000 (10:44 +0000)
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

ChangeLog
gtk/gtkuimanager.c

index c35c546c70c391c545816fb73b162636c33360a9..5361f031a6e8a4a91cd2f8d5d73a37b4731a2ff6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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.
+
 2008-05-23  Hans Breuer  <hans@breuer.org>
 
        * gtk/gtkprintoperation.c : check surface status after ceating a pdf.
index 1db9e9bfe719910c3697628f8f9fd8124d50fc26..8ba5f1617a8a528d9cedf929c4f1cddc1172666f 100644 (file)
@@ -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