aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/table/e-table-item.c17
-rw-r--r--widgets/table/e-tree-table-adapter.c1
2 files changed, 13 insertions, 5 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index ff8dd64292..5acaa5a141 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -789,9 +789,10 @@ eti_show_cursor (ETableItem *eti, int delay)
"cursor_row", &cursor_row,
NULL);
+ d(g_print ("%s: cursor row: %d\n", __FUNCTION__, cursor_row));
+
if (cursor_row != -1) {
cursor_row = model_to_view_row (eti, cursor_row);
- d(g_print ("%s: cursor row: %d\n", __FUNCTION__, cursor_row));
eti_request_region_show (eti,
0, cursor_row, eti->cols + 1, cursor_row + 1,
delay);
@@ -838,6 +839,8 @@ eti_check_cursor_bounds (ETableItem *eti)
return;
}
+ d(g_print ("%s: model cursor row: %d\n", __FUNCTION__, cursor_row));
+
cursor_row = model_to_view_row (eti, cursor_row);
d(g_print ("%s: cursor row: %d\n", __FUNCTION__, cursor_row));
@@ -864,11 +867,12 @@ eti_maybe_show_cursor(ETableItem *eti, int delay)
}
static gboolean
-eti_idle_maybe_show_cursor_cb (gpointer data)
+eti_idle_show_cursor_cb (gpointer data)
{
ETableItem *eti = data;
if (!GTK_OBJECT_DESTROYED (eti)) {
- eti_maybe_show_cursor (eti, 0);
+ eti_show_cursor (eti, 0);
+ eti_check_cursor_bounds (eti);
}
gtk_object_unref (GTK_OBJECT (eti));
return FALSE;
@@ -877,8 +881,11 @@ eti_idle_maybe_show_cursor_cb (gpointer data)
static void
eti_idle_maybe_show_cursor(ETableItem *eti)
{
- gtk_object_ref (GTK_OBJECT (eti));
- g_idle_add (eti_idle_maybe_show_cursor_cb, eti);
+ d(g_print ("%s: cursor on screen: %s\n", __FUNCTION__, eti->cursor_on_screen ? "TRUE" : "FALSE"));
+ if (eti->cursor_on_screen) {
+ gtk_object_ref (GTK_OBJECT (eti));
+ g_idle_add (eti_idle_show_cursor_cb, eti);
+ }
}
static void
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index 2533b9a4da..f21060d370 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -969,6 +969,7 @@ void e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta, ET
else if (row != 0)
e_table_model_row_changed(E_TABLE_MODEL(etta), row - 1);
+ e_table_model_pre_change (E_TABLE_MODEL(etta));
if (expanded) {
int num_children = array_size_from_path(etta, path) - 1;
etta_expand_to(etta, etta->priv->n_map + num_children);