Commit 7c5c4d86 authored by Carlos Garnacho's avatar Carlos Garnacho

Add GtkWidgetPath parameter to gtk_style_provider_get_style().

parent 9971f386
......@@ -136,9 +136,14 @@ rebuild_properties (GtkStyleContext *context)
data = list->data;
list = list->next;
provider_style = gtk_style_provider_get_style (data->provider);
gtk_style_set_merge (priv->store, provider_style, TRUE);
g_object_unref (provider_style);
provider_style = gtk_style_provider_get_style (data->provider,
priv->widget_path);
if (provider_style)
{
gtk_style_set_merge (priv->store, provider_style, TRUE);
g_object_unref (provider_style);
}
}
}
......
......@@ -48,7 +48,8 @@ gtk_style_provider_iface_init (gpointer g_iface)
}
GtkStyleSet *
gtk_style_provider_get_style (GtkStyleProvider *provider)
gtk_style_provider_get_style (GtkStyleProvider *provider,
GtkWidgetPath *path)
{
GtkStyleProviderIface *iface;
......@@ -59,7 +60,7 @@ gtk_style_provider_get_style (GtkStyleProvider *provider)
if (!iface->get_style)
return NULL;
return iface->get_style (provider);
return iface->get_style (provider, path);
}
#define __GTK_STYLE_PROVIDER_C__
......
......@@ -21,6 +21,7 @@
#define __GTK_STYLE_PROVIDER_H__
#include <glib-object.h>
#include "gtkwidgetpath.h"
#include "gtkstyleset.h"
#include "gtkenums.h"
......@@ -45,12 +46,14 @@ struct GtkStyleProviderIface
{
GTypeInterface g_iface;
GtkStyleSet * (* get_style) (GtkStyleProvider *provider);
GtkStyleSet * (* get_style) (GtkStyleProvider *provider,
GtkWidgetPath *path);
};
GType gtk_style_provider_get_type (void) G_GNUC_CONST;
GtkStyleSet *gtk_style_provider_get_style (GtkStyleProvider *provider);
GtkStyleSet *gtk_style_provider_get_style (GtkStyleProvider *provider,
GtkWidgetPath *path);
G_END_DECLS
......
......@@ -134,7 +134,8 @@ gtk_style_set_finalize (GObject *object)
}
GtkStyleSet *
gtk_style_set_get_style (GtkStyleProvider *provider)
gtk_style_set_get_style (GtkStyleProvider *provider,
GtkWidgetPath *path)
{
/* Return style set itself */
return g_object_ref (provider);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment