diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-11-18 11:41:16 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-11-25 22:19:33 -0500 |
commit | 23d5293d22a69f366699b78b6fafba7ec9b9af73 (patch) | |
tree | be142a806f00b87204da487817868d97ef2f6855 | |
parent | b2c94a56a4ad57c5d77280718164503b8c5d2538 (diff) | |
download | glade-23d5293d22a69f366699b78b6fafba7ec9b9af73.tar.gz |
dnd: Avoid GTK+ warnings
GTK+ warns nowadays if the state passed to gtk_style_context_get_*
does not match the state of the context. Avoid this by using the
state of the context.
https://bugzilla.gnome.org/show_bug.cgi?id=758297
-rw-r--r-- | gladeui/glade-dnd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gladeui/glade-dnd.c b/gladeui/glade-dnd.c index a726344b..1a2991cf 100644 --- a/gladeui/glade-dnd.c +++ b/gladeui/glade-dnd.c @@ -97,7 +97,7 @@ on_drag_icon_draw (GtkWidget *widget, cairo_t *cr) h = alloc.height; h2 = h/2.0; - gtk_style_context_get_background_color (context, GTK_STATE_NORMAL, &bg); + gtk_style_context_get_background_color (context, gtk_style_context_get_state (context), &bg); gradient = cairo_pattern_create_linear (x, y, x, y+h); cairo_pattern_add_color_stop_rgba (gradient, 0, bg.red, bg.green, bg.blue, 0); |