[gimp] Revert "libgimpwidgets: avoid using a function only available since GTK+ 2.22"



commit 3eb096b239a893181ed6a3a635858be554ea14bf
Author: Mikael Magnusson <mikachu src gnome org>
Date:   Wed Apr 6 20:18:14 2011 +0200

    Revert "libgimpwidgets: avoid using a function only available since GTK+ 2.22"
    
    We depend on GTK+ 2.24 now.
    
    This reverts commit 0e55c5e4d81b402f217b47f31855d77f5f8b6aa0.

 libgimpwidgets/gimpruler.c |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)
---
diff --git a/libgimpwidgets/gimpruler.c b/libgimpwidgets/gimpruler.c
index 1f79154..c84701d 100644
--- a/libgimpwidgets/gimpruler.c
+++ b/libgimpwidgets/gimpruler.c
@@ -1216,24 +1216,17 @@ gimp_ruler_make_pixmap (GimpRuler *ruler)
   GtkWidget        *widget = GTK_WIDGET (ruler);
   GimpRulerPrivate *priv   = GIMP_RULER_GET_PRIVATE (ruler);
   GtkAllocation     allocation;
-  cairo_t          *cr;
-  cairo_surface_t  *surface;
 
   gtk_widget_get_allocation (widget, &allocation);
 
   if (priv->backing_store)
     cairo_surface_destroy (priv->backing_store);
 
-  cr = gdk_cairo_create (gtk_widget_get_window (widget));
-  surface = cairo_get_target (cr);
-
   priv->backing_store =
-    cairo_surface_create_similar (surface,
-                                  CAIRO_CONTENT_COLOR,
-                                  allocation.width,
-                                  allocation.height);
-
-  cairo_destroy (cr);
+    gdk_window_create_similar_surface (gtk_widget_get_window (widget),
+                                       CAIRO_CONTENT_COLOR,
+                                       allocation.width,
+                                       allocation.height);
 }
 
 



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