aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell-tree.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-04-15 21:03:26 +0800
committerChris Lahey <clahey@src.gnome.org>2001-04-15 21:03:26 +0800
commit61353c59dcb175818ce98d9b4c7706026edbf395 (patch)
treeb9c9d631572c6ab9a1a5e7d1f078b2b5b379c639 /widgets/table/e-cell-tree.c
parent15541de2db8a7475e33c439e5640d9b89559a176 (diff)
downloadgsoc2013-evolution-61353c59dcb175818ce98d9b4c7706026edbf395.tar
gsoc2013-evolution-61353c59dcb175818ce98d9b4c7706026edbf395.tar.gz
gsoc2013-evolution-61353c59dcb175818ce98d9b4c7706026edbf395.tar.bz2
gsoc2013-evolution-61353c59dcb175818ce98d9b4c7706026edbf395.tar.lz
gsoc2013-evolution-61353c59dcb175818ce98d9b4c7706026edbf395.tar.xz
gsoc2013-evolution-61353c59dcb175818ce98d9b4c7706026edbf395.tar.zst
gsoc2013-evolution-61353c59dcb175818ce98d9b4c7706026edbf395.zip
Set "bold" argument on created tooltip. Adjusted position of displayed
2001-04-15 Christopher James Lahey <clahey@ximian.com> * e-cell-text.c (ect_show_tooltip): Set "bold" argument on created tooltip. Adjusted position of displayed tooltip. * e-cell-tree.c (offset_of_node): Changed it so that this function handles knowing whether on not to indent non expandable first level nodes. This makes things more consistent. * e-table-item.c (eti_realize): Cleaned up the ETableItem code to properly hide tooltips when going off the screen. * e-table-tooltip.h: Added a visibility_count field to ETableTooltip. svn path=/trunk/; revision=9320
Diffstat (limited to 'widgets/table/e-cell-tree.c')
-rw-r--r--widgets/table/e-cell-tree.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c
index fb9bbb511f..af5997eed1 100644
--- a/widgets/table/e-cell-tree.c
+++ b/widgets/table/e-cell-tree.c
@@ -82,7 +82,15 @@ visible_depth_of_node (ETableModel *model, int row)
static gint
offset_of_node (ETableModel *table_model, int row)
{
- return (visible_depth_of_node(table_model, row) + 1) * INDENT_AMOUNT;
+ ETreeModel *tree_model = e_cell_tree_get_tree_model(table_model, row);
+ ETreePath path = e_cell_tree_get_node(table_model, row);
+
+ if (visible_depth_of_node (table_model, row) > 0 ||
+ e_tree_model_node_is_expandable(tree_model, path)) {
+ return (visible_depth_of_node(table_model, row) + 1) * INDENT_AMOUNT;
+ } else {
+ return 0;
+ }
}
/*
@@ -179,7 +187,6 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
gboolean selected;
int offset, subcell_offset;
- gboolean expanded, expandable;
selected = flags & E_CELL_SELECTED;
@@ -191,14 +198,7 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
node = e_cell_tree_get_node (ecell_view->e_table_model, row);
- expandable = e_tree_model_node_is_expandable (tree_model, node);
- expanded = e_tree_table_adapter_node_is_expanded (tree_table_adapter, node);
-
- if (visible_depth_of_node (ecell_view->e_table_model, row) > 0 || expandable) {
- offset = offset_of_node (ecell_view->e_table_model, row);
- } else {
- offset = 0;
- }
+ offset = offset_of_node (ecell_view->e_table_model, row);
subcell_offset = offset;
node_image = e_tree_model_icon_at (tree_model, node);
@@ -272,11 +272,11 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
}
/* now draw our icon if we're expandable */
- if (expandable) {
+ if (e_tree_model_node_is_expandable (tree_model, node)) {
GdkPixbuf *image;
int image_width, image_height;
- image = (expanded
+ image = (e_tree_table_adapter_node_is_expanded (tree_table_adapter, node)
? E_CELL_TREE(tree_view->cell_view.ecell)->open_pixbuf
: E_CELL_TREE(tree_view->cell_view.ecell)->closed_pixbuf);