From: <de...@us...> - 2006-08-22 19:18:56
|
Revision: 16985 Author: deryni9 Date: 2006-08-22 12:18:46 -0700 (Tue, 22 Aug 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16985&view=rev Log Message: ----------- I was working on debugging something and these came in handy. Modified Paths: -------------- trunk/libgaim/plugins/tcl/tcl_cmds.c Modified: trunk/libgaim/plugins/tcl/tcl_cmds.c =================================================================== --- trunk/libgaim/plugins/tcl/tcl_cmds.c 2006-08-22 18:28:00 UTC (rev 16984) +++ trunk/libgaim/plugins/tcl/tcl_cmds.c 2006-08-22 19:18:46 UTC (rev 16985) @@ -670,8 +670,8 @@ int tcl_cmd_conversation(ClientData unused, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { Tcl_Obj *list, *elem, *result = Tcl_GetObjResult(interp); - const char *cmds[] = { "find", "handle", "list", "new", "write", NULL }; - enum { CMD_CONV_FIND, CMD_CONV_HANDLE, CMD_CONV_LIST, CMD_CONV_NEW, CMD_CONV_WRITE } cmd; + const char *cmds[] = { "find", "handle", "list", "new", "write", "name", "title", NULL }; + enum { CMD_CONV_FIND, CMD_CONV_HANDLE, CMD_CONV_LIST, CMD_CONV_NEW, CMD_CONV_WRITE , CMD_CONV_NAME, CMD_CONV_TITLE } cmd; const char *styles[] = { "send", "recv", "system", NULL }; enum { CMD_CONV_WRITE_SEND, CMD_CONV_WRITE_RECV, CMD_CONV_WRITE_SYSTEM } style; const char *newopts[] = { "-chat", "-im" }; @@ -783,6 +783,26 @@ else gaim_conv_im_write(GAIM_CONV_IM(convo), from, what, flags, time(NULL)); break; + case CMD_CONV_NAME: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "conversation"); + return TCL_ERROR; + } + + if ((convo = tcl_validate_conversation(objv[2], interp)) == NULL) + return TCL_ERROR; + Tcl_SetStringObj(result, (char *)gaim_conversation_get_name(convo), -1); + break; + case CMD_CONV_TITLE: + if (objc != 3) { + Tcl_WrongNumArgs(interp, 2, objv, "conversation"); + return TCL_ERROR; + } + + if ((convo = tcl_validate_conversation(objv[2], interp)) == NULL) + return TCL_ERROR; + Tcl_SetStringObj(result, (char *)gaim_conversation_get_title(convo), -1); + break; } return TCL_OK; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |