[gnome-keyring] [gcr] Fix build for GTK+3 style-context changes.



commit 4d1f1393f839493cd4853e399a5e0db1a11cb527
Author: Stef Walter <stefw collabora co uk>
Date:   Mon Dec 6 19:16:25 2010 +0000

    [gcr] Fix build for GTK+3 style-context changes.
    
    Use new gtk_widget_override_background_color() function.

 gcr/gcr-display-view.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gcr/gcr-display-view.c b/gcr/gcr-display-view.c
index 3f0807d..6c9c354 100644
--- a/gcr/gcr-display-view.c
+++ b/gcr/gcr-display-view.c
@@ -136,8 +136,13 @@ on_expander_expanded (GObject *object, GParamSpec *param_spec, gpointer user_dat
 static void
 style_display_item (GtkWidget *widget, GcrDisplayItem *item)
 {
+#if GTK_CHECK_VERSION (2,91,5)
+	GdkRGBA transparent = { 1.0, 1.0, 1.0, 0.0 };
+	gtk_widget_override_background_color (item->details_widget, GTK_STATE_NORMAL, &transparent);
+#else
 	GtkStyle *style = gtk_widget_get_style (widget);
 	gtk_widget_modify_bg (item->details_widget, GTK_STATE_NORMAL, &style->base[GTK_STATE_NORMAL]);
+#endif
 }
 
 static GcrDisplayItem*



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]