diff options
author | Benjamin Otte <otte@redhat.com> | 2012-01-02 10:41:41 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-01-09 18:37:55 +0100 |
commit | 3375dd2a5f94a9671033a0ec51ccbd556418693f (patch) | |
tree | 040f4dbc1d5a5fc08bf8ec9307bdfd7273393805 /gtk/gtkcsscustomproperty.c | |
parent | 61042d155cca8adb56d527e9f1a1f48d1b7a8834 (diff) | |
download | gtk+-3375dd2a5f94a9671033a0ec51ccbd556418693f.tar.gz |
styleproperty: Move property_parse_func member
It belongs in GtkCssCustomProperty
Diffstat (limited to 'gtk/gtkcsscustomproperty.c')
-rw-r--r-- | gtk/gtkcsscustomproperty.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gtk/gtkcsscustomproperty.c b/gtk/gtkcsscustomproperty.c index bb9aa415ac..9d4c61f47c 100644 --- a/gtk/gtkcsscustomproperty.c +++ b/gtk/gtkcsscustomproperty.c @@ -35,11 +35,12 @@ gtk_css_custom_property_parse_value (GtkStyleProperty *property, GtkCssParser *parser, GFile *base) { + GtkCssCustomProperty *custom = GTK_CSS_CUSTOM_PROPERTY (property); gboolean success; g_value_init (value, _gtk_style_property_get_value_type (property)); - if (property->property_parse_func) + if (custom->property_parse_func) { GError *error = NULL; char *value_str; @@ -47,7 +48,7 @@ gtk_css_custom_property_parse_value (GtkStyleProperty *property, value_str = _gtk_css_parser_read_value (parser); if (value_str != NULL) { - success = (*property->property_parse_func) (value_str, value, &error); + success = (* custom->property_parse_func) (value_str, value, &error); g_free (value_str); } else @@ -147,7 +148,7 @@ gtk_theming_engine_register_property (const gchar *name_space, GtkStylePropertyParser parse_func, GParamSpec *pspec) { - GtkStyleProperty *node; + GtkCssCustomProperty *node; GValue initial = { 0, }; gchar *name; @@ -186,7 +187,7 @@ void gtk_style_properties_register_property (GtkStylePropertyParser parse_func, GParamSpec *pspec) { - GtkStyleProperty *node; + GtkCssCustomProperty *node; GValue initial = { 0, }; g_return_if_fail (G_IS_PARAM_SPEC (pspec)); @@ -232,11 +233,13 @@ gtk_style_properties_lookup_property (const gchar *property_name, if (GTK_IS_CSS_CUSTOM_PROPERTY (node)) { + GtkCssCustomProperty *custom = GTK_CSS_CUSTOM_PROPERTY (node); + if (pspec) *pspec = GTK_CSS_STYLE_PROPERTY (node)->pspec; if (parse_func) - *parse_func = node->property_parse_func; + *parse_func = custom->property_parse_func; found = TRUE; } |