changeset 10055:0436734708fa

[gaim-migrate @ 11020] Patch by Henry Jen to move bonobo initialization to plugin_init in the gevolution plugin, so that we don't have nasty crashes when reloading the plugin. Patch #1007696, fixes bug #982076. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 20 Sep 2004 03:32:57 +0000
parents ecb2384d4bab
children b566449d45f8
files plugins/gevolution/gevolution.c
diffstat 1 files changed, 7 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/gevolution/gevolution.c	Mon Sep 20 03:23:59 2004 +0000
+++ b/plugins/gevolution/gevolution.c	Mon Sep 20 03:32:57 2004 +0000
@@ -251,13 +251,6 @@
 static gboolean
 plugin_load(GaimPlugin *plugin)
 {
-	if (!bonobo_init_full(NULL, NULL, bonobo_activation_orb_get(),
-						  CORBA_OBJECT_NIL, CORBA_OBJECT_NIL))
-	{
-		gaim_debug_error("evolution", "Unable to initialize bonobo.\n");
-		return FALSE;
-	}
-
 	bonobo_activate();
 
 	backup_blist_ui_ops = gaim_blist_get_ui_ops();
@@ -298,14 +291,13 @@
 		book = NULL;
 	}
 
-	bonobo_debug_shutdown();
-
 	return TRUE;
 }
 
 static void
 plugin_destroy(GaimPlugin *plugin)
 {
+	bonobo_debug_shutdown();
 }
 
 static void
@@ -505,6 +497,12 @@
 	 * and it works.
 	 */
 	g_module_make_resident(plugin->handle);
+
+	if (!bonobo_init_full(NULL, NULL, bonobo_activation_orb_get(),
+						  CORBA_OBJECT_NIL, CORBA_OBJECT_NIL))
+	{
+		gaim_debug_error("evolution", "Unable to initialize bonobo.\n");
+	}
 }
 
 GAIM_INIT_PLUGIN(gevolution, init_plugin, info)