Mercurial > pidgin.yaz
changeset 16254:c3052de39110
If a plugin failed to load/unload, don't pretend that it worked
author | Richard Nelson <wabz@pidgin.im> |
---|---|
date | Thu, 19 Apr 2007 01:21:25 +0000 |
parents | 017405933589 |
children | 4e01fc165b28 |
files | finch/gntplugin.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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) {