From: <ebl...@us...> - 2007-02-25 03:01:59
|
Revision: 18192 http://svn.sourceforge.net/gaim/?rev=18192&view=rev Author: eblanton Date: 2007-02-24 19:02:00 -0800 (Sat, 24 Feb 2007) Log Message: ----------- gaim::plugin Tcl command, thanks to Dossy Shiobara Modified Paths: -------------- trunk/COPYRIGHT trunk/gtk/gtkconv.c trunk/libgaim/plugins/tcl/signal-test.tcl trunk/libgaim/plugins/tcl/tcl_cmds.c trunk/libgaim/plugins/tcl/tcl_gaim.h Modified: trunk/COPYRIGHT =================================================================== --- trunk/COPYRIGHT 2007-02-17 00:00:24 UTC (rev 18191) +++ trunk/COPYRIGHT 2007-02-25 03:02:00 UTC (rev 18192) @@ -294,6 +294,7 @@ Jim Seymour Joe Shaw Scott Shedden +Dossy Shiobara Ettore Simone John Silvestri Craig Slusher Modified: trunk/gtk/gtkconv.c =================================================================== --- trunk/gtk/gtkconv.c 2007-02-17 00:00:24 UTC (rev 18191) +++ trunk/gtk/gtkconv.c 2007-02-25 03:02:00 UTC (rev 18192) @@ -4863,7 +4863,7 @@ tag_count++; if (tag_count > 100) { - char *tmp = message; + const char *tmp = message; message = displaying = gaim_markup_strip_html(message); g_free(tmp); } Modified: trunk/libgaim/plugins/tcl/signal-test.tcl =================================================================== --- trunk/libgaim/plugins/tcl/signal-test.tcl 2007-02-17 00:00:24 UTC (rev 18191) +++ trunk/libgaim/plugins/tcl/signal-test.tcl 2007-02-25 03:02:00 UTC (rev 18192) @@ -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" \ Modified: trunk/libgaim/plugins/tcl/tcl_cmds.c =================================================================== --- trunk/libgaim/plugins/tcl/tcl_cmds.c 2007-02-17 00:00:24 UTC (rev 18191) +++ trunk/libgaim/plugins/tcl/tcl_cmds.c 2007-02-25 03:02:00 UTC (rev 18192) @@ -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; Modified: trunk/libgaim/plugins/tcl/tcl_gaim.h =================================================================== --- trunk/libgaim/plugins/tcl/tcl_gaim.h 2007-02-17 00:00:24 UTC (rev 18191) +++ trunk/libgaim/plugins/tcl/tcl_gaim.h 2007-02-25 03:02:00 UTC (rev 18192) @@ -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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |