diff options
author | Benjamin Otte <otte@redhat.com> | 2012-11-25 03:34:08 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-11-25 03:43:28 +0100 |
commit | fb643c1c1255a867ec37d5e6d087782295cbba69 (patch) | |
tree | 066fd2949ea0b69ecf58ebb296023b41fe49eba8 /gtk/gtkstyleproperties.c | |
parent | df25349d63392718e720f57a0cfdd4974eec2d0d (diff) | |
download | gtk+-fb643c1c1255a867ec37d5e6d087782295cbba69.tar.gz |
symboliccolor: Deprecate
Symbolic colors are an implementation detail of the CSS engine and have
been superceded by GtkCssColorValue. We don't want them clobbering the
public API. In particular because the only use I could find in the
public API is people using it to shade colors.
Diffstat (limited to 'gtk/gtkstyleproperties.c')
-rw-r--r-- | gtk/gtkstyleproperties.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/gtk/gtkstyleproperties.c b/gtk/gtkstyleproperties.c index e86672ae43..e98cd44c44 100644 --- a/gtk/gtkstyleproperties.c +++ b/gtk/gtkstyleproperties.c @@ -289,7 +289,17 @@ static GtkCssValue * gtk_style_properties_provider_get_color (GtkStyleProviderPrivate *provider, const char *name) { - return _gtk_symbolic_color_get_css_value (gtk_style_properties_lookup_color (GTK_STYLE_PROPERTIES (provider), name)); + GtkSymbolicColor *symbolic; + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + + symbolic = gtk_style_properties_lookup_color (GTK_STYLE_PROPERTIES (provider), name); + if (symbolic == NULL) + return NULL; + + return _gtk_symbolic_color_get_css_value (symbolic); + + G_GNUC_END_IGNORE_DEPRECATIONS; } static void @@ -368,6 +378,8 @@ gtk_style_properties_new (void) * gtk_style_properties_lookup_color() * * Since: 3.0 + * + * Deprecated: 3.8: #GtkSymbolicColor is deprecated. **/ void gtk_style_properties_map_color (GtkStyleProperties *props, @@ -382,6 +394,8 @@ gtk_style_properties_map_color (GtkStyleProperties *props, priv = props->priv; + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; + if (G_UNLIKELY (!priv->color_map)) priv->color_map = g_hash_table_new_full (g_str_hash, g_str_equal, @@ -392,6 +406,8 @@ gtk_style_properties_map_color (GtkStyleProperties *props, g_strdup (name), gtk_symbolic_color_ref (color)); + G_GNUC_END_IGNORE_DEPRECATIONS; + _gtk_style_provider_private_changed (GTK_STYLE_PROVIDER_PRIVATE (props)); } @@ -406,6 +422,8 @@ gtk_style_properties_map_color (GtkStyleProperties *props, * Returns: (transfer none): The mapped color * * Since: 3.0 + * + * Deprecated: 3.8: #GtkSymbolicColor is deprecated. **/ GtkSymbolicColor * gtk_style_properties_lookup_color (GtkStyleProperties *props, @@ -862,7 +880,9 @@ gtk_style_properties_merge (GtkStyleProperties *props, g_hash_table_lookup (priv->color_map, name)) continue; + G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_style_properties_map_color (props, name, color); + G_GNUC_END_IGNORE_DEPRECATIONS; } } |