aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-tree.c
diff options
context:
space:
mode:
authorRichard Hult <rhult@codefactory.se>2001-04-04 08:20:16 +0800
committerChris Lahey <clahey@src.gnome.org>2001-04-04 08:20:16 +0800
commit71452a5477aaeed8606fc864ab63246dc81eb698 (patch)
treeba342574d24a58b57674f7a181341c1fc3d3ddbb /widgets/table/e-tree.c
parentc7179850dc119bd6c1a250b5892eee28a92c3e58 (diff)
downloadgsoc2013-evolution-71452a5477aaeed8606fc864ab63246dc81eb698.tar.gz
gsoc2013-evolution-71452a5477aaeed8606fc864ab63246dc81eb698.tar.zst
gsoc2013-evolution-71452a5477aaeed8606fc864ab63246dc81eb698.zip
Add argument to get the table adapter. (et_set_arg): Add arguments for
2001-04-03 Richard Hult <rhult@codefactory.se> * e-tree.c (et_get_arg): Add argument to get the table adapter. (et_set_arg): Add arguments for setting drawing of the grid and focus. * e-tree-model.c, e-tree-model.h (e_tree_model_node_traverse): Fill in missing implementation. (e_tree_model_node_traverse_preorder): Likewise, but preorder traversal. svn path=/trunk/; revision=9156
Diffstat (limited to 'widgets/table/e-tree.c')
-rw-r--r--widgets/table/e-tree.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index fe8576175f..014009a41a 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -68,6 +68,10 @@ enum {
enum {
ARG_0,
ARG_LENGTH_THRESHOLD,
+ ARG_HORIZONTAL_DRAW_GRID,
+ ARG_VERTICAL_DRAW_GRID,
+ ARG_DRAW_FOCUS,
+ ARG_ETTA
};
struct ETreePriv {
@@ -1128,7 +1132,15 @@ e_tree_get_printable (ETree *e_tree)
static void
et_get_arg (GtkObject *o, GtkArg *arg, guint arg_id)
{
+ ETree *etree = E_TREE (o);
+
switch (arg_id){
+ case ARG_ETTA:
+ if (etree->priv->item) {
+ GTK_VALUE_OBJECT (*arg) = GTK_OBJECT (etree->priv->etta);
+ }
+ break;
+
default:
break;
}
@@ -1154,6 +1166,32 @@ et_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
}
break;
+ case ARG_HORIZONTAL_DRAW_GRID:
+ etree->priv->horizontal_draw_grid = GTK_VALUE_BOOL (*arg);
+ if (etree->priv->item) {
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM(etree->priv->item),
+ "horizontal_draw_grid", GTK_VALUE_BOOL (*arg),
+ NULL);
+ }
+ break;
+
+ case ARG_VERTICAL_DRAW_GRID:
+ etree->priv->vertical_draw_grid = GTK_VALUE_BOOL (*arg);
+ if (etree->priv->item) {
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM(etree->priv->item),
+ "vertical_draw_grid", GTK_VALUE_BOOL (*arg),
+ NULL);
+ }
+ break;
+
+ case ARG_DRAW_FOCUS:
+ etree->priv->draw_focus = GTK_VALUE_BOOL (*arg);
+ if (etree->priv->item) {
+ gnome_canvas_item_set (GNOME_CANVAS_ITEM(etree->priv->item),
+ "draw_focus", GTK_VALUE_BOOL (*arg),
+ NULL);
+ }
+ break;
}
}
@@ -2138,6 +2176,14 @@ e_tree_class_init (ETreeClass *class)
gtk_object_add_arg_type ("ETree::length_threshold", GTK_TYPE_INT,
GTK_ARG_WRITABLE, ARG_LENGTH_THRESHOLD);
+ gtk_object_add_arg_type ("ETree::horizontal_draw_grid", GTK_TYPE_BOOL,
+ GTK_ARG_WRITABLE, ARG_HORIZONTAL_DRAW_GRID);
+ gtk_object_add_arg_type ("ETree::vertical_draw_grid", GTK_TYPE_BOOL,
+ GTK_ARG_WRITABLE, ARG_VERTICAL_DRAW_GRID);
+ gtk_object_add_arg_type ("ETree::draw_focus", GTK_TYPE_BOOL,
+ GTK_ARG_WRITABLE, ARG_DRAW_FOCUS);
+ gtk_object_add_arg_type ("ETree::ETreeTableAdapter", GTK_TYPE_OBJECT,
+ GTK_ARG_READABLE, ARG_ETTA);
}
E_MAKE_TYPE(e_tree, "ETree", ETree, e_tree_class_init, e_tree_init, PARENT_TYPE);