aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view-main-item.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-11-09 21:48:33 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:25 +0800
commita3ba231fcc2746e664a67c85d88eb49a64813989 (patch)
tree7de1b38c8b1b467a0bf9c257a072e5e02a2671c5 /calendar/gui/e-day-view-main-item.c
parent968717967398ab7e537aa27d3241b326447a180f (diff)
downloadgsoc2013-evolution-a3ba231fcc2746e664a67c85d88eb49a64813989.tar.gz
gsoc2013-evolution-a3ba231fcc2746e664a67c85d88eb49a64813989.tar.zst
gsoc2013-evolution-a3ba231fcc2746e664a67c85d88eb49a64813989.zip
Drop backward-compatibility cruft.
Diffstat (limited to 'calendar/gui/e-day-view-main-item.c')
-rw-r--r--calendar/gui/e-day-view-main-item.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index 98c15152d0..061224b04f 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -40,9 +40,6 @@
#include "e-calendar-view.h"
#include "comp-util.h"
-/* backward-compatibility cruft */
-#include "e-util/gtk-compat.h"
-
#define E_DAY_VIEW_MAIN_ITEM_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_DAY_VIEW_MAIN_ITEM, EDayViewMainItemPrivate))
@@ -59,7 +56,7 @@ enum {
static gpointer parent_class;
static gboolean
-can_draw_in_region (GdkRegion *draw_region, gint x, gint y, gint width, gint height)
+can_draw_in_region (cairo_region_t *draw_region, gint x, gint y, gint width, gint height)
{
GdkRectangle rect;
@@ -70,7 +67,8 @@ can_draw_in_region (GdkRegion *draw_region, gint x, gint y, gint width, gint hei
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 gboolean
@@ -95,7 +93,7 @@ day_view_main_item_draw_long_events_in_vbars (EDayViewMainItem *main_item,
gint y,
gint width,
gint height,
- GdkRegion *draw_region)
+ cairo_region_t *draw_region)
{
EDayView *day_view;
EDayViewEvent *event;
@@ -190,7 +188,7 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
gint height,
gint day,
gint event_num,
- GdkRegion *draw_region)
+ cairo_region_t *draw_region)
{
EDayView *day_view;
EDayViewEvent *event;
@@ -838,7 +836,7 @@ day_view_main_item_draw_day_events (EDayViewMainItem *main_item,
gint width,
gint height,
gint day,
- GdkRegion *draw_region)
+ cairo_region_t *draw_region)
{
EDayView *day_view;
gint event_num;
@@ -861,7 +859,7 @@ day_view_main_item_draw_events_in_vbars (EDayViewMainItem *main_item,
gint width,
gint height,
gint day,
- GdkRegion *draw_region)
+ cairo_region_t *draw_region)
{
EDayView *day_view;
EDayViewEvent *event;
@@ -1026,7 +1024,7 @@ day_view_main_item_draw (GnomeCanvasItem *canvas_item,
gint weekday;
cairo_t *cr;
gboolean today = FALSE;
- GdkRegion *draw_region;
+ cairo_region_t *draw_region;
GdkRectangle rect;
cr = gdk_cairo_create (drawable);
@@ -1048,7 +1046,10 @@ day_view_main_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 ();
/* Paint the background colors. */
work_day_start_y = e_day_view_convert_time_to_position (
@@ -1252,8 +1253,7 @@ day_view_main_item_draw (GnomeCanvasItem *canvas_item,
}
cairo_restore (cr);
}
- cairo_destroy (cr);
- gdk_region_destroy (draw_region);
+ cairo_region_destroy (draw_region);
}
static GnomeCanvasItem *