Allow empty property nodes so we can set empty strings. (#486420, Xavier

2007-10-24  Johan Dahlin  <jdahlin@async.com.br>

	* gtk/gtkbuilderparser.c (end_element): Allow empty property nodes
	so we can set empty strings. (#486420, Xavier Claessens)


svn path=/trunk/; revision=18943
This commit is contained in:
Johan Dahlin
2007-10-24 09:46:31 +00:00
committed by Johan Dahlin
parent 9e3c937175
commit 1d332bbb44
3 changed files with 45 additions and 34 deletions

View File

@ -139,24 +139,6 @@ error_invalid_tag (ParserData *data,
line_number, char_number, tag);
}
static void
error_missing_property_value (ParserData *data,
GError **error)
{
gint line_number, char_number;
g_markup_parse_context_get_position (data->ctx,
&line_number,
&char_number);
g_set_error (error,
GTK_BUILDER_ERROR,
GTK_BUILDER_ERROR_MISSING_PROPERTY_VALUE,
"%s:%d:%d <property> must have a value set",
data->filename,
line_number, char_number);
}
gboolean
_gtk_builder_boolean_from_string (const gchar *string,
gboolean *value,
@ -799,15 +781,6 @@ end_element (GMarkupParseContext *context,
PropertyInfo *prop_info = state_pop_info (data, PropertyInfo);
CommonInfo *info = state_peek_info (data, CommonInfo);
if (!prop_info->data)
{
error_missing_property_value (data, error);
free_property_info (prop_info);
if (strcmp (info->tag.name, "object") == 0)
free_object_info((ObjectInfo*)info);
return;
}
/* Normal properties */
if (strcmp (info->tag.name, "object") == 0)
{