diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2010-11-17 02:42:27 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2010-12-04 15:39:13 +0100 |
commit | c9dc09e980d26844d72bf740ddffc1a5530f2627 (patch) | |
tree | 141d72501d72ac4c6ed59e51e8484d8710db2f49 /gtk/gtkstyleprovider.c | |
parent | b613f1f1f288d9e24ca8830834e6bc533a3e3727 (diff) | |
download | gtk+-c9dc09e980d26844d72bf740ddffc1a5530f2627.tar.gz |
GtkStyleProvider: Pass a GParamSpec in get_style_property().
This is so we can know the owner type of the property, and matching
with the stored strings in GtkCssProvider is direct.
Diffstat (limited to 'gtk/gtkstyleprovider.c')
-rw-r--r-- | gtk/gtkstyleprovider.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk/gtkstyleprovider.c b/gtk/gtkstyleprovider.c index 0f1312f34f..5033410188 100644 --- a/gtk/gtkstyleprovider.c +++ b/gtk/gtkstyleprovider.c @@ -86,25 +86,26 @@ gtk_style_provider_get_style (GtkStyleProvider *provider, * gtk_style_provider_get_style_property: * @provider: a #GtkStyleProvider * @path: #GtkWidgetPath to query - * @property_name: the property name + * @pspec: The #GParamSpec to query * @value: (out): return location for the property value * * Looks up a widget style property as defined by @provider for - * the widget represented by @widget_path. + * the widget represented by @path. * * Returns: %TRUE if the property was found and has a value, %FALSE otherwise **/ gboolean gtk_style_provider_get_style_property (GtkStyleProvider *provider, GtkWidgetPath *path, - const gchar *property_name, + GParamSpec *pspec, GValue *value) { GtkStyleProviderIface *iface; g_return_val_if_fail (GTK_IS_STYLE_PROVIDER (provider), FALSE); + g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), FALSE); g_return_val_if_fail (path != NULL, FALSE); - g_return_val_if_fail (property_name != NULL, FALSE); + g_return_val_if_fail (g_type_is_a (gtk_widget_path_get_widget_type (path), pspec->owner_type), FALSE); g_return_val_if_fail (value != NULL, FALSE); iface = GTK_STYLE_PROVIDER_GET_IFACE (provider); @@ -112,7 +113,7 @@ gtk_style_provider_get_style_property (GtkStyleProvider *provider, if (!iface->get_style_property) return FALSE; - return iface->get_style_property (provider, path, property_name, value); + return iface->get_style_property (provider, path, pspec, value); } /** |