[gtk+] customproperty: Stop supporting the parsing of values



commit 0e2648e8c23a57c497c9c7b8245e3182332ae7e9
Author: Benjamin Otte <otte redhat com>
Date:   Sat Nov 21 00:51:22 2015 +0100

    customproperty: Stop supporting the parsing of values
    
    Now that we don't use custom CSS properties anymore, let's fail as early
    as possible.

 gtk/gtkcsscustomproperty.c |   38 ++++----------------------------------
 1 files changed, 4 insertions(+), 34 deletions(-)
---
diff --git a/gtk/gtkcsscustomproperty.c b/gtk/gtkcsscustomproperty.c
index d401759..fbaa840 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


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