[glade] dnd: Avoid GTK+ warnings



commit 23d5293d22a69f366699b78b6fafba7ec9b9af73
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]