diff options
Diffstat (limited to 'calendar/gui/dialogs/comp-editor.c')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 5b80de6bee..433a9879aa 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -242,6 +242,7 @@ comp_editor_destroy (GtkObject *object) { CompEditor *editor; CompEditorPrivate *priv; + GList *l; editor = COMP_EDITOR (object); priv = editor->priv; @@ -251,6 +252,12 @@ comp_editor_destroy (GtkObject *object) priv->window = NULL; } + /* We want to destroy the pages after the widgets get destroyed, + since they have lots of signal handlers connected to the widgets + with the pages as the data. */ + for (l = priv->pages; l != NULL; l = l->next) + gtk_object_unref (GTK_OBJECT (l->data)); + gtk_signal_disconnect_by_data (GTK_OBJECT (priv->client), editor); g_free (priv); @@ -807,15 +814,11 @@ static void close_dialog (CompEditor *editor) { CompEditorPrivate *priv; - GList *l; priv = editor->priv; g_assert (priv->window != NULL); - for (l = priv->pages; l != NULL; l = l->next) - gtk_object_unref (GTK_OBJECT (l->data)); - gtk_object_destroy (GTK_OBJECT (editor)); } |