[librsvg] rsvg-view: Fix build with gtk 3



commit cbad691f0fee81673766e8c5c32d8019569ddf5d
Author: Christian Persch <chpe gnome org>
Date:   Mon Sep 27 19:08:34 2010 +0200

    rsvg-view: Fix build with gtk 3
    
    GdkColormap is gone.

 test-display.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/test-display.c b/test-display.c
index 56b3fc1..6594dec 100644
--- a/test-display.c
+++ b/test-display.c
@@ -690,11 +690,15 @@ view_pixbuf (ViewerCbInfo * info, int xid, const char *color)
         if (gdk_color_parse (color, &bg_color)) {
             GtkWidget *parent_widget = gtk_widget_get_parent (info->image);
 
+#if GTK_CHECK_VERSION (2, 90, 8)
+            gtk_widget_modify_bg (parent_widget, GTK_STATE_NORMAL, &bg_color);
+#else
             if (gdk_colormap_alloc_color
                 (gtk_widget_get_colormap (parent_widget), &bg_color, FALSE, TRUE))
                 gtk_widget_modify_bg (parent_widget, GTK_STATE_NORMAL, &bg_color);
             else
                 g_warning (_("Couldn't allocate color '%s'"), color);
+#endif
         } else
             g_warning (_("Couldn't parse color '%s'"), color);
     }



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