summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2015-11-21 00:51:22 +0100
committerBenjamin Otte <otte@redhat.com>2015-11-21 00:53:47 +0100
commit0e2648e8c23a57c497c9c7b8245e3182332ae7e9 (patch)
tree3bc533bca46c88539015c98687b0b2f85a882fed
parentad49103b93a5182529966c0cf4ec21088bace781 (diff)
downloadgtk+-0e2648e8c23a57c497c9c7b8245e3182332ae7e9.tar.gz
customproperty: Stop supporting the parsing of values
Now that we don't use custom CSS properties anymore, let's fail as early as possible.
-rw-r--r--gtk/gtkcsscustomproperty.c38
1 files changed, 4 insertions, 34 deletions
diff --git a/gtk/gtkcsscustomproperty.c b/gtk/gtkcsscustomproperty.c
index d401759a61..fbaa8400bc 100644
--- a/gtk/gtkcsscustomproperty.c
+++ b/gtk/gtkcsscustomproperty.c
@@ -51,40 +51,10 @@ static GtkCssValue *
gtk_css_custom_property_parse_value (GtkStyleProperty *property,
GtkCssParser *parser)
{
- GtkCssCustomProperty *custom = GTK_CSS_CUSTOM_PROPERTY (property);
- GValue value = G_VALUE_INIT;
- gboolean success;
-
- if (custom->property_parse_func)
- {
- GError *error = NULL;
- char *value_str;
-
- g_value_init (&value, _gtk_style_property_get_value_type (property));
-
- value_str = _gtk_css_parser_read_value (parser);
- if (value_str != NULL)
- {
- success = (* custom->property_parse_func) (value_str, &value, &error);
- g_free (value_str);
- }
- else
- success = FALSE;
- }
- else
- {
- g_value_init (&value, gtk_css_custom_property_get_specified_type (custom->pspec));
-
- success = _gtk_css_style_funcs_parse_value (&value, parser);
- }
-
- if (!success)
- {
- g_value_unset (&value);
- return NULL;
- }
-
- return _gtk_css_typed_value_new_take (&value);
+ _gtk_css_parser_error_full (parser,
+ GTK_CSS_PROVIDER_ERROR_NAME,
+ "Custom CSS properties are no longer supported.");
+ return NULL;
}
static void