Mercurial > pidgin
diff src/plugins.c @ 1710:f42ce672c560
[gaim-migrate @ 1720]
various fixes (for plugins especially), other updates. made WEBSITE macro so it's easy to change (not that i think it'll be changing again), updated some files to reflect that change.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 13 Apr 2001 10:50:33 +0000 |
parents | 865a6ead3258 |
children | 560b3117aedf |
line wrap: on
line diff
--- a/src/plugins.c Fri Apr 13 08:15:44 2001 +0000 +++ b/src/plugins.c Fri Apr 13 10:50:33 2001 +0000 @@ -136,7 +136,8 @@ return; } - load_plugin(file); + if (file) + load_plugin(file); if (plugin_dialog) gtk_widget_destroy(plugin_dialog); @@ -154,12 +155,10 @@ if (!g_module_supported()) return; - if (filename == NULL) - return; - if (strlen(filename) == 0) + if (filename && !strlen(filename)) return; - while (c) { + while (filename && c) { plug = (struct gaim_plugin *)c->data; if (!strcmp(filename, g_module_name(plug->handle))) { void (*gaim_plugin_remove)(); @@ -174,9 +173,11 @@ } plug = g_malloc(sizeof *plug); - if (last_dir) - g_free(last_dir); - last_dir = g_dirname(filename); + if (filename) { + if (last_dir) + g_free(last_dir); + last_dir = g_dirname(filename); + } debug_printf("Loading %s\n", filename); plug->handle = g_module_open(filename, 0); @@ -234,6 +235,16 @@ save_prefs(); } +char *gaim_plugin_init(GModule *mod) +{ + void (*asdf)(void *); + char *(*gem)(); + g_module_symbol(mod, "do_stuff", (gpointer *)&asdf); + g_module_symbol(mod, "gem", (gpointer *)&gem); + asdf(gem); + return NULL; +} + void show_plugins(GtkWidget *w, gpointer data) { /* most of this code was shamelessly stolen from prefs.c */