# HG changeset patch # User John Bailey # Date 1310250433 0 # Node ID 4bdf4e5e6d67e3b5a4e2ba8956620962e14b919e # Parent 8e1b248adc55a229a98ef75a8597cbc6664629e7 Add a plugin information dialog that shows information for all plugins, even hidden plugins, loader plugins, and protocol plugins. diff -r 8e1b248adc55 -r 4bdf4e5e6d67 pidgin/gtkblist.c --- a/pidgin/gtkblist.c Fri Jul 08 01:37:00 2011 +0000 +++ b/pidgin/gtkblist.c Sat Jul 09 22:27:13 2011 +0000 @@ -3647,6 +3647,7 @@ { N_("/Help/_Build Information"), NULL, pidgin_dialogs_buildinfo, 0, "", NULL }, { N_("/Help/_Debug Window"), NULL, toggle_debug, 0, "", NULL }, { N_("/Help/De_veloper Information"), NULL, pidgin_dialogs_developers, 0, "", NULL }, + { N_("/Help/_Plugin Information"), NULL, pidgin_dialogs_plugins_info, 0, "", NULL }, { N_("/Help/_Translator Information"), NULL, pidgin_dialogs_translators, 0, "", NULL }, { "/Help/sep2", NULL, NULL, 0, "", NULL }, { N_("/Help/_About"), NULL, pidgin_dialogs_about, 4, "", GTK_STOCK_ABOUT }, diff -r 8e1b248adc55 -r 4bdf4e5e6d67 pidgin/gtkdialogs.c --- a/pidgin/gtkdialogs.c Fri Jul 08 01:37:00 2011 +0000 +++ b/pidgin/gtkdialogs.c Sat Jul 09 22:27:13 2011 +0000 @@ -31,6 +31,7 @@ #include "debug.h" #include "notify.h" +#include "plugin.h" #include "prpl.h" #include "request.h" #include "util.h" @@ -787,6 +788,49 @@ g_free(tmp); } +void pidgin_dialogs_plugins_info(void) +{ + GString *str; + GList *l = NULL; + PurplePlugin *plugin = NULL; + char *title = g_strdup_printf(_("%s Plugin Information"), PIDGIN_NAME); + const char *pname, *pauthor, *pver, *pwebsite, *pid; + gboolean ploaded, punloadable; + static GtkWidget *plugins_info = NULL; + + str = g_string_sized_new(4096); + + g_string_append_printf(str, "%s
", + _("Plugin Information")); + + for(l = purple_plugins_get_all(); l; l = l->next) { + plugin = (PurplePlugin *)l->data; + + pname = purple_plugin_get_name(plugin); + pauthor = purple_plugin_get_author(plugin); + pver = purple_plugin_get_version(plugin); + pwebsite = purple_plugin_get_homepage(plugin); + pid = purple_plugin_get_id(plugin); + punloadable = purple_plugin_is_unloadable(plugin); + ploaded = purple_plugin_is_loaded(plugin); + + g_string_append_printf(str, + "%s
" + "\tAuthor: %s
\tVersion: %s
" + "\tWebsite: %s
\tID String: %s
" + "\tLoadable: %s
\tLoaded: %s
" + "
", pname, pauthor ? pauthor : "(null)", + pver, pwebsite, pid, + punloadable ? "No" : "Yes", + ploaded ? "Yes" : "No"); + } + + plugins_info = pidgin_build_help_dialog(title, "plugins_info", str); + g_signal_connect(G_OBJECT(plugins_info), "destroy", + G_CALLBACK(gtk_widget_destroyed), &plugins_info); + g_free(title); +} + static void pidgin_dialogs_im_cb(gpointer data, PurpleRequestFields *fields) { diff -r 8e1b248adc55 -r 4bdf4e5e6d67 pidgin/gtkdialogs.h --- a/pidgin/gtkdialogs.h Fri Jul 08 01:37:00 2011 +0000 +++ b/pidgin/gtkdialogs.h Sat Jul 09 22:27:13 2011 +0000 @@ -36,6 +36,7 @@ void pidgin_dialogs_buildinfo(void); void pidgin_dialogs_developers(void); void pidgin_dialogs_translators(void); +void pidgin_dialogs_plugins_info(void); void pidgin_dialogs_im(void); void pidgin_dialogs_im_with_user(PurpleAccount *, const char *); void pidgin_dialogs_info(void);