gtk+ r20371 - in trunk: . gtk



Author: mitch
Date: Fri Jun 13 10:44:34 2008
New Revision: 20371
URL: http://svn.gnome.org/viewvc/gtk+?rev=20371&view=rev

Log:
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.



Modified:
   trunk/ChangeLog
   trunk/gtk/gtkuimanager.c

Modified: trunk/gtk/gtkuimanager.c
==============================================================================
--- trunk/gtk/gtkuimanager.c	(original)
+++ trunk/gtk/gtkuimanager.c	Fri Jun 13 10:44:34 2008
@@ -1235,20 +1235,9 @@
 	{
 	  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



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