Changeset 237d02c for message.c


Ignore:
Timestamp:
Feb 26, 2011, 12:58:30 AM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
cb6c9e1
Parents:
7659079
git-author:
David Benjamin <davidben@mit.edu> (02/25/11 15:25:58)
git-committer:
David Benjamin <davidben@mit.edu> (02/26/11 00:58:30)
Message:
Remove default_{attrs,fgcolor,bgcolor} from owl_fmtext

They didn't quite behave when appending two owl_fmtexts together; what
does it mean to append a string whose default color is red to one whose
default color is blue? (And then you set the default to green
afterwards...)

Now owl_fmtext is merely a unicode string with formatting characters.
Default attributes are instead a property of how you view the string and
are passed to owl_fmtext_curs_waddstr. Which unfortunately means it has
a lot of arguments. :-/
File:
1 edited

Legend:

Unmodified
Added
Removed
  • message.c

    r3472845 r237d02c  
    525525  owl_fmtext_truncate_lines(&(m->fmtext->fmtext), aline, bline-aline, &a);
    526526  owl_fmtext_truncate_cols(&a, acol, bcol, &b);
    527   owl_fmtext_colorize(&b, fgcolor);
    528   owl_fmtext_colorizebg(&b, bgcolor);
    529 
    530   owl_fmtext_curs_waddstr(&b, win);
     527
     528  owl_fmtext_curs_waddstr(&b, win, OWL_FMTEXT_ATTR_NONE, fgcolor, bgcolor);
    531529
    532530  owl_fmtext_cleanup(&a);
Note: See TracChangeset for help on using the changeset viewer.