diff options
author | Benjamin Otte <otte@redhat.com> | 2011-05-31 12:05:43 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-06-02 02:03:52 +0200 |
commit | fd4ffbb6dab08babc8b464c679e3d91f749cee76 (patch) | |
tree | bbc5f6ba4de006d47eb6a52d5a402893ce9618fd /gtk | |
parent | abeaad6166475f2f11a8ad428170df9a3945bf32 (diff) | |
download | gtk+-fd4ffbb6dab08babc8b464c679e3d91f749cee76.tar.gz |
styleproperty: Add _gtk_style_property_is_inherit()
And use it instead of gtk_style_param_get_inherit()
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkcssprovider.c | 4 | ||||
-rw-r--r-- | gtk/gtkstyleproperty.c | 8 | ||||
-rw-r--r-- | gtk/gtkstylepropertyprivate.h | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index 32e9b87dc1..e3ca238783 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -1126,7 +1126,7 @@ gtk_css_ruleset_add (GtkCssRuleset *ruleset, return; } - ruleset->has_inherit |= gtk_style_param_get_inherit (prop->pspec); + ruleset->has_inherit |= _gtk_style_property_is_inherit (prop); g_hash_table_insert (ruleset->style, (gpointer) prop, value); } @@ -1327,7 +1327,7 @@ gtk_css_provider_get_style (GtkStyleProvider *provider, { GtkStyleProperty *prop = key; - if (l != length && !gtk_style_param_get_inherit (prop->pspec)) + if (l != length && !_gtk_style_property_is_inherit (prop)) continue; _gtk_style_properties_set_property_by_property (props, diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c index efb978596a..a6bf234563 100644 --- a/gtk/gtkstyleproperty.c +++ b/gtk/gtkstyleproperty.c @@ -1942,6 +1942,14 @@ _gtk_style_property_default_value (const GtkStyleProperty *property, } gboolean +_gtk_style_property_is_inherit (const GtkStyleProperty *property) +{ + g_return_val_if_fail (property != NULL, FALSE); + + return gtk_style_param_get_inherit (property->pspec); +} + +gboolean _gtk_style_property_is_shorthand (const GtkStyleProperty *property) { g_return_val_if_fail (property != NULL, FALSE); diff --git a/gtk/gtkstylepropertyprivate.h b/gtk/gtkstylepropertyprivate.h index 30aa62f2bb..7ee23f80f0 100644 --- a/gtk/gtkstylepropertyprivate.h +++ b/gtk/gtkstylepropertyprivate.h @@ -61,6 +61,8 @@ void _gtk_style_property_register (GParamSpec GtkStylePrintFunc print_func, GtkStyleDefaultValueFunc default_value_func); +gboolean _gtk_style_property_is_inherit (const GtkStyleProperty *property); + void _gtk_style_property_default_value (const GtkStyleProperty *property, GtkStyleProperties *properties, GValue *value); |