From fcda5ec759395e2a9d658ebcf3616943793a7a28 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 9 Jul 2001 15:22:24 +0000 Subject: Do the autosave_manager_unregister at shutdown time instead of destroy * e-msg-composer.c (composer_shutdown): Do the autosave_manager_unregister at shutdown time instead of destroy time (by which point the contents of the window, including the remote editor control, will have already been destroyed). svn path=/trunk/; revision=10913 --- composer/ChangeLog | 7 +++++++ composer/e-msg-composer.c | 15 +++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/composer/ChangeLog b/composer/ChangeLog index 754996d15a..b04027bf62 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,10 @@ +2001-07-09 Dan Winship + + * e-msg-composer.c (composer_shutdown): Do the + autosave_manager_unregister at shutdown time instead of destroy + time (by which point the contents of the window, including the + remote editor control, will have already been destroyed). + 2001-07-09 Zbigniew Chyla * e-msg-composer-select-file.c: Added missing #include to diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 7447f9db0e..f84d237fc2 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1880,6 +1880,18 @@ from_changed_cb (EMsgComposerHdrs *hdrs, /* GtkObject methods. */ +static void +composer_shutdown (GtkObject *object) +{ + /* When destroy() is called, the contents of the window + * (including the remote editor control) will already have + * been destroyed, so we have to do this here. + */ + autosave_manager_unregister (am, E_MSG_COMPOSER (object)); + if (GTK_OBJECT_CLASS (parent_class)->shutdown != NULL) + (* GTK_OBJECT_CLASS (parent_class)->shutdown) (object); +} + static void destroy (GtkObject *object) { @@ -1888,8 +1900,6 @@ destroy (GtkObject *object) composer = E_MSG_COMPOSER (object); - autosave_manager_unregister (am, composer); - CORBA_exception_init (&ev); if (composer->config_db) { @@ -2055,6 +2065,7 @@ class_init (EMsgComposerClass *klass) object_class = GTK_OBJECT_CLASS (klass); widget_class = GTK_WIDGET_CLASS (klass); + object_class->shutdown = composer_shutdown; object_class->destroy = destroy; widget_class->delete_event = delete_event; -- cgit