Changeset 0697f09 for util.c


Ignore:
Timestamp:
Oct 19, 2009, 10:21:04 PM (15 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
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)
Message:
Drop owl_animate_hack.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • util.c

    r435001d r0697f09  
    475475}
    476476
    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 
    533477/* strip leading and trailing new lines.  Caller must free the
    534478 * return.
Note: See TracChangeset for help on using the changeset viewer.