diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-10-23 11:12:52 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-10-23 11:12:52 +0800 |
commit | 47c416da080879535fe16ef4e39552c99ec17746 (patch) | |
tree | 5b227ed19ef3d4c8c60828bf8ff926ff2115ba4f /widgets/table/e-table-item.c | |
parent | 96d4476b5ecd1d836915a062971d7a514eb3033f (diff) | |
download | gsoc2013-evolution-47c416da080879535fe16ef4e39552c99ec17746.tar.gz gsoc2013-evolution-47c416da080879535fe16ef4e39552c99ec17746.tar.zst gsoc2013-evolution-47c416da080879535fe16ef4e39552c99ec17746.zip |
Make this check immediately for whether to show the cursor, instead of in
2001-10-22 Christopher James Lahey <clahey@ximian.com>
* e-table-item.c (eti_idle_maybe_show_cursor): Make this check
immediately for whether to show the cursor, instead of in the idle
handler.
* e-tree-table-adapter.c (e_tree_table_adapter_node_set_expanded):
Added a pre_change here since we send two changes.
svn path=/trunk/; revision=13931
Diffstat (limited to 'widgets/table/e-table-item.c')
-rw-r--r-- | widgets/table/e-table-item.c | 17 |
1 files changed, 12 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 |