diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2008-03-09 02:33:23 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2008-03-09 02:33:23 +0000 |
commit | 8fa33dc3365f0e27a5013748321def4bef937049 (patch) | |
tree | cf1498456001b55157c4ce9dcd516dd5226158e3 /Panel.c | |
parent | fa87ff02514cdd148cdcf8d24de0599a400f3918 (diff) |
Add Unicode support, enabled with the --enable-unicode
flag, which requires libncursesw.
Thanks to Sergej Pupykin!
Diffstat (limited to 'Panel.c')
-rw-r--r-- | Panel.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -265,8 +265,8 @@ void Panel_draw(Panel* this, bool focus) { attrset(attr); mvhline(y, x, ' ', this->w); if (scrollH < this->header.len) { - mvaddchnstr(y, x, this->header.chstr + scrollH, - MIN(this->header.len - scrollH, this->w)); + RichString_printoffnVal(this->header, y, x, scrollH, + MIN(this->header.len - scrollH, this->w)); } attrset(CRT_colors[RESET_COLOR]); y++; @@ -289,12 +289,12 @@ void Panel_draw(Panel* this, bool focus) { RichString_setAttr(&itemRef, highlight); mvhline(y + j, x+0, ' ', this->w); if (amt > 0) - mvaddchnstr(y+j, x+0, itemRef.chstr + scrollH, amt); + RichString_printoffnVal(itemRef, y+j, x+0, scrollH, amt); attrset(CRT_colors[RESET_COLOR]); } else { mvhline(y+j, x+0, ' ', this->w); if (amt > 0) - mvaddchnstr(y+j, x+0, itemRef.chstr + scrollH, amt); + RichString_printoffnVal(itemRef, y+j, x+0, scrollH, amt); } } for (int i = y + (last - first); i < y + this->h; i++) @@ -312,12 +312,14 @@ void Panel_draw(Panel* this, bool focus) { newObj->display(newObj, &newRef); mvhline(y+ this->oldSelected - this->scrollV, x+0, ' ', this->w); if (scrollH < oldRef.len) - mvaddchnstr(y+ this->oldSelected - this->scrollV, x+0, oldRef.chstr + this->scrollH, MIN(oldRef.len - scrollH, this->w)); + RichString_printoffnVal(oldRef, y+this->oldSelected - this->scrollV, x, + this->scrollH, MIN(oldRef.len - scrollH, this->w)); attrset(highlight); mvhline(y+this->selected - this->scrollV, x+0, ' ', this->w); RichString_setAttr(&newRef, highlight); if (scrollH < newRef.len) - mvaddchnstr(y+this->selected - this->scrollV, x+0, newRef.chstr + this->scrollH, MIN(newRef.len - scrollH, this->w)); + RichString_printoffnVal(newRef, y+this->selected - this->scrollV, x, + this->scrollH, MIN(newRef.len - scrollH, this->w)); attrset(CRT_colors[RESET_COLOR]); } this->oldSelected = this->selected; |