diff options
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-plugin-ui.c | 12 | ||||
-rw-r--r-- | e-util/e-plugin.c | 5 |
2 files changed, 9 insertions, 8 deletions
diff --git a/e-util/e-plugin-ui.c b/e-util/e-plugin-ui.c index a03c6193ef..c79220be63 100644 --- a/e-util/e-plugin-ui.c +++ b/e-util/e-plugin-ui.c @@ -544,7 +544,7 @@ e_plugin_ui_register_manager (GtkUIManager *ui_manager, EPlugin *plugin = plugin_list->data; GSList *iter; - plugin_list = g_slist_next (plugin_list); + plugin_list = g_slist_remove (plugin_list, plugin); /* Look for hooks of type EPluginUIHook. */ for (iter = plugin->hooks; iter != NULL; iter = iter->next) { @@ -565,6 +565,8 @@ e_plugin_ui_register_manager (GtkUIManager *ui_manager, plugin_ui_hook_register_manager ( hook, ui_manager, id, user_data); } + + g_object_unref (plugin); } } @@ -583,7 +585,7 @@ e_plugin_ui_enable_manager (GtkUIManager *ui_manager, EPlugin *plugin = plugin_list->data; GSList *iter; - plugin_list = g_slist_next (plugin_list); + plugin_list = g_slist_remove (plugin_list, plugin); /* Look for hooks of type EPluginUIHook. */ for (iter = plugin->hooks; iter != NULL; iter = iter->next) { @@ -594,6 +596,8 @@ e_plugin_ui_enable_manager (GtkUIManager *ui_manager, plugin_ui_enable_manager (hook, ui_manager, id); } + + g_object_unref (plugin); } } @@ -612,7 +616,7 @@ e_plugin_ui_disable_manager (GtkUIManager *ui_manager, EPlugin *plugin = plugin_list->data; GSList *iter; - plugin_list = g_slist_next (plugin_list); + plugin_list = g_slist_remove (plugin_list, plugin); /* Look for hooks of type EPluginUIHook. */ for (iter = plugin->hooks; iter != NULL; iter = iter->next) { @@ -623,5 +627,7 @@ e_plugin_ui_disable_manager (GtkUIManager *ui_manager, plugin_ui_disable_manager (hook, ui_manager, id, TRUE); } + + g_object_unref (plugin); } } diff --git a/e-util/e-plugin.c b/e-util/e-plugin.c index 0da1151d21..db717e8dcd 100644 --- a/e-util/e-plugin.c +++ b/e-util/e-plugin.c @@ -83,9 +83,6 @@ struct _plugin_doc { gchar *filename; xmlDocPtr doc; - - GSList *plugin_hooks; /* EPlugin objects with pending hooks */ - GSList *plugins; /* xmlNodePtr's of plugins with unknown type (mono,etc) */ }; enum { @@ -359,7 +356,6 @@ ep_load_plugin (xmlNodePtr root, struct _plugin_doc *pdoc) pd(printf("Delaying loading of plugin '%s' unknown type '%s'\n", id, prop)); g_free (id); xmlFree (prop); - pdoc->plugins = g_slist_prepend (pdoc->plugins, root); return NULL; } xmlFree (prop); @@ -430,7 +426,6 @@ ep_load (const gchar *filename, gint load_level) ep->flags &= ~E_PLUGIN_FLAGS_SYSTEM_PLUGIN; g_free (is_system_plugin); - pdoc->plugin_hooks = g_slist_prepend (pdoc->plugin_hooks, ep); ep = NULL; } } |