Mercurial > pidgin.yaz
changeset 10450:577fdf4110fc
[gaim-migrate @ 11715]
Alternate solution to the problem Andrew Wellington attempted to fix in
sf patch #844426, "Protocol plugins not loaded if GAIM_PLUGINS is
disabled"
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 30 Dec 2004 06:26:53 +0000 |
parents | 0349cb9aa5a4 |
children | 92d4a25fd33c |
files | src/plugin.c src/plugin.h |
diffstat | 2 files changed, 19 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugin.c Wed Dec 29 23:42:54 2004 +0000 +++ b/src/plugin.c Thu Dec 30 06:26:53 2004 +0000 @@ -820,7 +820,6 @@ #endif /* GAIM_PLUGINS */ } -/* TODO: Change this to accept a GList* */ void gaim_plugins_load_saved(const char *key) { @@ -967,6 +966,20 @@ if (probe_cb != NULL) probe_cb(probe_cb_data); +#else /* GAIM_PLUGINS */ + /* We just need to populate the protocol_plugins list with all the PRPLs */ + GList *cur; + GaimPlugin *plugin; + + for (cur = plugins; cur != NULL; cur = cur->next) + { + plugin = cur->data; + if (plugin->info->type == GAIM_PLUGIN_PROTOCL) + protocol_plugins = g_list_insert_sorted(protocol_plugins, plugin, + (GCompareFunc)compare_prpl); + } + + #endif /* GAIM_PLUGINS */ }
--- a/src/plugin.h Wed Dec 29 23:42:54 2004 +0000 +++ b/src/plugin.h Thu Dec 30 06:26:53 2004 +0000 @@ -85,6 +85,11 @@ char *author; char *homepage; + /* + * TODO: I think the intention was the allow multiple load and unload + * callback functions. Perhaps using a GList instead of a pointer to + * 1 function. + */ gboolean (*load)(GaimPlugin *plugin); gboolean (*unload)(GaimPlugin *plugin); void (*destroy)(GaimPlugin *plugin);