[glade/wip/matthiasc/shortcuts: 3/6] dnd: Avoid GTK+ warnings
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade/wip/matthiasc/shortcuts: 3/6] dnd: Avoid GTK+ warnings
- Date: Sat, 21 Nov 2015 17:33:58 +0000 (UTC)
commit 71ca0bf294511174ffaf209e59c436bf383bd431
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Nov 18 11:41:16 2015 -0500
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
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 a726344..1a2991c 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]