aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorRichard Hult <rhult@src.gnome.org>2000-08-31 15:01:05 +0800
committerRichard Hult <rhult@src.gnome.org>2000-08-31 15:01:05 +0800
commit4b7718f89408664af20a55d80a09323e63f4694f (patch)
tree6434a6520682644df223e10d50e145890e1657da /widgets/table
parent04865e57d321a7d35e5165e8ec6de8f505ab54de (diff)
downloadgsoc2013-evolution-4b7718f89408664af20a55d80a09323e63f4694f.tar.gz
gsoc2013-evolution-4b7718f89408664af20a55d80a09323e63f4694f.tar.zst
gsoc2013-evolution-4b7718f89408664af20a55d80a09323e63f4694f.zip
Fix the tree example so that is doesn't show two sets of expand/unexpand
icons at tree nodes. svn path=/trunk/; revision=5137
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-tree-example-1.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/widgets/table/e-tree-example-1.c b/widgets/table/e-tree-example-1.c
index 3762dc6b39..71b3f7ca5d 100644
--- a/widgets/table/e-tree-example-1.c
+++ b/widgets/table/e-tree-example-1.c
@@ -86,10 +86,8 @@ my_value_at (ETreeModel *etm, ETreePath *path, int col, void *model_data)
static GdkPixbuf *
my_icon_at (ETreeModel *etm, ETreePath *path, void *model_data)
{
- if (e_tree_model_node_is_expanded (etm, path))
- return tree_expanded_pixbuf;
- else
- return tree_unexpanded_pixbuf;
+ /* No icon, since the cell tree renderer takes care of the +/- icons itself. */
+ return NULL;
}
/* This function sets the value at a particular point in our ETreeModel. */
@@ -254,6 +252,8 @@ create_tree (void)
0,
g_strdup("Root Node"));
+ e_tree_model_root_node_set_visible (e_tree_model, FALSE);
+
for (i = 0; i < 5; i++){
ETreePath *n = e_tree_model_node_insert (e_tree_model,
root_node, 0,
@@ -369,6 +369,8 @@ create_tree (void)
/* Size the initial window. */
gtk_widget_set_usize (window, 200, 200);
+ gtk_signal_connect (GTK_OBJECT (window), "delete-event", gtk_main_quit, NULL);
+
/* Show it all. */
gtk_widget_show_all (window);
}