[gimp/cage: 121/130] libgimpwidgets: avoid using a function only available since GTK+ 2.22
- From: Michael Muré <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/cage: 121/130] libgimpwidgets: avoid using a function only available since GTK+ 2.22
- Date: Thu, 30 Dec 2010 17:58:09 +0000 (UTC)
commit 79904636d9c8f5efd63a3fee473f6307372fc0f1
Author: Mikael Magnusson <mikachu src gnome org>
Date: Sat Dec 18 00:31:22 2010 +0100
libgimpwidgets: avoid using a function only available since GTK+ 2.22
libgimpwidgets/gimpruler.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/libgimpwidgets/gimpruler.c b/libgimpwidgets/gimpruler.c
index 271e46d..7e24279 100644
--- a/libgimpwidgets/gimpruler.c
+++ b/libgimpwidgets/gimpruler.c
@@ -1028,17 +1028,24 @@ 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 =
- gdk_window_create_similar_surface (gtk_widget_get_window (widget),
- CAIRO_CONTENT_COLOR,
- allocation.width,
- allocation.height);
+ cairo_surface_create_similar (surface,
+ CAIRO_CONTENT_COLOR,
+ allocation.width,
+ allocation.height);
+
+ cairo_destroy (cr);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]