diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-11-09 21:48:33 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:25 +0800 |
commit | a3ba231fcc2746e664a67c85d88eb49a64813989 (patch) | |
tree | 7de1b38c8b1b467a0bf9c257a072e5e02a2671c5 /calendar/gui/e-week-view-event-item.c | |
parent | 968717967398ab7e537aa27d3241b326447a180f (diff) | |
download | gsoc2013-evolution-a3ba231fcc2746e664a67c85d88eb49a64813989.tar.gz gsoc2013-evolution-a3ba231fcc2746e664a67c85d88eb49a64813989.tar.zst gsoc2013-evolution-a3ba231fcc2746e664a67c85d88eb49a64813989.zip |
Drop backward-compatibility cruft.
Diffstat (limited to 'calendar/gui/e-week-view-event-item.c')
-rw-r--r-- | calendar/gui/e-week-view-event-item.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index 902840a217..68884cc596 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -39,9 +39,6 @@ #include <text/e-text.h> -/* backward-compatibility cruft */ -#include "e-util/gtk-compat.h" - #define E_WEEK_VIEW_EVENT_ITEM_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ ((obj), E_TYPE_WEEK_VIEW_EVENT_ITEM, EWeekViewEventItemPrivate)) @@ -63,7 +60,7 @@ enum { static gpointer parent_class; static gboolean -can_draw_in_region (GdkRegion *draw_region, +can_draw_in_region (cairo_region_t *draw_region, gint x, gint y, gint width, @@ -78,8 +75,8 @@ can_draw_in_region (GdkRegion *draw_region, rect.width = width; rect.height = height; - return gdk_region_rect_in (draw_region, &rect) != - GDK_OVERLAP_RECTANGLE_OUT; + return cairo_region_contains_rectangle (draw_region, &rect) != + CAIRO_REGION_OVERLAP_OUT; } static ECalendarViewPosition @@ -395,7 +392,7 @@ week_view_event_item_draw_icons (EWeekViewEventItem *event_item, gint icon_y, gint x2, gboolean right_align, - GdkRegion *draw_region) + cairo_region_t *draw_region) { EWeekView *week_view; EWeekViewEvent *event; @@ -519,7 +516,7 @@ week_view_event_item_draw_triangle (EWeekViewEventItem *event_item, gint y, gint w, gint h, - GdkRegion *draw_region) + cairo_region_t *draw_region) { ECalModel *model; EWeekView *week_view; @@ -731,7 +728,7 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item, guint16 red, green, blue; gdouble radius, cx0, cy0, rect_height, rect_width; gdouble cc = 65535.0; - GdkRegion *draw_region; + cairo_region_t *draw_region; GdkRectangle rect; const gchar *color_spec; @@ -780,10 +777,13 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item, rect.y = 0; rect.width = width; rect.height = height; - draw_region = gdk_region_rectangle (&rect); + if (rect.width > 0 && rect.height > 0) + draw_region = cairo_region_create_rectangle (&rect); + else + draw_region = cairo_region_create (); if (!can_draw_in_region (draw_region, x1, y1, x2 - x1, y2 - y1)) { - gdk_region_destroy (draw_region); + cairo_region_destroy (draw_region); return; } @@ -1104,7 +1104,7 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item, } cairo_destroy (cr); - gdk_region_destroy (draw_region); + cairo_region_destroy (draw_region); } static GnomeCanvasItem * |