[gtk+/gtk-style-context: 101/191] GtkWidget: Hook up widget style property querying to style context.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 101/191] GtkWidget: Hook up widget style property querying to style context.
- Date: Tue, 17 Aug 2010 13:56:41 +0000 (UTC)
commit 600a4cf4080d37c10d110c295a5234c12ed457b5
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jun 18 17:16:21 2010 +0200
GtkWidget: Hook up widget style property querying to style context.
gtk/gtkwidget.c | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 214b6d2..a47de18 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -9931,13 +9931,14 @@ gtk_widget_style_get_property (GtkWidget *widget,
property_name);
else
{
+ GtkStyleContext *context;
const GValue *peek_value;
- peek_value = _gtk_style_peek_property_value (widget->style,
- G_OBJECT_TYPE (widget),
- pspec,
- (GtkRcPropertyParser) g_param_spec_get_qdata (pspec, quark_property_parser));
-
+ context = gtk_widget_get_style_context (widget);
+ peek_value = _gtk_style_context_peek_style_property (context,
+ G_OBJECT_TYPE (widget),
+ pspec);
+
/* auto-conversion of the caller's value type
*/
if (G_VALUE_TYPE (value) == G_PARAM_SPEC_VALUE_TYPE (pspec))
@@ -9969,11 +9970,13 @@ gtk_widget_style_get_valist (GtkWidget *widget,
const gchar *first_property_name,
va_list var_args)
{
+ GtkStyleContext *context;
const gchar *name;
g_return_if_fail (GTK_IS_WIDGET (widget));
g_object_ref (widget);
+ context = gtk_widget_get_style_context (widget);
name = first_property_name;
while (name)
@@ -9996,10 +9999,10 @@ gtk_widget_style_get_valist (GtkWidget *widget,
}
/* style pspecs are always readable so we can spare that check here */
- peek_value = _gtk_style_peek_property_value (widget->style,
- G_OBJECT_TYPE (widget),
- pspec,
- (GtkRcPropertyParser) g_param_spec_get_qdata (pspec, quark_property_parser));
+ peek_value = _gtk_style_context_peek_style_property (context,
+ G_OBJECT_TYPE (widget),
+ pspec);
+
G_VALUE_LCOPY (peek_value, var_args, 0, &error);
if (error)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]