# HG changeset patch # User Richard Nelson # Date 1176945685 0 # Node ID c3052de39110e1cc91072f18a85842647a42b05a # Parent 017405933589abb67272ba2aba2ba2d2e4029fff If a plugin failed to load/unload, don't pretend that it worked diff -r 017405933589 -r c3052de39110 finch/gntplugin.c --- a/finch/gntplugin.c Wed Apr 18 22:57:07 2007 +0000 +++ b/finch/gntplugin.c Thu Apr 19 01:21:25 2007 +0000 @@ -63,17 +63,22 @@ static void plugin_toggled_cb(GntWidget *tree, PurplePlugin *plugin, gpointer null) { + /* TODO: Mark these strings for translation after the freeze */ if (gnt_tree_get_choice(GNT_TREE(tree), plugin)) { - if(!purple_plugin_load(plugin)) + if (!purple_plugin_load(plugin)) { purple_notify_error(NULL, "ERROR", "loading plugin failed", NULL); + gnt_tree_set_choice(GNT_TREE(tree), plugin, FALSE); + } } else { GntWidget *win; - if (!purple_plugin_unload(plugin)) + if (!purple_plugin_unload(plugin)) { purple_notify_error(NULL, "ERROR", "unloading plugin failed", NULL); + gnt_tree_set_choice(GNT_TREE(tree), plugin, TRUE); + } if ((win = g_hash_table_lookup(confwins, plugin)) != NULL) {