changeset 15689:dc01798f4c96

merge of '7c02d9741848a5265c0dce9fcd9f222c4bdb13b9' and 'f732243ea0c32832b8289f06bfb5f63566966a06'
author Evan Schoenberg <evan.s@dreskin.net>
date Fri, 23 Feb 2007 17:20:33 +0000
parents d79c9952f6bb (diff) 70e4796455ba (current diff)
children 444b7ee76492
files
diffstat 6 files changed, 40 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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, <i>not</i> the file descriptor.
  */
-guint gaim_input_remove(guint handle);
+gboolean gaim_input_remove(guint handle);
 
 /**
  * Get the current error status for an input.
--- 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" \
--- 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);
--- 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;
--- 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;