Mercurial > pidgin
comparison plugins/gevolution/gevolution.c @ 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 | a9fb4493ae22 |
| children | ff4be2d1401d |
comparison
equal
deleted
inserted
replaced
| 10054:ecb2384d4bab | 10055:0436734708fa |
|---|---|
| 249 } | 249 } |
| 250 | 250 |
| 251 static gboolean | 251 static gboolean |
| 252 plugin_load(GaimPlugin *plugin) | 252 plugin_load(GaimPlugin *plugin) |
| 253 { | 253 { |
| 254 if (!bonobo_init_full(NULL, NULL, bonobo_activation_orb_get(), | |
| 255 CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) | |
| 256 { | |
| 257 gaim_debug_error("evolution", "Unable to initialize bonobo.\n"); | |
| 258 return FALSE; | |
| 259 } | |
| 260 | |
| 261 bonobo_activate(); | 254 bonobo_activate(); |
| 262 | 255 |
| 263 backup_blist_ui_ops = gaim_blist_get_ui_ops(); | 256 backup_blist_ui_ops = gaim_blist_get_ui_ops(); |
| 264 | 257 |
| 265 blist_ui_ops = g_memdup(backup_blist_ui_ops, sizeof(GaimBlistUiOps)); | 258 blist_ui_ops = g_memdup(backup_blist_ui_ops, sizeof(GaimBlistUiOps)); |
| 296 { | 289 { |
| 297 g_object_unref(book); | 290 g_object_unref(book); |
| 298 book = NULL; | 291 book = NULL; |
| 299 } | 292 } |
| 300 | 293 |
| 294 return TRUE; | |
| 295 } | |
| 296 | |
| 297 static void | |
| 298 plugin_destroy(GaimPlugin *plugin) | |
| 299 { | |
| 301 bonobo_debug_shutdown(); | 300 bonobo_debug_shutdown(); |
| 302 | |
| 303 return TRUE; | |
| 304 } | |
| 305 | |
| 306 static void | |
| 307 plugin_destroy(GaimPlugin *plugin) | |
| 308 { | |
| 309 } | 301 } |
| 310 | 302 |
| 311 static void | 303 static void |
| 312 autoadd_toggled_cb(GtkCellRendererToggle *renderer, gchar *path_str, | 304 autoadd_toggled_cb(GtkCellRendererToggle *renderer, gchar *path_str, |
| 313 gpointer data) | 305 gpointer data) |
| 503 * | 495 * |
| 504 * So, in conclusion, this is an evil hack, but it doesn't harm anything | 496 * So, in conclusion, this is an evil hack, but it doesn't harm anything |
| 505 * and it works. | 497 * and it works. |
| 506 */ | 498 */ |
| 507 g_module_make_resident(plugin->handle); | 499 g_module_make_resident(plugin->handle); |
| 500 | |
| 501 if (!bonobo_init_full(NULL, NULL, bonobo_activation_orb_get(), | |
| 502 CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) | |
| 503 { | |
| 504 gaim_debug_error("evolution", "Unable to initialize bonobo.\n"); | |
| 505 } | |
| 508 } | 506 } |
| 509 | 507 |
| 510 GAIM_INIT_PLUGIN(gevolution, init_plugin, info) | 508 GAIM_INIT_PLUGIN(gevolution, init_plugin, info) |
