aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-tree.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-04-01 19:20:55 +0800
committerChris Lahey <clahey@src.gnome.org>2001-04-01 19:20:55 +0800
commit3de1d627a1eb200774907589e19fa2c66d27cda8 (patch)
treef8c49f781a31999e30595592cef1193221593912 /widgets/table/e-tree.c
parent57f877305c3c2e6a0b43b1ceb0717ffc2b991bc7 (diff)
downloadgsoc2013-evolution-3de1d627a1eb200774907589e19fa2c66d27cda8.tar
gsoc2013-evolution-3de1d627a1eb200774907589e19fa2c66d27cda8.tar.gz
gsoc2013-evolution-3de1d627a1eb200774907589e19fa2c66d27cda8.tar.bz2
gsoc2013-evolution-3de1d627a1eb200774907589e19fa2c66d27cda8.tar.lz
gsoc2013-evolution-3de1d627a1eb200774907589e19fa2c66d27cda8.tar.xz
gsoc2013-evolution-3de1d627a1eb200774907589e19fa2c66d27cda8.tar.zst
gsoc2013-evolution-3de1d627a1eb200774907589e19fa2c66d27cda8.zip
Added e-tree-selection-model.c. (libetableinclude_HEADERS): Added
2001-04-01 Christopher James Lahey <clahey@ximian.com> * Makefile.am (libetable_la_SOURCES): Added e-tree-selection-model.c. (libetableinclude_HEADERS): Added e-tree-selection-model.h. * e-tree.c, e-tree.h: Added code to use ETreeSelectionModel if the string E_TREE_USE_TREE_SELECTION is defined. svn path=/trunk/; revision=9082
Diffstat (limited to 'widgets/table/e-tree.c')
-rw-r--r--widgets/table/e-tree.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index c397341cff..bdc1db64ac 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -28,7 +28,12 @@
#include <gal/e-table/e-table-sort-info.h>
#include <gal/e-table/e-table-utils.h>
+#ifdef E_TREE_USE_TREE_SELECTION
+#include <gal/e-table/e-tree-selection-model.h>
+#else
#include <gal/e-table/e-table-selection-model.h>
+#endif
+
#include <gal/e-table/e-tree-sorted.h>
#include <gal/e-table/e-tree-table-adapter.h>
@@ -236,7 +241,11 @@ e_tree_init (GtkObject *object)
e_tree->priv->drag_source_button_press_event_id = 0;
e_tree->priv->drag_source_motion_notify_event_id = 0;
+#ifdef E_TREE_USE_TREE_SELECTION
+ e_tree->priv->selection = E_SELECTION_MODEL(e_tree_selection_model_new());
+#else
e_tree->priv->selection = E_SELECTION_MODEL(e_table_selection_model_new());
+#endif
e_tree->priv->spec = NULL;
e_tree->priv->header_canvas = NULL;
@@ -1064,6 +1073,21 @@ e_tree_selected_row_foreach (ETree *e_tree,
closure);
}
+#ifdef E_TREE_USE_TREE_SELECTION
+void
+e_tree_selected_path_foreach (ETree *e_tree,
+ ETreeForeachFunc callback,
+ gpointer closure)
+{
+ g_return_if_fail(e_tree != NULL);
+ g_return_if_fail(E_IS_TREE(e_tree));
+
+ e_tree_selection_model_foreach(E_TREE_SELECTION_MODEL (e_tree->priv->selection),
+ callback,
+ closure);
+}
+#endif
+
gint
e_tree_selected_count (ETree *e_tree)
{