Changeset 13a3c1db for functions.c
- Timestamp:
- May 30, 2007, 12:05:27 AM (17 years ago)
- Branches:
- master, barnowl_perlaim, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 4508e21
- Parents:
- 1fd5e4c1
- git-author:
- Nelson Elhage <nelhage@mit.edu> (05/30/07 00:05:16)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (05/30/07 00:05:27)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
functions.c
rce74deb r13a3c1db 164 164 } 165 165 166 167 /* Add the given message to Owl's internal queue. If displayoutgoing168 * is disabled, the message is NOT added to any internal queue, -1 is169 * returned and THE CALLER IS EXPECTED TO FREE THE GIVEN MESSAGE.170 * Otherwise 0 is returned and the caller need do nothing more171 */172 int owl_function_add_message(owl_message *m)173 {174 /* if displayoutgoing is disabled, nuke the message and move on */175 if (! owl_global_is_displayoutgoing(&g)) {176 return(-1);177 }178 179 /* add it to the global list and current view */180 owl_messagelist_append_element(owl_global_get_msglist(&g), m);181 owl_view_consider_message(owl_global_get_current_view(&g), m);182 183 /* do followlast if necessary */184 if (owl_global_should_followlast(&g)) owl_function_lastmsg_noredisplay();185 186 /* redisplay etc. */187 owl_mainwin_redisplay(owl_global_get_mainwin(&g));188 if (owl_popwin_is_active(owl_global_get_popwin(&g))) {189 owl_popwin_refresh(owl_global_get_popwin(&g));190 }191 wnoutrefresh(owl_global_get_curs_recwin(&g));192 owl_global_set_needrefresh(&g);193 return(0);194 }195 196 166 /* Create an admin message, append it to the global list of messages 197 167 * and redisplay if necessary. … … 413 383 414 384 if (m) { 415 /* log it */ 416 owl_log_message(m); 417 418 /* add it or nuke it */ 419 if (owl_global_is_displayoutgoing(&g)) { 420 owl_function_add_message(m); 421 } else { 422 owl_message_free(m); 423 } 385 owl_global_messagequeue_addmsg(&g, m); 424 386 } else { 425 387 owl_function_error("Could not create outgoing zephyr message"); … … 477 439 m=owl_function_make_outgoing_zephyr(mymsg, line, owl_zwrite_get_zsig(&z)); 478 440 if (m) { 479 /* log it */ 480 owl_log_message(m); 481 482 /* add it or nuke it */ 483 if (owl_global_is_displayoutgoing(&g)) { 484 owl_function_add_message(m); 485 } else { 486 owl_message_free(m); 487 } 441 owl_global_messagequeue_addmsg(&g, m); 488 442 } else { 489 443 owl_function_error("Could not create outgoing zephyr message"); … … 525 479 526 480 if (m) { 527 /* log it */ 528 owl_log_message(m); 529 530 /* display it or nuke it */ 531 if (owl_global_is_displayoutgoing(&g)) { 532 owl_function_add_message(m); 533 } else { 534 owl_message_free(m); 535 } 481 owl_global_messagequeue_addmsg(&g, m); 536 482 } else { 537 483 owl_function_error("Could not create outgoing AIM message"); … … 562 508 m=owl_function_make_outgoing_aim(msg, to); 563 509 if (m) { 564 /* log it */ 565 owl_log_message(m); 566 567 /* display it or nuke it */ 568 if (owl_global_is_displayoutgoing(&g)) { 569 owl_function_add_message(m); 570 } else { 571 owl_message_free(m); 572 } 510 owl_global_messagequeue_addmsg(&g, m); 573 511 } else { 574 512 owl_function_error("Could not create AIM message"); … … 588 526 * an incoming message */ 589 527 min=owl_malloc(sizeof(owl_message)); 528 mout=owl_function_make_outgoing_loopback(msg); 529 530 if (owl_global_is_displayoutgoing(&g)) { 531 owl_global_messagequeue_addmsg(&g, mout); 532 } else { 533 owl_message_free(mout); 534 } 535 590 536 owl_message_create_loopback(min, msg); 591 537 owl_message_set_direction_in(min); 592 538 owl_global_messagequeue_addmsg(&g, min); 593 594 mout=owl_function_make_outgoing_loopback(msg);595 owl_log_message(mout);596 if (owl_global_is_displayoutgoing(&g)) {597 owl_function_add_message(mout);598 } else {599 owl_message_free(mout);600 }601 539 602 540 /* fake a makemsg */
Note: See TracChangeset
for help on using the changeset viewer.