From ac07e6a338f1dba0a4c5a5d044bb58b01e82a211 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Fri, 12 Oct 2001 05:23:47 +0000 Subject: [Hopefully really, finally fix #8615 and friends.] * main.c (no_views_left_cb): Invoke `e_shell_disconnect_db()' before unreffing the shell. * e-shell.c (e_shell_disconnect_db): New. (destroy): Call it instead of unreffing the db manually here. svn path=/trunk/; revision=13616 --- shell/e-shell.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'shell/e-shell.c') diff --git a/shell/e-shell.c b/shell/e-shell.c index 65a469bcf2..1f8628c2fe 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -766,10 +766,7 @@ destroy (GtkObject *object) shell = E_SHELL (object); priv = shell->priv; - if (shell->priv->db != CORBA_OBJECT_NIL) { - bonobo_object_release_unref (shell->priv->db, NULL); - shell->priv->db = CORBA_OBJECT_NIL; - } + e_shell_disconnect_db (shell); if (priv->iid != NULL) oaf_active_server_unregister (priv->iid, bonobo_object_corba_objref (BONOBO_OBJECT (shell))); @@ -1678,6 +1675,8 @@ e_shell_get_user_creatable_items_handler (EShell *shell) } +/* FIXME: These are ugly hacks, they really should not be needed. */ + void e_shell_unregister_all (EShell *shell) { @@ -1693,6 +1692,22 @@ e_shell_unregister_all (EShell *shell) priv->component_registry = NULL; } +void +e_shell_disconnect_db (EShell *shell) +{ + EShellPrivate *priv; + + g_return_if_fail (E_IS_SHELL (shell)); + + priv = shell->priv; + + if (priv->db == CORBA_OBJECT_NIL) + return; + + bonobo_object_release_unref (priv->db, NULL); + priv->db = CORBA_OBJECT_NIL; +} + const char * e_shell_construct_result_to_string (EShellConstructResult result) -- cgit v1.2.3