aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
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 /widgets/table
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 'widgets/table')
-rw-r--r--widgets/table/e-table-field-chooser-item.c8
-rw-r--r--widgets/table/e-table-header-item.c8
-rw-r--r--widgets/table/e-table-item.c9
3 files changed, 9 insertions, 16 deletions
diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c
index 67beee9d52..20048007d7 100644
--- a/widgets/table/e-table-field-chooser-item.c
+++ b/widgets/table/e-table-field-chooser-item.c
@@ -522,12 +522,10 @@ etfci_draw (GnomeCanvasItem *item,
}
}
-static double
-etfci_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy,
- GnomeCanvasItem **actual_item)
+static GnomeCanvasItem *
+etfci_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy)
{
- *actual_item = item;
- return 0.0;
+ return item;
}
static gboolean
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index f3ed548463..0f7444285a 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -1070,12 +1070,10 @@ ethi_draw (GnomeCanvasItem *item,
g_hash_table_destroy (arrows);
}
-static double
-ethi_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy,
- GnomeCanvasItem **actual_item)
+static GnomeCanvasItem *
+ethi_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy)
{
- *actual_item = item;
- return 0.0;
+ return item;
}
/*
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 7bd0ed4427..d68c69a220 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -2042,13 +2042,10 @@ exit:
cairo_destroy (cr);
}
-static double
-eti_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy,
- GnomeCanvasItem **actual_item)
+static GnomeCanvasItem *
+eti_point (GnomeCanvasItem *item, gdouble x, gdouble y, gint cx, gint cy)
{
- *actual_item = item;
-
- return 0.0;
+ return item;
}
static gboolean