aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-10-23 11:12:52 +0800
committerChris Lahey <clahey@src.gnome.org>2001-10-23 11:12:52 +0800
commit47c416da080879535fe16ef4e39552c99ec17746 (patch)
tree5b227ed19ef3d4c8c60828bf8ff926ff2115ba4f
parent96d4476b5ecd1d836915a062971d7a514eb3033f (diff)
downloadgsoc2013-evolution-47c416da080879535fe16ef4e39552c99ec17746.tar
gsoc2013-evolution-47c416da080879535fe16ef4e39552c99ec17746.tar.gz
gsoc2013-evolution-47c416da080879535fe16ef4e39552c99ec17746.tar.bz2
gsoc2013-evolution-47c416da080879535fe16ef4e39552c99ec17746.tar.lz
gsoc2013-evolution-47c416da080879535fe16ef4e39552c99ec17746.tar.xz
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
-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);