comparison plugins/tcl/tcl.c @ 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 409f7f167c98
children d7b8eb1f0a18
comparison
equal deleted inserted replaced
8116:761caeb8583e 8117:e280d73ed07f
207 207
208 if (found && !err) { 208 if (found && !err) {
209 if (Tcl_EvalEx(interp, "plugin_init", -1, TCL_EVAL_GLOBAL) == TCL_OK) { 209 if (Tcl_EvalEx(interp, "plugin_init", -1, TCL_EVAL_GLOBAL) == TCL_OK) {
210 result = Tcl_GetObjResult(interp); 210 result = Tcl_GetObjResult(interp);
211 if (Tcl_ListObjGetElements(interp, result, &nelems, &listitems) == TCL_OK) { 211 if (Tcl_ListObjGetElements(interp, result, &nelems, &listitems) == TCL_OK) {
212 if (nelems == 5) { 212 if (nelems == 6) {
213 info = g_new0(GaimPluginInfo, 1); 213 info = g_new0(GaimPluginInfo, 1);
214 214
215 info->api_version = 2; 215 info->api_version = 2;
216 info->type = GAIM_PLUGIN_STANDARD; 216 info->type = GAIM_PLUGIN_STANDARD;
217 info->dependencies = g_list_append(info->dependencies, "core-tcl"); 217 info->dependencies = g_list_append(info->dependencies, "core-tcl");
218 218
219 info->name = g_strdup(Tcl_GetString(listitems[0])); 219 info->name = g_strdup(Tcl_GetString(listitems[0]));
220 info->version = g_strdup(Tcl_GetString(listitems[1])); 220 info->version = g_strdup(Tcl_GetString(listitems[1]));
221 info->description = g_strdup(Tcl_GetString(listitems[2]));; 221 info->summary = g_strdup(Tcl_GetString(listitems[2]));
222 info->author = g_strdup(Tcl_GetString(listitems[3])); 222 info->description = g_strdup(Tcl_GetString(listitems[3]));;
223 info->homepage = g_strdup(Tcl_GetString(listitems[4])); 223 info->author = g_strdup(Tcl_GetString(listitems[5]));
224 info->homepage = g_strdup(Tcl_GetString(listitems[5]));
224 225
225 plugin->info = info; 226 plugin->info = info;
226 227
227 if (gaim_plugin_register(plugin)) 228 if (gaim_plugin_register(plugin))
228 status = TRUE; 229 status = TRUE;