[gtk+/wip/css: 65/143] css: Use _gtk_style_property_get_value_type() where appropriate
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/css: 65/143] css: Use _gtk_style_property_get_value_type() where appropriate
- Date: Fri, 6 Jan 2012 14:51:39 +0000 (UTC)
commit 5e2e31e6a4ba2a08cd06f7488c5dd13a6402a9e7
Author: Benjamin Otte <otte redhat com>
Date: Mon Jan 2 00:23:53 2012 +0100
css: Use _gtk_style_property_get_value_type() where appropriate
gtk/gtkcssprovider.c | 2 +-
gtk/gtkcssstyleproperty.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index e15861e..0de6c8c 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -2356,7 +2356,7 @@ parse_declaration (GtkCssScanner *scanner,
gtk_css_scanner_push_section (scanner, GTK_CSS_SECTION_VALUE);
val = property_value_new (scanner->section);
- g_value_init (&val->value, property->pspec->value_type);
+ g_value_init (&val->value, _gtk_style_property_get_value_type (property));
if (_gtk_style_property_parse_value (property,
&val->value,
diff --git a/gtk/gtkcssstyleproperty.c b/gtk/gtkcssstyleproperty.c
index f4fd07e..d262a59 100644
--- a/gtk/gtkcssstyleproperty.c
+++ b/gtk/gtkcssstyleproperty.c
@@ -244,7 +244,7 @@ _gtk_style_property_resolve (GtkStyleProperty *property,
switch (special)
{
case GTK_CSS_CURRENT_COLOR:
- g_assert (property->pspec->value_type == GDK_TYPE_RGBA);
+ g_assert (_gtk_style_property_get_value_type (property) == GDK_TYPE_RGBA);
gtk_style_properties_get_property (props, "color", state, val);
break;
case GTK_CSS_INHERIT:
@@ -255,19 +255,19 @@ _gtk_style_property_resolve (GtkStyleProperty *property,
}
else if (G_VALUE_TYPE (val) == GTK_TYPE_SYMBOLIC_COLOR)
{
- if (property->pspec->value_type == GDK_TYPE_RGBA)
+ if (_gtk_style_property_get_value_type (property) == GDK_TYPE_RGBA)
{
if (resolve_color (props, val))
goto out;
}
- else if (property->pspec->value_type == GDK_TYPE_COLOR)
+ else if (_gtk_style_property_get_value_type (property) == GDK_TYPE_COLOR)
{
if (resolve_color_rgb (props, val))
goto out;
}
g_value_unset (val);
- g_value_init (val, property->pspec->value_type);
+ g_value_init (val, _gtk_style_property_get_value_type (property));
_gtk_style_property_default_value (property, props, state, val);
}
else if (G_VALUE_TYPE (val) == GDK_TYPE_RGBA)
@@ -277,7 +277,7 @@ _gtk_style_property_resolve (GtkStyleProperty *property,
}
else if (G_VALUE_TYPE (val) == GTK_TYPE_GRADIENT)
{
- g_return_if_fail (property->pspec->value_type == CAIRO_GOBJECT_TYPE_PATTERN);
+ g_return_if_fail (_gtk_style_property_get_value_type (property) == CAIRO_GOBJECT_TYPE_PATTERN);
if (!resolve_gradient (props, val))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]