Mercurial > pidgin
diff console/libgnt/gnttree.c @ 13855:5b288502a382
[gaim-migrate @ 16314]
New widget GntEntry. It's mostly functional.
Some minor improvements to the box-packing code.
Minor improvements to the skeleton code for gnt, and completely change the name from my initial choice of GN (Glib and Ncurses) to GNT (Gaim Ncurses Toolkit).
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 23 Jun 2006 06:24:25 +0000 |
parents | a4c30c1d9de8 |
children | 3cdd05b9830a |
line wrap: on
line diff
--- a/console/libgnt/gnttree.c Fri Jun 23 00:57:30 2006 +0000 +++ b/console/libgnt/gnttree.c Fri Jun 23 06:24:25 2006 +0000 @@ -46,11 +46,11 @@ if ((wr = snprintf(str, widget->priv.width, "%s", row->text)) >= widget->priv.width) { /* XXX: ellipsize */ - str[widget->priv.width - 1] = 0; + str[widget->priv.width - 1 - pos] = 0; } else { - while (wr < widget->priv.width - 1) + while (wr < widget->priv.width - 1 - pos) str[wr++] = ' '; str[wr] = 0; } @@ -67,8 +67,8 @@ while (start < tree->bottom) { - wmove(widget->window, start - tree->top + pos, pos); - wclrtoeol(widget->window); + mvwhline(widget->window, start - tree->top + pos, pos, ' ', + widget->priv.width - pos * 2); start++; }