Mercurial > audlegacy
diff src/audacious/effect.c @ 3437:3092a8b3fe34 trunk
Big plugin system changes (part 1 of who knows, it's still a big mess):
- remove plugin_matrix, replacing it with a mowgli.dictionary of all loaded plugins pointing back to their handles
- input_is_enabled() craq -> gboolean plugin::enabled (this craq was pointed out by ccr)
- consolidate a lot of crap in ui_preferences.c (a LOT more to come)
- introduce probably countless loads of bugs and SIGSEGVs.
- you WILL need to recompile plugins after this, and some which do not use C99-style struct initialisers will likely fail to build.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Fri, 07 Sep 2007 03:20:28 -0500 |
parents | f1c756f39e6c |
children | b0f4ab42dd3b |
line wrap: on
line diff
--- a/src/audacious/effect.c Fri Sep 07 02:02:53 2007 -0500 +++ b/src/audacious/effect.c Fri Sep 07 03:20:28 2007 -0500 @@ -76,6 +76,7 @@ NULL, NULL, NULL, + TRUE, effect_do_mod_samples, effect_do_query_format }; @@ -137,13 +138,14 @@ if (!node || !(node->data)) return; ep = node->data; + ep->enabled = enable; - if (enable && !g_list_find(ep_data.enabled_list, ep)) { + if (enable && !ep->enabled) { ep_data.enabled_list = g_list_append(ep_data.enabled_list, ep); if (ep->init) ep->init(); } - else if (!enable && g_list_find(ep_data.enabled_list, ep)) { + else if (!enable && ep->enabled) { ep_data.enabled_list = g_list_remove(ep_data.enabled_list, ep); if (ep->cleanup) ep->cleanup(); @@ -207,6 +209,7 @@ data)->filename); if (!strcmp(plugins[i], base)) { ep = node->data; + ep->enabled = TRUE; ep_data.enabled_list = g_list_append(ep_data.enabled_list, ep); if (ep->init)