From b3a95d0299386bccbdebb967d15f4df02cf15891 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 10 Oct 2010 02:31:45 +0200 Subject: 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. --- calendar/gui/e-day-view-time-item.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'calendar/gui/e-day-view-time-item.c') diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c index 9e430ecf41..e952515c89 100644 --- a/calendar/gui/e-day-view-time-item.c +++ b/calendar/gui/e-day-view-time-item.c @@ -80,10 +80,9 @@ static void e_day_view_time_item_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint width, gint height); -static double e_day_view_time_item_point (GnomeCanvasItem *item, - double x, double y, - gint cx, gint cy, - GnomeCanvasItem **actual_item); +static GnomeCanvasItem *e_day_view_time_item_point (GnomeCanvasItem *item, + double x, double y, + gint cx, gint cy); static gint e_day_view_time_item_event (GnomeCanvasItem *item, GdkEvent *event); static void e_day_view_time_item_increment_time (gint *hour, @@ -649,13 +648,11 @@ e_day_view_time_item_increment_time (gint *hour, } } -static double +static GnomeCanvasItem * e_day_view_time_item_point (GnomeCanvasItem *item, double x, double y, - gint cx, gint cy, - GnomeCanvasItem **actual_item) + gint cx, gint cy) { - *actual_item = item; - return 0.0; + return item; } static gint -- cgit