styleproperties: Remove color set function

Now that we do resolvage with the style context directly, this is no
longer needed.
This commit is contained in:
Benjamin Otte
2012-01-10 14:28:22 +01:00
parent 5f8c77f6d5
commit aa98aca45f
3 changed files with 0 additions and 30 deletions

View File

@ -988,9 +988,6 @@ build_properties (GtkStyleContext *context,
}
style_data->store = gtk_style_properties_new ();
_gtk_style_properties_set_color_lookup_func (style_data->store,
gtk_style_context_color_lookup_func,
context);
_gtk_css_lookup_resolve (lookup, context, style_data->store);
_gtk_css_lookup_free (lookup);
}

View File

@ -79,8 +79,6 @@ struct _GtkStylePropertiesPrivate
{
GHashTable *color_map;
GHashTable *properties;
GtkSymbolicColorLookupFunc color_lookup_func;
gpointer color_lookup_data;
};
static void gtk_style_properties_provider_init (GtkStyleProviderIface *iface);
@ -367,23 +365,6 @@ gtk_style_properties_new (void)
return g_object_new (GTK_TYPE_STYLE_PROPERTIES, NULL);
}
void
_gtk_style_properties_set_color_lookup_func (GtkStyleProperties *props,
GtkSymbolicColorLookupFunc func,
gpointer data)
{
GtkStylePropertiesPrivate *priv;
g_return_if_fail (GTK_IS_STYLE_PROPERTIES (props));
g_return_if_fail (func != NULL);
priv = props->priv;
g_return_if_fail (priv->color_map == NULL);
priv->color_lookup_func = func;
priv->color_lookup_data = data;
}
/**
* gtk_style_properties_map_color:
* @props: a #GtkStyleProperties
@ -407,7 +388,6 @@ gtk_style_properties_map_color (GtkStyleProperties *props,
g_return_if_fail (color != NULL);
priv = props->priv;
g_return_if_fail (priv->color_lookup_func == NULL);
if (G_UNLIKELY (!priv->color_map))
priv->color_map = g_hash_table_new_full (g_str_hash,
@ -443,9 +423,6 @@ gtk_style_properties_lookup_color (GtkStyleProperties *props,
priv = props->priv;
if (priv->color_lookup_func)
return priv->color_lookup_func (priv->color_lookup_data, name);
if (!priv->color_map)
return NULL;

View File

@ -27,10 +27,6 @@
G_BEGIN_DECLS
void _gtk_style_properties_set_color_lookup_func (GtkStyleProperties *props,
GtkSymbolicColorLookupFunc func,
gpointer data);
const GValue * _gtk_style_properties_peek_property (GtkStyleProperties *props,
GtkCssStyleProperty *property,
GtkStateFlags state);