diff options
author | Chris Toshok <toshok@helixcode.com> | 2000-06-23 15:47:37 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2000-06-23 15:47:37 +0800 |
commit | 422046cc58a534f6916205f282cc6b50a98eeb95 (patch) | |
tree | 3c5ab189a7edaa7adb10dac1031249ae1ec4f6f7 /widgets/e-table/e-tree-simple.c | |
parent | 29a313c41efa7844952000a88d772af11fbb6f37 (diff) | |
download | gsoc2013-evolution-422046cc58a534f6916205f282cc6b50a98eeb95.tar gsoc2013-evolution-422046cc58a534f6916205f282cc6b50a98eeb95.tar.gz gsoc2013-evolution-422046cc58a534f6916205f282cc6b50a98eeb95.tar.bz2 gsoc2013-evolution-422046cc58a534f6916205f282cc6b50a98eeb95.tar.lz gsoc2013-evolution-422046cc58a534f6916205f282cc6b50a98eeb95.tar.xz gsoc2013-evolution-422046cc58a534f6916205f282cc6b50a98eeb95.tar.zst gsoc2013-evolution-422046cc58a534f6916205f282cc6b50a98eeb95.zip |
add icon_at virtual function - it was stupid to make the insert call take
2000-06-23 Chris Toshok <toshok@helixcode.com>
* e-tree-model.h, e-tree-model.c: add icon_at virtual function -
it was stupid to make the insert call take 2 pixbufs. the model
should give this information.
* e-cell-tree.c: get rid of the opened/closed pixbuf stuff. call
e_tree_model_icon_of_node.
* e-tree-example-1.c: add my_icon_at.
* e-tree-simple.c (simple_icon_at): new function
(e_tree_simple_new): add icon_at parameter.
* e-tree-simple.h: add SimpleIconAtFn.
svn path=/trunk/; revision=3707
Diffstat (limited to 'widgets/e-table/e-tree-simple.c')
-rw-r--r-- | widgets/e-table/e-tree-simple.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/widgets/e-table/e-tree-simple.c b/widgets/e-table/e-tree-simple.c index 9bf747a43f..e5883e6ae0 100644 --- a/widgets/e-table/e-tree-simple.c +++ b/widgets/e-table/e-tree-simple.c @@ -23,6 +23,14 @@ simple_value_at (ETreeModel *etm, ETreePath *node, int col) return simple->value_at (etm, node, col, simple->model_data); } +static GdkPixbuf * +simple_icon_at (ETreeModel *etm, ETreePath *node) +{ + ETreeSimple *simple = E_TREE_SIMPLE(etm); + + return simple->icon_at (etm, node, simple->model_data); +} + static void simple_set_value_at (ETreeModel *etm, ETreePath *node, int col, const void *val) { @@ -44,6 +52,7 @@ e_tree_simple_class_init (GtkObjectClass *object_class) { ETreeModelClass *model_class = (ETreeModelClass *) object_class; + model_class->icon_at = simple_icon_at; model_class->value_at = simple_value_at; model_class->set_value_at = simple_set_value_at; model_class->is_editable = simple_is_editable; @@ -52,7 +61,8 @@ e_tree_simple_class_init (GtkObjectClass *object_class) E_MAKE_TYPE(e_tree_simple, "ETreeSimple", ETreeSimple, e_tree_simple_class_init, NULL, PARENT_TYPE) ETreeModel * -e_tree_simple_new (ETreeSimpleValueAtFn value_at, +e_tree_simple_new (ETreeSimpleIconAtFn icon_at, + ETreeSimpleValueAtFn value_at, ETreeSimpleSetValueAtFn set_value_at, ETreeSimpleIsEditableFn is_editable, gpointer model_data) @@ -63,6 +73,7 @@ e_tree_simple_new (ETreeSimpleValueAtFn value_at, e_tree_model_construct (E_TREE_MODEL (etg)); + etg->icon_at = icon_at; etg->value_at = value_at; etg->set_value_at = set_value_at; etg->is_editable = is_editable; |