diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-02-27 12:06:20 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-02-27 12:06:20 +0800 |
commit | c7b0f21667190f7705c10b8cf4d7a13bd882008f (patch) | |
tree | 0139a3ed49c2579d9864b5d0d4e4807a65bdd460 /widgets/table/e-table.c | |
parent | a75e12466d16f6c17d558de205bd0991485101cc (diff) | |
download | gsoc2013-evolution-c7b0f21667190f7705c10b8cf4d7a13bd882008f.tar.gz gsoc2013-evolution-c7b0f21667190f7705c10b8cf4d7a13bd882008f.tar.zst gsoc2013-evolution-c7b0f21667190f7705c10b8cf4d7a13bd882008f.zip |
Prevent `gtk_signal_disconnect()' warnings when destroying a
non-grouping ETable by only disconnecting the signals that are
actually connected.
svn path=/trunk/; revision=8401
Diffstat (limited to 'widgets/table/e-table.c')
-rw-r--r-- | widgets/table/e-table.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index abda473a97..ec58ad5186 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -121,16 +121,24 @@ static gint et_focus (GtkContainer *container, GtkDirectionType direction); static void et_disconnect_model (ETable *et) { - gtk_signal_disconnect (GTK_OBJECT (et->model), - et->table_model_change_id); - gtk_signal_disconnect (GTK_OBJECT (et->model), - et->table_row_change_id); - gtk_signal_disconnect (GTK_OBJECT (et->model), - et->table_cell_change_id); - gtk_signal_disconnect (GTK_OBJECT (et->model), - et->table_row_inserted_id); - gtk_signal_disconnect (GTK_OBJECT (et->model), - et->table_row_deleted_id); + if (et->model == NULL) + return; + + if (et->table_model_change_id != 0) + gtk_signal_disconnect (GTK_OBJECT (et->model), + et->table_model_change_id); + if (et->table_row_change_id != 0) + gtk_signal_disconnect (GTK_OBJECT (et->model), + et->table_row_change_id); + if (et->table_cell_change_id != 0) + gtk_signal_disconnect (GTK_OBJECT (et->model), + et->table_cell_change_id); + if (et->table_row_inserted_id != 0) + gtk_signal_disconnect (GTK_OBJECT (et->model), + et->table_row_inserted_id); + if (et->table_row_deleted_id != 0) + gtk_signal_disconnect (GTK_OBJECT (et->model), + et->table_row_deleted_id); et->table_model_change_id = 0; et->table_row_change_id = 0; |