diff options
-rw-r--r-- | widgets/table/e-table-item.c | 24 | ||||
-rw-r--r-- | widgets/table/e-tree-selection-model.c | 24 |
2 files changed, 35 insertions, 13 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 473901bf67..794c64dc84 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -816,6 +816,24 @@ eti_maybe_show_cursor(ETableItem *eti, int delay) eti_check_cursor_bounds (eti); } +static gboolean +eti_idle_maybe_show_cursor_cb (gpointer data) +{ + ETableItem *eti = data; + if (!GTK_OBJECT_DESTROYED (eti)) { + eti_maybe_show_cursor (eti, 0); + } + gtk_object_unref (GTK_OBJECT (eti)); + return FALSE; +} + +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); +} + /* * Callback routine: invoked before the ETableModel has suffers a change */ @@ -845,7 +863,7 @@ eti_table_model_changed (ETableModel *table_model, ETableItem *eti) eti->needs_redraw = 1; gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (eti)); - eti_maybe_show_cursor(eti, 0); + eti_idle_maybe_show_cursor(eti); } static void @@ -893,6 +911,8 @@ eti_table_model_rows_inserted (ETableModel *table_model, int row, int count, ETa eti->height_cache[i] = -1; } + eti_idle_maybe_show_cursor(eti); + eti->needs_compute_height = 1; e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (eti)); eti->needs_redraw = 1; @@ -915,6 +935,8 @@ eti_table_model_rows_deleted (ETableModel *table_model, int row, int count, ETab memmove(eti->height_cache + row, eti->height_cache + row + count, (eti->rows - row) * sizeof(int)); } + eti_idle_maybe_show_cursor(eti); + eti->needs_compute_height = 1; e_canvas_item_request_reflow (GNOME_CANVAS_ITEM (eti)); eti->needs_redraw = 1; diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c index 1a17ed2da1..fca526eaf0 100644 --- a/widgets/table/e-tree-selection-model.c +++ b/widgets/table/e-tree-selection-model.c @@ -438,18 +438,18 @@ add_model(ETreeSelectionModel *etsm, ETreeModel *model) return; gtk_object_ref(GTK_OBJECT(priv->model)); - priv->tree_model_pre_change_id = gtk_signal_connect (GTK_OBJECT (priv->model), "pre_change", - GTK_SIGNAL_FUNC (etsm_pre_change), etsm); - priv->tree_model_node_changed_id = gtk_signal_connect (GTK_OBJECT (priv->model), "node_changed", - GTK_SIGNAL_FUNC (etsm_node_changed), etsm); - priv->tree_model_node_data_changed_id = gtk_signal_connect (GTK_OBJECT (priv->model), "node_data_changed", - GTK_SIGNAL_FUNC (etsm_node_data_changed), etsm); - priv->tree_model_node_col_changed_id = gtk_signal_connect (GTK_OBJECT (priv->model), "node_col_changed", - GTK_SIGNAL_FUNC (etsm_node_col_changed), etsm); - priv->tree_model_node_inserted_id = gtk_signal_connect (GTK_OBJECT (priv->model), "node_inserted", - GTK_SIGNAL_FUNC (etsm_node_inserted), etsm); - priv->tree_model_node_removed_id = gtk_signal_connect (GTK_OBJECT (priv->model), "node_removed", - GTK_SIGNAL_FUNC (etsm_node_removed), etsm); + priv->tree_model_pre_change_id = gtk_signal_connect_after (GTK_OBJECT (priv->model), "pre_change", + GTK_SIGNAL_FUNC (etsm_pre_change), etsm); + priv->tree_model_node_changed_id = gtk_signal_connect_after (GTK_OBJECT (priv->model), "node_changed", + GTK_SIGNAL_FUNC (etsm_node_changed), etsm); + priv->tree_model_node_data_changed_id = gtk_signal_connect_after (GTK_OBJECT (priv->model), "node_data_changed", + GTK_SIGNAL_FUNC (etsm_node_data_changed), etsm); + priv->tree_model_node_col_changed_id = gtk_signal_connect_after (GTK_OBJECT (priv->model), "node_col_changed", + GTK_SIGNAL_FUNC (etsm_node_col_changed), etsm); + priv->tree_model_node_inserted_id = gtk_signal_connect_after (GTK_OBJECT (priv->model), "node_inserted", + GTK_SIGNAL_FUNC (etsm_node_inserted), etsm); + priv->tree_model_node_removed_id = gtk_signal_connect_after (GTK_OBJECT (priv->model), "node_removed", + GTK_SIGNAL_FUNC (etsm_node_removed), etsm); } static void |