[gtk+/wip/css: 39/167] styleproperty: Get rid of _gtk_style_property_is_shorthand()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/css: 39/167] styleproperty: Get rid of _gtk_style_property_is_shorthand()
- Date: Sun, 8 Jan 2012 21:26:09 +0000 (UTC)
commit 4747ba70c80eaaeb4bac803ab445af50a930b8a8
Author: Benjamin Otte <otte redhat com>
Date: Sat Dec 31 13:50:03 2011 +0100
styleproperty: Get rid of _gtk_style_property_is_shorthand()
Use GTK_IS_CSS_SHORTHAND_PROPERTY() instead now that we have it.
gtk/gtkcssprovider.c | 3 ++-
gtk/gtkstyleproperties.c | 3 ++-
gtk/gtkstyleproperty.c | 12 ++----------
gtk/gtkstylepropertyprivate.h | 1 -
4 files changed, 6 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index e3fc75a..9293a55 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -31,6 +31,7 @@
#include "gtkcssparserprivate.h"
#include "gtkcsssectionprivate.h"
#include "gtkcssselectorprivate.h"
+#include "gtkcssshorthandpropertyprivate.h"
#include "gtksymboliccolor.h"
#include "gtkstyleprovider.h"
#include "gtkstylecontextprivate.h"
@@ -1189,7 +1190,7 @@ gtk_css_ruleset_add (GtkCssRuleset *ruleset,
ruleset->set_styles = _gtk_bitmask_new ();
}
- if (_gtk_style_property_is_shorthand (prop))
+ if (GTK_IS_CSS_SHORTHAND_PROPERTY (prop))
{
GParameter *parameters;
guint i, n_parameters;
diff --git a/gtk/gtkstyleproperties.c b/gtk/gtkstyleproperties.c
index 48dc88b..fc47984 100644
--- a/gtk/gtkstyleproperties.c
+++ b/gtk/gtkstyleproperties.c
@@ -31,6 +31,7 @@
#include "gtkanimationdescription.h"
#include "gtkgradient.h"
#include "gtkshadowprivate.h"
+#include "gtkcssshorthandpropertyprivate.h"
#include "gtkcsstypesprivate.h"
#include "gtkborderimageprivate.h"
@@ -559,7 +560,7 @@ _gtk_style_properties_set_property_by_property (GtkStyleProperties *props,
else
g_return_if_fail (style_prop->pspec->value_type == value_type);
- if (_gtk_style_property_is_shorthand (style_prop))
+ if (GTK_IS_CSS_SHORTHAND_PROPERTY (style_prop))
{
GParameter *parameters;
guint i, n_parameters;
diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c
index 7364e99..a2073be 100644
--- a/gtk/gtkstyleproperty.c
+++ b/gtk/gtkstyleproperty.c
@@ -2675,14 +2675,6 @@ _gtk_style_property_get_initial_value (const GtkStyleProperty *property)
return &property->initial_value;
}
-gboolean
-_gtk_style_property_is_shorthand (const GtkStyleProperty *property)
-{
- g_return_val_if_fail (property != NULL, FALSE);
-
- return property->pack_func != NULL;
-}
-
GParameter *
_gtk_style_property_unpack (const GtkStyleProperty *property,
const GValue *value,
@@ -2730,7 +2722,7 @@ _gtk_style_property_query (const GtkStyleProperty *property,
if (val)
_gtk_style_property_resolve (property, props, state, context, (GValue *) val, value);
- else if (_gtk_style_property_is_shorthand (property))
+ else if (GTK_IS_CSS_SHORTHAND_PROPERTY (property))
_gtk_style_property_pack (property, props, state, context, value);
else
_gtk_style_property_default_value (property, props, state, value);
@@ -3268,7 +3260,7 @@ _gtk_style_property_register (GParamSpec *pspec,
node->print_func = print_func;
node->unset_func = unset_func;
- if (!_gtk_style_property_is_shorthand (node))
+ if (!GTK_IS_CSS_SHORTHAND_PROPERTY (node))
{
_gtk_style_property_generate_id (node);
diff --git a/gtk/gtkstylepropertyprivate.h b/gtk/gtkstylepropertyprivate.h
index 263cc9f..d3768dc 100644
--- a/gtk/gtkstylepropertyprivate.h
+++ b/gtk/gtkstylepropertyprivate.h
@@ -98,7 +98,6 @@ guint _gtk_style_property_get_id (const GtkStyleProper
const GValue * _gtk_style_property_get_initial_value
(const GtkStyleProperty *property);
-gboolean _gtk_style_property_is_shorthand (const GtkStyleProperty *property);
GParameter * _gtk_style_property_unpack (const GtkStyleProperty *property,
const GValue *value,
guint *n_params);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]