[evolution-data-server] use cairo as gc is deprecated
- From: Chenthill Palanisamy <pchen src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] use cairo as gc is deprecated
- Date: Tue, 10 Aug 2010 05:57:44 +0000 (UTC)
commit 83f1f0a85c9c986caeb4a1c38f8c927b7c3b7f03
Author: Chenthill Palanisamy <pchenthill novell com>
Date: Tue Aug 10 11:23:58 2010 +0530
use cairo as gc is deprecated
libedataserverui/e-cell-renderer-color.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/libedataserverui/e-cell-renderer-color.c b/libedataserverui/e-cell-renderer-color.c
old mode 100644
new mode 100755
index a33e2bd..ce5aef0
--- a/libedataserverui/e-cell-renderer-color.c
+++ b/libedataserverui/e-cell-renderer-color.c
@@ -106,7 +106,7 @@ cell_renderer_color_render (GtkCellRenderer *cell,
ECellRendererColorPrivate *priv;
GdkRectangle pix_rect;
GdkRectangle draw_rect;
- GdkGC *gc;
+ cairo_t *cr;
guint xpad;
guint ypad;
@@ -134,12 +134,12 @@ cell_renderer_color_render (GtkCellRenderer *cell,
gdk_colormap_alloc_color (
gdk_colormap_get_system(), priv->color, FALSE, TRUE);
- gc = gdk_gc_new (window);
- gdk_gc_set_foreground (gc, priv->color);
- gdk_draw_rectangle (
- window, gc, TRUE, pix_rect.x, pix_rect.y,
- draw_rect.width, draw_rect.height);
- g_object_unref (gc);
+ cr = gdk_cairo_create (window);
+ gdk_cairo_set_source_color (cr, priv->color);
+ cairo_rectangle (cr, pix_rect.x, pix_rect.y, draw_rect.width, draw_rect.height);
+
+ cairo_fill (cr);
+ cairo_destroy (cr);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]