aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
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
parent04865e57d321a7d35e5165e8ec6de8f505ab54de (diff)
downloadgsoc2013-evolution-4b7718f89408664af20a55d80a09323e63f4694f.tar
gsoc2013-evolution-4b7718f89408664af20a55d80a09323e63f4694f.tar.gz
gsoc2013-evolution-4b7718f89408664af20a55d80a09323e63f4694f.tar.bz2
gsoc2013-evolution-4b7718f89408664af20a55d80a09323e63f4694f.tar.lz
gsoc2013-evolution-4b7718f89408664af20a55d80a09323e63f4694f.tar.xz
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')
-rw-r--r--widgets/e-table/ChangeLog8
-rw-r--r--widgets/e-table/e-tree-example-1.c10
-rw-r--r--widgets/table/e-tree-example-1.c10
3 files changed, 20 insertions, 8 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog
index 2b87799b03..a3a2977668 100644
--- a/widgets/e-table/ChangeLog
+++ b/widgets/e-table/ChangeLog
@@ -1,3 +1,11 @@
+2000-08-31 Richard Hult <rhult@codefactory.se>
+
+ * e-tree-example-1.c (create_tree): Don't show the root node.
+ Also quit when the window is closed.
+ (my_icon_at): Don't use icons here since the cell tree renderer takes
+ care of the +/- signs itself. This stops the tree example from showing
+ two sets of expand/unexpand icons at every node.
+
2000-08-28 Christopher James Lahey <clahey@helixcode.com>
* e-table-group-container.c: Make printing of groups work better
diff --git a/widgets/e-table/e-tree-example-1.c b/widgets/e-table/e-tree-example-1.c
index 3762dc6b39..71b3f7ca5d 100644
--- a/widgets/e-table/e-tree-example-1.c
+++ b/widgets/e-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);
}
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);
}