# HG changeset patch # User Mark Doliner # Date 1104388013 0 # Node ID 577fdf4110fcb188f89bc88d120aaa19014f69f1 # Parent 0349cb9aa5a4eb42313ad92c5d2961b5f613979d [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 diff -r 0349cb9aa5a4 -r 577fdf4110fc src/plugin.c --- 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 */ } diff -r 0349cb9aa5a4 -r 577fdf4110fc src/plugin.h --- 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);