changeset 31440:4458f98f42ba

Replace GdkGC with cairo calls in markerline.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Wed, 28 Jul 2010 04:15:35 +0000
parents 65b97f3cdd01
children 6ea43032df70
files pidgin/plugins/markerline.c
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/plugins/markerline.c	Tue Jul 27 15:10:30 2010 +0000
+++ b/pidgin/plugins/markerline.c	Wed Jul 28 04:15:35 2010 +0000
@@ -79,12 +79,14 @@
 	if (y >= event->area.y)
 	{
 		GdkColor red = {0, 0xffff, 0, 0};
-		GdkGC *gc = gdk_gc_new(GDK_DRAWABLE(event->window));
+		cairo_t *cr = gdk_cairo_create(GDK_DRAWABLE(event->window));
 
-		gdk_gc_set_rgb_fg_color(gc, &red);
-		gdk_draw_line(event->window, gc,
-					0, y, visible_rect.width, y);
-		g_object_unref(G_OBJECT(gc));
+		gdk_cairo_set_source_color(cr, &red);
+		cairo_move_to(cr, 0.0, y + 0.5);
+		cairo_rel_line_to(cr, visible_rect.width, 0.0);
+		cairo_set_line_width(cr, 1.0);
+		cairo_stroke(cr);
+		cairo_destroy(cr);
 	}
 	return FALSE;
 }