im.pidgin.pidgin.next.minor: 163678e01e4842acd17f052d00b1c1f5a61a8c4b
rlaager at pidgin.im
rlaager at pidgin.im
Fri Oct 12 00:02:17 EDT 2007
-----------------------------------------------------------------
Revision: 163678e01e4842acd17f052d00b1c1f5a61a8c4b
Ancestor: 842ddbe114c1764d01b5b5375e1ea9e7143dccfc
Author: rlaager at pidgin.im
Date: 2007-10-07T16:06:20
Branch: im.pidgin.pidgin.next.minor
Modified files:
pidgin/gtkplugin.c
ChangeLog:
Use the new purple_plugin_disable() function and purple_plugin_unload()'s
setting of plugin->error to display an appropriate message if a plugin
fails to unload.
-------------- next part --------------
============================================================
--- pidgin/gtkplugin.c 115e27dac85c3331d65402429794e18b16649078
+++ pidgin/gtkplugin.c 052e3b207c28085ff004f21ea4ecb3f433fa632c
@@ -303,8 +303,25 @@ static void plugin_toggled_stage_two(Pur
{
pidgin_set_cursor(plugin_dialog, GDK_WATCH);
- purple_plugin_unload(plug);
+ if (!purple_plugin_unload(plug))
+ {
+ const char *primary = _("Could not unload plugin");
+ const char *reload = _("The plugin could not be unloaded now, but will be disabled at the next startup.");
+ if (!plug->error)
+ {
+ purple_notify_warning(NULL, NULL, primary, reload);
+ }
+ else
+ {
+ char *tmp = g_strdup_printf("%s\n\n%s", reload, plug->error);
+ purple_notify_warning(NULL, NULL, primary, tmp);
+ g_free(tmp);
+ }
+
+ purple_plugin_disable(plug);
+ }
+
pidgin_clear_cursor(plugin_dialog);
}
More information about the Commits
mailing list