aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-week-view-event-item.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-10-10 08:31:45 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-30 01:49:59 +0800
commitb3a95d0299386bccbdebb967d15f4df02cf15891 (patch)
tree52b90e4b913bb1c4cd17df3335216bf518a6e01c /calendar/gui/e-week-view-event-item.c
parent08e71ba8ae72f333f017c25168b9ec85ea5954fa (diff)
downloadgsoc2013-evolution-b3a95d0299386bccbdebb967d15f4df02cf15891.tar.gz
gsoc2013-evolution-b3a95d0299386bccbdebb967d15f4df02cf15891.tar.zst
gsoc2013-evolution-b3a95d0299386bccbdebb967d15f4df02cf15891.zip
gnome-canvas: Change GnomeCanvasItem->point vfunc
Previously the function returned the distance to the nearest item. Now it only returns an item that is hit. This slightly changes semantics (button events are no longer dispatched to the nearest item, but only to the item actually clicked on), but makes the code way simpler and actually does what one would expect.
Diffstat (limited to 'calendar/gui/e-week-view-event-item.c')
-rw-r--r--calendar/gui/e-week-view-event-item.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index f2b3471e66..8309dcd8dc 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -1126,21 +1126,14 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item,
gdk_region_destroy (draw_region);
}
-static double
+static GnomeCanvasItem *
week_view_event_item_point (GnomeCanvasItem *item,
gdouble x,
gdouble y,
gint cx,
- gint cy,
- GnomeCanvasItem **actual_item)
+ gint cy)
{
- /* This is supposed to return the nearest item the the point
- * and the distance. Since we are the only item we just return
- * ourself and 0 for the distance. This is needed so that we
- * get button/motion events. */
- *actual_item = item;
-
- return 0.0;
+ return item;
}
static gint