pidgin: 4602fb3d: Add a plugin information dialog that sho...
rekkanoryo at pidgin.im
rekkanoryo at pidgin.im
Sat Jul 9 18:35:52 EDT 2011
----------------------------------------------------------------------
Revision: 4602fb3d239d646ae64ee5d3691ec607b8ea9cd4
Parent: 7a719c74cf2afa3a9dd8b532af1a88b98489d925
Author: rekkanoryo at pidgin.im
Date: 07/09/11 18:27:13
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/4602fb3d239d646ae64ee5d3691ec607b8ea9cd4
Changelog:
Add a plugin information dialog that shows information for all plugins, even
hidden plugins, loader plugins, and protocol plugins.
Changes against parent 7a719c74cf2afa3a9dd8b532af1a88b98489d925
patched pidgin/gtkblist.c
patched pidgin/gtkdialogs.c
patched pidgin/gtkdialogs.h
-------------- next part --------------
============================================================
--- pidgin/gtkblist.c fddddc1983ab6d2762f5d04c0f29055e413838f2
+++ pidgin/gtkblist.c 448f490b43c2e0a2883944d358650ab8a76c7cdf
@@ -3647,6 +3647,7 @@ static GtkItemFactoryEntry blist_menu[]
{ N_("/Help/_Build Information"), NULL, pidgin_dialogs_buildinfo, 0, "<Item>", NULL },
{ N_("/Help/_Debug Window"), NULL, toggle_debug, 0, "<Item>", NULL },
{ N_("/Help/De_veloper Information"), NULL, pidgin_dialogs_developers, 0, "<Item>", NULL },
+ { N_("/Help/_Plugin Information"), NULL, pidgin_dialogs_plugins_info, 0, "<Item>", NULL },
{ N_("/Help/_Translator Information"), NULL, pidgin_dialogs_translators, 0, "<Item>", NULL },
{ "/Help/sep2", NULL, NULL, 0, "<Separator>", NULL },
{ N_("/Help/_About"), NULL, pidgin_dialogs_about, 4, "<StockItem>", GTK_STOCK_ABOUT },
============================================================
--- pidgin/gtkdialogs.c 3d75956b21e4f633caad5d2b0286cfe3fcbc4363
+++ pidgin/gtkdialogs.c f8d5e43e624a7b5a913110e5ff4f1a16ea305b0f
@@ -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 @@ void pidgin_dialogs_translators(void)
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, "<FONT SIZE=\"4\">%s</FONT><BR/>",
+ _("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,
+ "<FONT SIZE=\"3\"><B>%s</B></FONT><BR/><FONT SIZE=\"2\">"
+ "\t<B>Author:</B> %s<BR/>\t<B>Version:</B> %s<BR/>"
+ "\t<B>Website:</B> %s<BR/>\t<B>ID String:</B> %s<BR/>"
+ "\t<B>Loadable:</B> %s<BR/>\t<B>Loaded:</B> %s<BR/>"
+ "<BR/></FONT>", pname, pauthor ? pauthor : "(null)",
+ pver, pwebsite, pid,
+ punloadable ? "<FONT COLOR=\"#FF0000\"><B>No</B></FONT>" : "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)
{
============================================================
--- pidgin/gtkdialogs.h 827d6e347ad1aa18549aac589d9c91caacdea6c1
+++ pidgin/gtkdialogs.h 8e01df0c9a76839d22444d976be6273c9072e078
@@ -36,6 +36,7 @@ void pidgin_dialogs_translators(void);
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);
More information about the Commits
mailing list