styleproperty: Move pspec to GtkCssStyleProperty
shorthands don't use pspecs anymore.
This commit is contained in:
@ -126,7 +126,7 @@ gtk_theming_engine_register_property (const gchar *name_space,
|
|||||||
"name", name,
|
"name", name,
|
||||||
"value-type", pspec->value_type,
|
"value-type", pspec->value_type,
|
||||||
NULL);
|
NULL);
|
||||||
node->pspec = pspec;
|
GTK_CSS_STYLE_PROPERTY (node)->pspec = pspec;
|
||||||
node->property_parse_func = parse_func;
|
node->property_parse_func = parse_func;
|
||||||
|
|
||||||
g_value_unset (&initial);
|
g_value_unset (&initial);
|
||||||
@ -161,7 +161,7 @@ gtk_style_properties_register_property (GtkStylePropertyParser parse_func,
|
|||||||
"name", pspec->name,
|
"name", pspec->name,
|
||||||
"value-type", pspec->value_type,
|
"value-type", pspec->value_type,
|
||||||
NULL);
|
NULL);
|
||||||
node->pspec = pspec;
|
GTK_CSS_STYLE_PROPERTY (node)->pspec = pspec;
|
||||||
node->property_parse_func = parse_func;
|
node->property_parse_func = parse_func;
|
||||||
|
|
||||||
g_value_unset (&initial);
|
g_value_unset (&initial);
|
||||||
@ -196,7 +196,7 @@ gtk_style_properties_lookup_property (const gchar *property_name,
|
|||||||
if (GTK_IS_CSS_CUSTOM_PROPERTY (node))
|
if (GTK_IS_CSS_CUSTOM_PROPERTY (node))
|
||||||
{
|
{
|
||||||
if (pspec)
|
if (pspec)
|
||||||
*pspec = node->pspec;
|
*pspec = GTK_CSS_STYLE_PROPERTY (node)->pspec;
|
||||||
|
|
||||||
if (parse_func)
|
if (parse_func)
|
||||||
*parse_func = node->property_parse_func;
|
*parse_func = node->property_parse_func;
|
||||||
|
|||||||
@ -41,6 +41,7 @@ struct _GtkCssStyleProperty
|
|||||||
|
|
||||||
GValue initial_value;
|
GValue initial_value;
|
||||||
guint id;
|
guint id;
|
||||||
|
GParamSpec *pspec;
|
||||||
guint inherit :1;
|
guint inherit :1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -485,7 +485,7 @@ _gtk_style_properties_set_property_by_property (GtkStyleProperties *props,
|
|||||||
|
|
||||||
g_value_copy (value, val);
|
g_value_copy (value, val);
|
||||||
if (_gtk_style_property_get_value_type (GTK_STYLE_PROPERTY (style_prop)) == G_VALUE_TYPE (value))
|
if (_gtk_style_property_get_value_type (GTK_STYLE_PROPERTY (style_prop)) == G_VALUE_TYPE (value))
|
||||||
g_param_value_validate (GTK_STYLE_PROPERTY (style_prop)->pspec, val);
|
g_param_value_validate (style_prop->pspec, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -954,7 +954,7 @@ _gtk_style_property_register (GParamSpec *pspec,
|
|||||||
"value-type", pspec->value_type,
|
"value-type", pspec->value_type,
|
||||||
NULL);
|
NULL);
|
||||||
g_assert (node->value_type == pspec->value_type);
|
g_assert (node->value_type == pspec->value_type);
|
||||||
node->pspec = pspec;
|
GTK_CSS_STYLE_PROPERTY (node)->pspec = pspec;
|
||||||
node->property_parse_func = property_parse_func;
|
node->property_parse_func = property_parse_func;
|
||||||
node->parse_func = parse_func;
|
node->parse_func = parse_func;
|
||||||
node->print_func = print_func;
|
node->print_func = print_func;
|
||||||
|
|||||||
@ -58,8 +58,6 @@ struct _GtkStyleProperty
|
|||||||
char *name;
|
char *name;
|
||||||
GType value_type;
|
GType value_type;
|
||||||
|
|
||||||
GParamSpec *pspec;
|
|
||||||
|
|
||||||
GtkStylePropertyParser property_parse_func;
|
GtkStylePropertyParser property_parse_func;
|
||||||
GtkStyleUnpackFunc unpack_func;
|
GtkStyleUnpackFunc unpack_func;
|
||||||
GtkStylePackFunc pack_func;
|
GtkStylePackFunc pack_func;
|
||||||
|
|||||||
Reference in New Issue
Block a user