[evolution] Adapt ECanvasBackground to latest gtk+-3.0 API.



commit 1329a581517f453086f3ec46d210bd928f468316
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Jan 15 10:11:49 2011 -0500

    Adapt ECanvasBackground to latest gtk+-3.0 API.

 widgets/misc/e-canvas-background.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index 80b3bf0..59d72f6 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -188,23 +188,22 @@ ecb_init (ECanvasBackground *ecb)
 
 static void
 ecb_draw (GnomeCanvasItem *item,
-          GdkDrawable *drawable,
+          cairo_t *cr,
           gint x,
           gint y,
           gint width,
           gint height)
 {
 	ECanvasBackground *ecb = E_CANVAS_BACKGROUND (item);
-        cairo_t *cr;
 
-        cr = gdk_cairo_create (drawable);
+	cairo_save (cr);
         cairo_set_source_rgba (cr,
                                ((ecb->priv->rgba >> 24) & 0xff) / 255.0,
                                ((ecb->priv->rgba >> 16) & 0xff) / 255.0,
                                ((ecb->priv->rgba >>  8) & 0xff) / 255.0,
                                ( ecb->priv->rgba        & 0xff) / 255.0);
         cairo_paint (cr);
-        cairo_destroy (cr);
+	cairo_restore (cr);
 }
 
 static GnomeCanvasItem *



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