From 93f5add73131b2a22d6671645c06148cd4fe7eab Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 6 Dec 2000 18:15:31 +0000 Subject: disconnect the "group_info_changed" signal on the old sort_info and * e-table.c (e_table_set_state_object): disconnect the "group_info_changed" signal on the old sort_info and connect it to the new one. (Noticed because of a gtk warning in et_destroy, but probably fixes some actual bug(s) too.) svn path=/trunk/; revision=6809 --- widgets/table/e-table.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'widgets/table/e-table.c') diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 6da35fea39..e55e9ee010 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -731,11 +731,21 @@ e_table_set_state_object(ETable *e_table, ETableState *state) if (e_table->header) gtk_object_ref(GTK_OBJECT(e_table->header)); - if (e_table->sort_info) + if (e_table->sort_info) { + if (e_table->group_info_change_id) + gtk_signal_disconnect (GTK_OBJECT (e_table->sort_info), + e_table->group_info_change_id); gtk_object_unref(GTK_OBJECT(e_table->sort_info)); + } e_table->sort_info = state->sort_info; - if (e_table->sort_info) + if (e_table->sort_info) { gtk_object_ref(GTK_OBJECT(e_table->sort_info)); + e_table->group_info_change_id = + gtk_signal_connect (GTK_OBJECT (e_table->sort_info), + "group_info_changed", + GTK_SIGNAL_FUNC (sort_info_changed), + e_table); + } if (e_table->header_item) gtk_object_set(GTK_OBJECT(e_table->header_item), -- cgit v1.2.3