Mercurial > pidgin.yaz
comparison plugins/tcl/tcl_cmds.c @ 7118:bf630f7dfdcd
[gaim-migrate @ 7685]
Here's a commit that I think will make faceprint happy. GaimWindow ->
GaimConvWindow, GaimIm -> GaimConvIm, GaimChat -> GaimConvChat,
GaimBlistChat -> GaimChat, and updated the API functions as well. Plugin
authors are going to hunt me down and murder me. I can feel it..
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 02 Oct 2003 02:54:07 +0000 |
parents | abdc55ffadba |
children | bb484e976aa8 |
comparison
equal
deleted
inserted
replaced
7117:943085b0ff8b | 7118:bf630f7dfdcd |
---|---|
259 enum { CMD_BUDDY_ALIAS, CMD_BUDDY_HANDLE, CMD_BUDDY_INFO, CMD_BUDDY_LIST } cmd; | 259 enum { CMD_BUDDY_ALIAS, CMD_BUDDY_HANDLE, CMD_BUDDY_INFO, CMD_BUDDY_LIST } cmd; |
260 GaimBuddyList *blist; | 260 GaimBuddyList *blist; |
261 GaimBlistNode *node, *gnode, *bnode; | 261 GaimBlistNode *node, *gnode, *bnode; |
262 GaimAccount *account; | 262 GaimAccount *account; |
263 GaimBuddy *bud; | 263 GaimBuddy *bud; |
264 GaimBlistChat *cnode; | 264 GaimChat *cnode; |
265 int error, all = 0, count; | 265 int error, all = 0, count; |
266 | 266 |
267 if (objc < 2) { | 267 if (objc < 2) { |
268 Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?args?"); | 268 Tcl_WrongNumArgs(interp, 1, objv, "subcommand ?args?"); |
269 return TCL_ERROR; | 269 return TCL_ERROR; |
282 if ((error = Tcl_ListObjGetElements(interp, objv[2], &count, &elems)) != TCL_OK) | 282 if ((error = Tcl_ListObjGetElements(interp, objv[2], &count, &elems)) != TCL_OK) |
283 return error; | 283 return error; |
284 if ((node = tcl_list_to_buddy(interp, count, elems)) == NULL) | 284 if ((node = tcl_list_to_buddy(interp, count, elems)) == NULL) |
285 return TCL_ERROR; | 285 return TCL_ERROR; |
286 if (node->type == GAIM_BLIST_CHAT_NODE) | 286 if (node->type == GAIM_BLIST_CHAT_NODE) |
287 Tcl_SetStringObj(result, ((GaimBlistChat *)node)->alias, -1); | 287 Tcl_SetStringObj(result, ((GaimChat *)node)->alias, -1); |
288 else if (node->type == GAIM_BLIST_BUDDY_NODE) | 288 else if (node->type == GAIM_BLIST_BUDDY_NODE) |
289 Tcl_SetStringObj(result, (char *)gaim_get_buddy_alias((GaimBuddy *)node), -1); | 289 Tcl_SetStringObj(result, (char *)gaim_get_buddy_alias((GaimBuddy *)node), -1); |
290 return TCL_OK; | 290 return TCL_OK; |
291 break; | 291 break; |
292 case CMD_BUDDY_HANDLE: | 292 case CMD_BUDDY_HANDLE: |
371 } | 371 } |
372 Tcl_DecrRefCount(tclcontact); | 372 Tcl_DecrRefCount(tclcontact); |
373 Tcl_DecrRefCount(tclcontactlist); | 373 Tcl_DecrRefCount(tclcontactlist); |
374 break; | 374 break; |
375 case GAIM_BLIST_CHAT_NODE: | 375 case GAIM_BLIST_CHAT_NODE: |
376 cnode = (GaimBlistChat *)node; | 376 cnode = (GaimChat *)node; |
377 if (!all && !gaim_account_is_connected(cnode->account)) | 377 if (!all && !gaim_account_is_connected(cnode->account)) |
378 continue; | 378 continue; |
379 tclbud = Tcl_NewListObj(0, NULL); | 379 tclbud = Tcl_NewListObj(0, NULL); |
380 Tcl_ListObjAppendElement(interp, tclbud, Tcl_NewStringObj("chat", -1)); | 380 Tcl_ListObjAppendElement(interp, tclbud, Tcl_NewStringObj("chat", -1)); |
381 Tcl_ListObjAppendElement(interp, tclbud, Tcl_NewStringObj(cnode->alias, -1)); | 381 Tcl_ListObjAppendElement(interp, tclbud, Tcl_NewStringObj(cnode->alias, -1)); |
597 case CMD_CONV_WRITE_SYSTEM: | 597 case CMD_CONV_WRITE_SYSTEM: |
598 flags = GAIM_MESSAGE_SYSTEM; | 598 flags = GAIM_MESSAGE_SYSTEM; |
599 break; | 599 break; |
600 } | 600 } |
601 if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) | 601 if (gaim_conversation_get_type(convo) == GAIM_CONV_CHAT) |
602 gaim_chat_write(GAIM_CHAT(convo), from, what, flags, time(NULL)); | 602 gaim_conv_chat_write(GAIM_CONV_CHAT(convo), from, what, flags, time(NULL)); |
603 else | 603 else |
604 gaim_im_write(GAIM_IM(convo), from, what, flags, time(NULL)); | 604 gaim_conv_im_write(GAIM_CONV_IM(convo), from, what, flags, time(NULL)); |
605 break; | 605 break; |
606 } | 606 } |
607 | 607 |
608 return TCL_OK; | 608 return TCL_OK; |
609 } | 609 } |