aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-07-04 06:25:47 +0800
committerChris Lahey <clahey@src.gnome.org>2000-07-04 06:25:47 +0800
commit40e24cdab6d294af61ca54a96b0b901181dc7751 (patch)
tree47443df546a952e8a74fb40a514dc6889c290f49 /widgets/misc
parenta1d1e450a1ec2f8c2fd921b18e695031cf061887 (diff)
downloadgsoc2013-evolution-40e24cdab6d294af61ca54a96b0b901181dc7751.tar
gsoc2013-evolution-40e24cdab6d294af61ca54a96b0b901181dc7751.tar.gz
gsoc2013-evolution-40e24cdab6d294af61ca54a96b0b901181dc7751.tar.bz2
gsoc2013-evolution-40e24cdab6d294af61ca54a96b0b901181dc7751.tar.lz
gsoc2013-evolution-40e24cdab6d294af61ca54a96b0b901181dc7751.tar.xz
gsoc2013-evolution-40e24cdab6d294af61ca54a96b0b901181dc7751.tar.zst
gsoc2013-evolution-40e24cdab6d294af61ca54a96b0b901181dc7751.zip
New list class with iterators.
2000-07-03 Christopher James Lahey <clahey@helixcode.com> * e-iterator.c, e-iterator.h, e-list-iterator.c, e-list-iterator.h, e-list.c, e-list.h: New list class with iterators. * e-canvas.c: Made it so that you don't get the same selection in the selection list more than once. svn path=/trunk/; revision=3871
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-canvas.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 0da4dade28..4cb912283e 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -583,6 +583,7 @@ e_canvas_item_add_selection (GnomeCanvasItem *item, gpointer id)
ECanvas *canvas;
ECanvasSelectionInfo *info;
ECanvasItemSelectionFunc func;
+ GList *list;
g_return_if_fail(item != NULL);
g_return_if_fail(GNOME_IS_CANVAS_ITEM(item));
@@ -602,6 +603,24 @@ e_canvas_item_add_selection (GnomeCanvasItem *item, gpointer id)
flags = E_CANVAS_ITEM_SELECTION_SELECT | E_CANVAS_ITEM_SELECTION_CURSOR;
+ for (list = canvas->selection; list; list = g_list_next(list)) {
+ ECanvasSelectionInfo *search;
+ search = list->data;
+
+ if (search->item == item) {
+ ECanvasItemSelectionCompareFunc compare_func;
+ compare_func = gtk_object_get_data(GTK_OBJECT(search->item), "ECanvasItem::selection_compare_callback");
+
+ if (compare_func(search->item, search->id, id, 0) == 0) {
+ canvas->cursor = search;
+ func = gtk_object_get_data(GTK_OBJECT(item), "ECanvasItem::selection_callback");
+ if (func)
+ func(item, flags, search->id);
+ return;
+ }
+ }
+ }
+
info = g_new(ECanvasSelectionInfo, 1);
info->item = item;
info->id = id;