aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table')
-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,