Changeset 0697f09
- Timestamp:
- Oct 19, 2009, 10:21:04 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 26255f0
- Parents:
- 12e291a
- git-author:
- Alejandro R. Sedeño <asedeno@mit.edu> (10/13/09 03:18:13)
- git-committer:
- Alejandro R. Sedeño <asedeno@mit.edu> (10/19/09 22:21:04)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
owl.c
rdbf94e9 r0697f09 470 470 owl_popwin *pw; 471 471 int argcsave, followlast; 472 int newmsgs , nexttimediff;472 int newmsgs; 473 473 const char *const *argvsave; 474 474 char *perlout, *perlerr; 475 475 const owl_style *s; 476 time_t nexttime, now;477 struct tm *today;478 476 const char *dir; 479 477 owl_message *m; … … 621 619 owl_context_set_interactive(owl_global_get_context(&g)); 622 620 623 nexttimediff=10;624 nexttime=time(NULL);625 626 621 owl_select_add_timer(180, 180, owl_zephyr_buddycheck_timer, NULL, NULL); 627 622 … … 643 638 644 639 followlast=owl_global_should_followlast(&g); 645 646 /* little hack */647 now=time(NULL);648 today=localtime(&now);649 if (today->tm_mon==9 && today->tm_mday==31 && owl_global_get_runtime(&g)<600) {650 if (time(NULL)>nexttime) {651 if (nexttimediff==1) {652 nexttimediff=10;653 } else {654 nexttimediff=1;655 }656 nexttime+=nexttimediff;657 owl_hack_animate();658 }659 }660 640 661 641 /* Grab incoming messages. */ -
util.c
r435001d r0697f09 475 475 } 476 476 477 478 /* Animation hack */479 void owl_hack_animate(void)480 {481 const owl_messagelist *ml;482 owl_message *m;483 owl_fmtext *fm;484 const char *text, *ptr;485 int place;486 487 /* grab the first message and make sure its id is 0 */488 ml=owl_global_get_msglist(&g);489 m=owl_messagelist_get_element(ml, 0);490 if (!m) return;491 if (owl_message_get_id(m)!=0) return;492 493 fm=owl_message_get_fmtext(m);494 text=owl_fmtext_get_text(fm);495 496 ptr=strstr(text, "OvO");497 if (ptr) {498 place=ptr-text;499 owl_fmtext_set_char(fm, place, '-');500 owl_fmtext_set_char(fm, place+2, '-');501 502 owl_mainwin_redisplay(owl_global_get_mainwin(&g));503 if (owl_popwin_is_active(owl_global_get_popwin(&g))) {504 owl_popwin_refresh(owl_global_get_popwin(&g));505 /* TODO: this is a broken kludge */506 if (owl_global_get_viewwin(&g)) {507 owl_viewwin_redisplay(owl_global_get_viewwin(&g), 0);508 }509 }510 owl_global_set_needrefresh(&g);511 return;512 }513 514 ptr=strstr(text, "-v-");515 if (ptr) {516 place=ptr-text;517 owl_fmtext_set_char(fm, place, 'O');518 owl_fmtext_set_char(fm, place+2, 'O');519 520 owl_mainwin_redisplay(owl_global_get_mainwin(&g));521 if (owl_popwin_is_active(owl_global_get_popwin(&g))) {522 owl_popwin_refresh(owl_global_get_popwin(&g));523 /* TODO: this is a broken kludge */524 if (owl_global_get_viewwin(&g)) {525 owl_viewwin_redisplay(owl_global_get_viewwin(&g), 0);526 }527 }528 owl_global_set_needrefresh(&g);529 return;530 }531 }532 533 477 /* strip leading and trailing new lines. Caller must free the 534 478 * return.
Note: See TracChangeset
for help on using the changeset viewer.