Commit 75a5f043 authored by Benjamin Otte's avatar Benjamin Otte

styleproperty: Remove default parse function

... and assert every style property brings its own.
parent a5d001b2
......@@ -274,20 +274,8 @@ gtk_css_style_property_real_parse_value (GtkCssStyleProperty *property,
GtkCssParser *parser,
GFile *base)
{
GValue value = G_VALUE_INIT;
GtkCssValue *result;
g_value_init (&value, _gtk_css_style_property_get_specified_type (property));
if (!_gtk_css_style_parse_value (&value, parser, base))
{
g_value_unset (&value);
return NULL;
}
result = _gtk_css_value_new_from_gvalue (&value);
g_value_unset (&value);
return result;
g_assert_not_reached ();
return NULL;
}
static void
......
......@@ -65,6 +65,7 @@ gtk_css_style_property_register (const char * name,
GtkCssStyleProperty *node;
g_assert (initial_value != NULL);
g_assert (parse_value != NULL);
node = g_object_new (GTK_TYPE_CSS_STYLE_PROPERTY,
"value-type", value_type,
......@@ -74,8 +75,7 @@ gtk_css_style_property_register (const char * name,
"name", name,
NULL);
if (parse_value)
node->parse_value = parse_value;
node->parse_value = parse_value;
if (print_value)
node->print_value = print_value;
if (compute_value)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment