aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMike Kestner <mkestner@ximian.com>2003-04-21 22:18:58 +0800
committerMike Kestner <mkestner@src.gnome.org>2003-04-21 22:18:58 +0800
commit1eba3d38e0be4aa0df3878098a88b507226aca23 (patch)
treee58e95b8891c657c01106738edc1aba0f770748d /widgets
parentfeda331c16630204c5eeb3f022fc218c64abeb76 (diff)
downloadgsoc2013-evolution-1eba3d38e0be4aa0df3878098a88b507226aca23.tar
gsoc2013-evolution-1eba3d38e0be4aa0df3878098a88b507226aca23.tar.gz
gsoc2013-evolution-1eba3d38e0be4aa0df3878098a88b507226aca23.tar.bz2
gsoc2013-evolution-1eba3d38e0be4aa0df3878098a88b507226aca23.tar.lz
gsoc2013-evolution-1eba3d38e0be4aa0df3878098a88b507226aca23.tar.xz
gsoc2013-evolution-1eba3d38e0be4aa0df3878098a88b507226aca23.tar.zst
gsoc2013-evolution-1eba3d38e0be4aa0df3878098a88b507226aca23.zip
use e_tree_table_adapter_node_get_next to determine how to draw sibling
2003-04-21 Mike Kestner <mkestner@ximian.com> * e-cell-tree.c (ect_draw): use e_tree_table_adapter_node_get_next to determine how to draw sibling lines. (ect_print): ditto * e-tree-table-adapter.c (e_t_t_a_node_get_next): new svn path=/trunk/; revision=20902
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/e-cell-tree.c8
-rw-r--r--widgets/table/e-tree-table-adapter.c10
-rw-r--r--widgets/table/e-tree-table-adapter.h2
3 files changed, 16 insertions, 4 deletions
diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c
index a1b92ba7e6..03a454e2c5 100644
--- a/widgets/table/e-cell-tree.c
+++ b/widgets/table/e-cell-tree.c
@@ -264,7 +264,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
rect.x + offset - INDENT_AMOUNT / 2,
rect.y,
rect.x + offset - INDENT_AMOUNT / 2,
- (e_tree_model_node_get_next (tree_model, node)
+ (e_tree_table_adapter_node_get_next (tree_table_adapter, node)
? rect.y + rect.height
: rect.y + rect.height / 2));
}
@@ -276,7 +276,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
offset -= INDENT_AMOUNT;
depth = visible_depth_of_node (ecell_view->e_table_model, row) - 1;
while (parent_node && depth != 0) {
- if (e_tree_model_node_get_next(tree_model, parent_node)) {
+ if (e_tree_table_adapter_node_get_next(tree_table_adapter, parent_node)) {
gdk_draw_line (drawable, tree_view->gc,
rect.x + offset - INDENT_AMOUNT / 2,
rect.y,
@@ -590,7 +590,7 @@ ect_print (ECellView *ecell_view, GnomePrintContext *context,
height);
gnome_print_lineto (context,
offset - INDENT_AMOUNT / 2,
- (e_tree_model_node_get_next (tree_model, node)
+ (e_tree_table_adapter_node_get_next (tree_table_adapter, node)
? 0
: height / 2));
}
@@ -602,7 +602,7 @@ ect_print (ECellView *ecell_view, GnomePrintContext *context,
depth = visible_depth_of_node (ecell_view->e_table_model, row) - 1;
offset -= INDENT_AMOUNT;
while (node && depth != 0) {
- if (e_tree_model_node_get_next(tree_model, node)) {
+ if (e_tree_table_adapter_node_get_next(tree_table_adapter, node)) {
gnome_print_moveto (context,
offset - INDENT_AMOUNT / 2,
height);
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index 8b041eb53c..9264d35fd2 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -1154,3 +1154,13 @@ e_tree_table_adapter_set_sort_info (ETreeTableAdapter *etta, ETableSortInfo *sor
e_table_model_changed(E_TABLE_MODEL(etta));
}
+ETreePath
+e_tree_table_adapter_node_get_next (ETreeTableAdapter *etta, ETreePath path)
+{
+ GNode *node = lookup_gnode (etta, path);
+
+ if (node && node->next)
+ return ((node_t *)node->next->data)->path;
+
+ return NULL;
+}
diff --git a/widgets/table/e-tree-table-adapter.h b/widgets/table/e-tree-table-adapter.h
index a856489a40..8ce1c78097 100644
--- a/widgets/table/e-tree-table-adapter.h
+++ b/widgets/table/e-tree-table-adapter.h
@@ -61,6 +61,8 @@ ETableModel *e_tree_table_adapter_construct (ETreeTableAdapter
ETableSortInfo *sort_info,
ETableHeader *header);
+ETreePath e_tree_table_adapter_node_get_next (ETreeTableAdapter *etta,
+ ETreePath path);
gboolean e_tree_table_adapter_node_is_expanded (ETreeTableAdapter *etta,
ETreePath path);
void e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta,