mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-07 01:00:28 +00:00
Add GtkWidgetPath parameter to gtk_style_provider_get_style().
This commit is contained in:
parent
9971f386b0
commit
7c5c4d86ae
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user