From: Ethan B. <ebl...@us...> - 2004-01-15 23:11:49
|
Update of /cvsroot/gaim/gaim/plugins/tcl In directory sc8-pr-cvs1:/tmp/cvs-serv14221/plugins/tcl Modified Files: TCL-HOWTO signal-test.tcl tcl.c Log Message: 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. Index: TCL-HOWTO =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/tcl/TCL-HOWTO,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- TCL-HOWTO 3 Dec 2003 02:03:44 -0000 1.2 +++ TCL-HOWTO 15 Jan 2004 23:11:46 -0000 1.3 @@ -24,11 +24,14 @@ before the rest of the Tcl script, so it 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 <ebl...@cs...>" \ "http://gaim.sf.net/" ] Index: signal-test.tcl =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/tcl/signal-test.tcl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- signal-test.tcl 2 Sep 2003 03:54:52 -0000 1.2 +++ signal-test.tcl 15 Jan 2004 23:11:46 -0000 1.3 @@ -99,6 +99,7 @@ gaim::signal connect update-idle { proc plugin_init { } { list "Tcl Signal Test" \ "$gaim::version" \ + "Tests Tcl signal handlers" \ "Debugs a ridiculous amount of signal information." \ "Ethan Blanton <ebl...@cs...>" \ "http://gaim.sourceforge.net/" Index: tcl.c =================================================================== RCS file: /cvsroot/gaim/gaim/plugins/tcl/tcl.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -p -r1.4 -r1.5 --- tcl.c 11 Dec 2003 19:06:28 -0000 1.4 +++ tcl.c 15 Jan 2004 23:11:46 -0000 1.5 @@ -209,7 +209,7 @@ static gboolean tcl_probe_plugin(GaimPlu 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 @@ static gboolean tcl_probe_plugin(GaimPlu 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; |