aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell-tree.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@helixcode.com>2000-10-03 02:02:53 +0800
committerChris Toshok <toshok@src.gnome.org>2000-10-03 02:02:53 +0800
commit1c2eec1fd409b7ec7a6742684c678bcd258aec53 (patch)
treef26b1011ae9ddb9133ba7b07b58e6806f86f05a8 /widgets/table/e-cell-tree.c
parent30b11ae4f9cfd2f33044d64894292593d2aa5e45 (diff)
downloadgsoc2013-evolution-1c2eec1fd409b7ec7a6742684c678bcd258aec53.tar
gsoc2013-evolution-1c2eec1fd409b7ec7a6742684c678bcd258aec53.tar.gz
gsoc2013-evolution-1c2eec1fd409b7ec7a6742684c678bcd258aec53.tar.bz2
gsoc2013-evolution-1c2eec1fd409b7ec7a6742684c678bcd258aec53.tar.lz
gsoc2013-evolution-1c2eec1fd409b7ec7a6742684c678bcd258aec53.tar.xz
gsoc2013-evolution-1c2eec1fd409b7ec7a6742684c678bcd258aec53.tar.zst
gsoc2013-evolution-1c2eec1fd409b7ec7a6742684c678bcd258aec53.zip
reinstate file.
2000-10-02 Chris Toshok <toshok@helixcode.com> * tree-expanded.xpm: reinstate file. * tree-unexpanded.xpm: same. * e-tree-example-1.c (main): remove calls to e_cursor_*, and don't create pixbufs. let's the tree give us the defaults. * e-tree-model.c (e_tree_model_node_changed): call e_table_model_row_changed on the node's row (if it's visible). (e_tree_model_node_inserted): call e_table_model_row_inserted on the new node's row, if it's visible. (e_tree_model_node_removed): call e_table_model_row_removed on the old node's row, if it was visible. * e-cell-tree.c (e_cell_tree_construct): allow open_pixbuf and closed_pixbuf to be NULL, and default them to the xpm data in rtee-{un}expanded.xpm. (ect_destroy): call gdk_pixbuf_unref on our open/closed pixbufs. * tree-expanded.xpm, tree-unexpanded.xpm: make the + and - a little lighter than straight black. svn path=/trunk/; revision=5660
Diffstat (limited to 'widgets/table/e-cell-tree.c')
-rw-r--r--widgets/table/e-cell-tree.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c
index dfeb2c515a..0d159ded19 100644
--- a/widgets/table/e-cell-tree.c
+++ b/widgets/table/e-cell-tree.c
@@ -31,6 +31,9 @@
#include <ctype.h>
#include <math.h>
+#include "tree-expanded.xpm"
+#include "tree-unexpanded.xpm"
+
#define PARENT_TYPE e_cell_get_type ()
typedef struct {
@@ -572,6 +575,9 @@ ect_destroy (GtkObject *object)
/* destroy our subcell */
gtk_object_destroy (GTK_OBJECT (ect->subcell));
+ gdk_pixbuf_unref (ect->open_pixbuf);
+ gdk_pixbuf_unref (ect->closed_pixbuf);
+
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
@@ -609,8 +615,15 @@ e_cell_tree_construct (ECellTree *ect,
ECell *subcell)
{
ect->subcell = subcell;
- ect->open_pixbuf = open_pixbuf;
- ect->closed_pixbuf = closed_pixbuf;
+ if (open_pixbuf)
+ ect->open_pixbuf = open_pixbuf;
+ else
+ ect->open_pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **)tree_expanded_xpm);
+ if (closed_pixbuf)
+ ect->closed_pixbuf = closed_pixbuf;
+ else
+ ect->closed_pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **)tree_unexpanded_xpm);
+
ect->draw_lines = draw_lines;
}