X-Git-Url: http://pileus.org/git/?p=grits;a=blobdiff_plain;f=src%2Fgrits-plugin.c;h=12ca5edef1194651244b94883f2e14087a77043e;hp=494b7165dadfa261fee0f086553cedbdb4204b20;hb=d55c77bbf477e582a8525ac831ad97b035b8185d;hpb=e7236ae3ba98377fe351d083fcd20c9d0899512e diff --git a/src/grits-plugin.c b/src/grits-plugin.c index 494b716..12ca5ed 100644 --- a/src/grits-plugin.c +++ b/src/grits-plugin.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 Andy Spencer + * Copyright (C) 2009-2011 Andy Spencer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -155,11 +155,7 @@ GritsPlugins *grits_plugins_new(const gchar *dir, GritsPrefs *prefs) static void grits_plugins_free_store(GritsPluginStore *store) { g_object_unref(store->plugin); - /* Flush any possible callbacks before - * unloading the plugin code */ - while (gtk_events_pending()) - gtk_main_iteration(); - g_module_close(store->module); + //g_module_close(store->module); g_free(store->name); g_free(store); } @@ -175,7 +171,7 @@ void grits_plugins_free(GritsPlugins *plugins) g_debug("GritsPlugins: free"); for (GList *cur = plugins->plugins; cur; cur = cur->next) { GritsPluginStore *store = cur->data; - g_debug("GritsPlugin: freeing %s refs=%d->%d", store->name, + g_debug("GritsPlugins: freeing %s refs=%d->%d", store->name, G_OBJECT(store->plugin)->ref_count, G_OBJECT(store->plugin)->ref_count-1); grits_plugins_free_store(store); @@ -349,8 +345,9 @@ gboolean grits_plugins_unload(GritsPlugins *plugins, const char *name) for (GList *cur = plugins->plugins; cur; cur = cur->next) { GritsPluginStore *store = cur->data; if (g_str_equal(store->name, name)) { - grits_plugins_free_store(store); plugins->plugins = g_list_delete_link(plugins->plugins, cur); + grits_plugins_free_store(store); + break; } } return FALSE;