changeset 8117:e280d73ed07f

[gaim-migrate @ 8821] Since Gaim now shows plugin descriptions, this alters the Tcl API to collect them at registration time. NOTE THAT THIS CHANGES THE TCL API. Not that anyone uses it, but now I won't forget. Plugin registration will have to be changed in existing plugins, and a summary added ... see the appropriate part of the TCL-HOWTO for details. committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Thu, 15 Jan 2004 23:11:46 +0000
parents 761caeb8583e
children 52089b055c12
files plugins/tcl/TCL-HOWTO plugins/tcl/signal-test.tcl plugins/tcl/tcl.c
diffstat 3 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/tcl/TCL-HOWTO	Thu Jan 15 23:02:19 2004 +0000
+++ b/plugins/tcl/TCL-HOWTO	Thu Jan 15 23:11:46 2004 +0000
@@ -24,11 +24,14 @@
 variables or procedures declared in the script.  In practice this is
 not a problem, as the only thing this procedure should do is return a
 simple list containing five items: the name of the script, its version
-number, a short description, the author, and a web page.  For example:
+number, a summary (just a few words) of its function, a short (longer
+than the summary, but no more than a couple of sentences if possible)
+description, the author, and a web page.  For example:
 
 proc plugin_init { } {
   return [ list "Example Plugin" \
                 "1.0" \
+		"Example plugin registration" \
 		"Example of how to register a plugin for the Tcl HOWTO" \
 		"Ethan Blanton <eblanton@cs.purdue.edu>" \
 		"http://gaim.sf.net/" ]
--- a/plugins/tcl/signal-test.tcl	Thu Jan 15 23:02:19 2004 +0000
+++ b/plugins/tcl/signal-test.tcl	Thu Jan 15 23:11:46 2004 +0000
@@ -99,6 +99,7 @@
 proc plugin_init { } {
 	list "Tcl Signal Test" \
              "$gaim::version" \
+	     "Tests Tcl signal handlers" \
              "Debugs a ridiculous amount of signal information." \
              "Ethan Blanton <eblanton@cs.purdue.edu>" \
              "http://gaim.sourceforge.net/"
--- a/plugins/tcl/tcl.c	Thu Jan 15 23:02:19 2004 +0000
+++ b/plugins/tcl/tcl.c	Thu Jan 15 23:11:46 2004 +0000
@@ -209,7 +209,7 @@
 		if (Tcl_EvalEx(interp, "plugin_init", -1, TCL_EVAL_GLOBAL) == TCL_OK) {
 			result = Tcl_GetObjResult(interp);
 			if (Tcl_ListObjGetElements(interp, result, &nelems, &listitems) == TCL_OK) {
-				if (nelems == 5) {
+				if (nelems == 6) {
 					info = g_new0(GaimPluginInfo, 1);
 					
 					info->api_version = 2;
@@ -218,9 +218,10 @@
 					
 					info->name = g_strdup(Tcl_GetString(listitems[0]));
 					info->version = g_strdup(Tcl_GetString(listitems[1]));
-					info->description = g_strdup(Tcl_GetString(listitems[2]));;
-					info->author = g_strdup(Tcl_GetString(listitems[3]));
-					info->homepage = g_strdup(Tcl_GetString(listitems[4]));
+					info->summary = g_strdup(Tcl_GetString(listitems[2]));
+					info->description = g_strdup(Tcl_GetString(listitems[3]));;
+					info->author = g_strdup(Tcl_GetString(listitems[5]));
+					info->homepage = g_strdup(Tcl_GetString(listitems[5]));
 					
 					plugin->info = info;