# HG changeset patch # User Evan Schoenberg # Date 1172251233 0 # Node ID dc01798f4c9699b11918939019dc4461f99e547d # Parent d79c9952f6bbf1bd809379ed5ed6f815e533cb54# Parent 70e4796455ba41b8ca06ae4f0e25a600fff8adda merge of '7c02d9741848a5265c0dce9fcd9f222c4bdb13b9' and 'f732243ea0c32832b8289f06bfb5f63566966a06' diff -r 70e4796455ba -r dc01798f4c96 COPYRIGHT --- a/COPYRIGHT Fri Feb 23 13:50:17 2007 +0000 +++ b/COPYRIGHT Fri Feb 23 17:20:33 2007 +0000 @@ -297,6 +297,7 @@ Jim Seymour Joe Shaw Scott Shedden +Dossy Shiobara Ettore Simone John Silvestri Craig Slusher diff -r 70e4796455ba -r dc01798f4c96 libpurple/eventloop.h --- a/libpurple/eventloop.h Fri Feb 23 13:50:17 2007 +0000 +++ b/libpurple/eventloop.h Fri Feb 23 17:20:33 2007 +0000 @@ -129,7 +129,7 @@ * @param handle The handle of the input handler. Note that this is the return * value from gaim_input_add, not the file descriptor. */ -guint gaim_input_remove(guint handle); +gboolean gaim_input_remove(guint handle); /** * Get the current error status for an input. diff -r 70e4796455ba -r dc01798f4c96 libpurple/plugins/tcl/signal-test.tcl --- a/libpurple/plugins/tcl/signal-test.tcl Fri Feb 23 13:50:17 2007 +0000 +++ b/libpurple/plugins/tcl/signal-test.tcl Fri Feb 23 17:20:33 2007 +0000 @@ -100,6 +100,14 @@ } } +gaim::signal connect [gaim::plugins handle] plugin-load args { + gaim::debug -info "tcl signal" "plugin-load [list $args]" +} + +gaim::signal connect [gaim::plugins handle] plugin-unload args { + gaim::debug -info "tcl signal" "plugin-unload [list $args]" +} + proc plugin_init { } { list "Tcl Signal Test" \ "$gaim::version" \ diff -r 70e4796455ba -r dc01798f4c96 libpurple/plugins/tcl/tcl.c --- a/libpurple/plugins/tcl/tcl.c Fri Feb 23 13:50:17 2007 +0000 +++ b/libpurple/plugins/tcl/tcl.c Fri Feb 23 17:20:33 2007 +0000 @@ -134,6 +134,7 @@ Tcl_CreateObjCommand(interp, "::gaim::core", tcl_cmd_core, (ClientData)NULL, NULL); Tcl_CreateObjCommand(interp, "::gaim::debug", tcl_cmd_debug, (ClientData)NULL, NULL); Tcl_CreateObjCommand(interp, "::gaim::notify", tcl_cmd_notify, (ClientData)NULL, NULL); + Tcl_CreateObjCommand(interp, "::gaim::plugins", tcl_cmd_plugins, (ClientData)NULL, NULL); Tcl_CreateObjCommand(interp, "::gaim::prefs", tcl_cmd_prefs, (ClientData)NULL, NULL); Tcl_CreateObjCommand(interp, "::gaim::presence", tcl_cmd_presence, (ClientData)NULL, NULL); Tcl_CreateObjCommand(interp, "::gaim::send_im", tcl_cmd_send_im, (ClientData)NULL, NULL); diff -r 70e4796455ba -r dc01798f4c96 libpurple/plugins/tcl/tcl_cmds.c --- a/libpurple/plugins/tcl/tcl_cmds.c Fri Feb 23 13:50:17 2007 +0000 +++ b/libpurple/plugins/tcl/tcl_cmds.c Fri Feb 23 17:20:33 2007 +0000 @@ -912,6 +912,34 @@ return TCL_OK; } +int tcl_cmd_plugins(ClientData unused, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) +{ + Tcl_Obj *result = Tcl_GetObjResult(interp); + const char *cmds[] = { "handle", NULL }; + enum { CMD_PLUGINS_HANDLE } cmd; + int error; + + if (objc < 2) { + Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?args?"); + return TCL_ERROR; + } + + if ((error = Tcl_GetIndexFromObj(interp, objv[1], cmds, "subcommand", 0, (int *)&cmd)) != TCL_OK) + return error; + + switch (cmd) { + case CMD_PLUGINS_HANDLE: + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, ""); + return TCL_ERROR; + } + Tcl_SetIntObj(result, (int)gaim_plugins_get_handle()); + break; + } + + return TCL_OK; +} + int tcl_cmd_prefs(ClientData unused, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { Tcl_Obj *result, *list, *elem, **elems; diff -r 70e4796455ba -r dc01798f4c96 libpurple/plugins/tcl/tcl_gaim.h --- a/libpurple/plugins/tcl/tcl_gaim.h Fri Feb 23 13:50:17 2007 +0000 +++ b/libpurple/plugins/tcl/tcl_gaim.h Fri Feb 23 17:20:33 2007 +0000 @@ -104,6 +104,7 @@ Tcl_ObjCmdProc tcl_cmd_core; Tcl_ObjCmdProc tcl_cmd_debug; Tcl_ObjCmdProc tcl_cmd_notify; +Tcl_ObjCmdProc tcl_cmd_plugins; Tcl_ObjCmdProc tcl_cmd_prefs; Tcl_ObjCmdProc tcl_cmd_presence; Tcl_ObjCmdProc tcl_cmd_send_im; diff -r 70e4796455ba -r dc01798f4c96 libpurple/util.c