diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-05-26 04:57:04 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-05-26 04:57:04 +0800 |
commit | 9e14fe9c69d4b07b87721b3895c3b75474efd7b4 (patch) | |
tree | aaa51b51bf5a99cac08c39a0cf9db6cc7deca629 /widgets | |
parent | 092c91db21cc124976eec1949fecf9f38c5871f6 (diff) | |
download | gsoc2013-evolution-9e14fe9c69d4b07b87721b3895c3b75474efd7b4.tar gsoc2013-evolution-9e14fe9c69d4b07b87721b3895c3b75474efd7b4.tar.gz gsoc2013-evolution-9e14fe9c69d4b07b87721b3895c3b75474efd7b4.tar.bz2 gsoc2013-evolution-9e14fe9c69d4b07b87721b3895c3b75474efd7b4.tar.lz gsoc2013-evolution-9e14fe9c69d4b07b87721b3895c3b75474efd7b4.tar.xz gsoc2013-evolution-9e14fe9c69d4b07b87721b3895c3b75474efd7b4.tar.zst gsoc2013-evolution-9e14fe9c69d4b07b87721b3895c3b75474efd7b4.zip |
Remove row i instead of row row. Destroy et->group when you get the
2001-05-25 Christopher James Lahey <clahey@ximian.com>
* e-table.c (et_table_rows_deleted): Remove row i instead of row
row. Destroy et->group when you get the changed or
sort_info_changed signal instead of in the idle handler.
svn path=/trunk/; revision=10002
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/table/e-table.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 2112b2ee2d..9293965824 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -307,8 +307,11 @@ sort_info_changed (ETableSortInfo *info, ETable *et) gboolean will_be_grouped = e_table_sort_info_grouping_get_count(info) > 0; if (et->is_grouped || will_be_grouped) { et->need_rebuild = TRUE; - if (!et->rebuild_idle_id) + if (!et->rebuild_idle_id) { + gtk_object_destroy (GTK_OBJECT (et->group)); + et->group = NULL; et->rebuild_idle_id = g_idle_add_full (20, changed_idle, et, NULL); + } } } @@ -529,8 +532,11 @@ static void et_table_model_changed (ETableModel *model, ETable *et) { et->need_rebuild = TRUE; - if (!et->rebuild_idle_id) + if (!et->rebuild_idle_id) { + gtk_object_destroy (GTK_OBJECT (et->group)); + et->group = NULL; et->rebuild_idle_id = g_idle_add_full (20, changed_idle, et, NULL); + } } static void @@ -573,7 +579,7 @@ et_table_rows_deleted (ETableModel *table_model, int row, int count, ETable *et) if (!et->need_rebuild) { int i; for (i = 0; i < count; i++) - e_table_group_remove (et->group, row); + e_table_group_remove (et->group, i); if (row != row_count) e_table_group_decrement(et->group, row, count); if (et->horizontal_scrolling) @@ -650,7 +656,8 @@ changed_idle (gpointer data) ETable *et = E_TABLE (data); if (et->need_rebuild) { - gtk_object_destroy (GTK_OBJECT (et->group)); + if (et->group) + gtk_object_destroy (GTK_OBJECT (et->group)); et_build_groups(et); gtk_object_set (GTK_OBJECT (et->canvas_vbox), "width", (double) GTK_WIDGET (et->table_canvas)->allocation.width, |