mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 14:30:15 +00:00
shorthand: Only unset values that are set
Otherwise g_value_unset() complains. And that breaks the testsuite.
This commit is contained in:
parent
f01cef05c8
commit
50c5bf97ea
@ -84,6 +84,13 @@ _gtk_css_shorthand_property_query (GtkStyleProperty *property,
|
|||||||
shorthand->query (shorthand, value, query_func, query_data);
|
shorthand->query (shorthand, value, query_func, query_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gtk_css_shorthand_property_unset_value (gpointer value)
|
||||||
|
{
|
||||||
|
if (G_IS_VALUE (value))
|
||||||
|
g_value_unset (value);
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gtk_css_shorthand_property_parse_value (GtkStyleProperty *property,
|
gtk_css_shorthand_property_parse_value (GtkStyleProperty *property,
|
||||||
GValue *value,
|
GValue *value,
|
||||||
@ -95,7 +102,7 @@ gtk_css_shorthand_property_parse_value (GtkStyleProperty *property,
|
|||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
array = g_array_new (FALSE, TRUE, sizeof (GValue));
|
array = g_array_new (FALSE, TRUE, sizeof (GValue));
|
||||||
g_array_set_clear_func (array, (GDestroyNotify) g_value_unset);
|
g_array_set_clear_func (array, gtk_css_shorthand_property_unset_value);
|
||||||
g_array_set_size (array, shorthand->subproperties->len);
|
g_array_set_size (array, shorthand->subproperties->len);
|
||||||
|
|
||||||
if (_gtk_css_parser_try (parser, "initial", TRUE))
|
if (_gtk_css_parser_try (parser, "initial", TRUE))
|
||||||
|
Loading…
Reference in New Issue
Block a user