From: Pierre Habouzit Date: Wed, 7 Nov 2007 22:40:38 +0000 (+0100) Subject: More lightweight boxen X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=6a0262162a1d5e1ab850dbe4d254bbf81b174847;p=apps%2Fmadmutt.git More lightweight boxen Signed-off-by: Pierre Habouzit --- diff --git a/lib-ui/menu.c b/lib-ui/menu.c index 928834c..f3ca7c5 100644 --- a/lib-ui/menu.c +++ b/lib-ui/menu.c @@ -116,9 +116,8 @@ void menu_redraw_full (MUTTMENU * menu) wmove (main_w, 0, 0); wclrtobot (main_w); - SETCOLOR(main_w, MT_COLOR_STATUS); - wmove (main_w, LINES - 2, 0); - mutt_paddstr (main_w, getmaxx(main_w), ""); + SETCOLOR(main_w, MT_COLOR_SIDEBAR); + mvwhline(main_w, LINES - 2, 0, ACS_HLINE, getmaxx(main_w)); SETCOLOR(main_w, MT_COLOR_NORMAL); menu->offset = 1; menu->pagelen = LINES - 3; diff --git a/lib-ui/sidebar.c b/lib-ui/sidebar.c index 180e0c3..e99c9c6 100644 --- a/lib-ui/sidebar.c +++ b/lib-ui/sidebar.c @@ -254,7 +254,6 @@ int sidebar_draw(void) { static short prev_show_value = -1; int x, y, line; - char blank[STRING]; WINDOW *sw; /* initialize first time */ @@ -270,11 +269,9 @@ int sidebar_draw(void) return 0; getmaxyx(sw, y, x); - memset(&blank, ' ', sizeof(blank)); - - wmove(sw, 0, 0); - SETCOLOR(sw, MT_COLOR_STATUS); - waddnstr(sw, blank, x); + SETCOLOR(sw, MT_COLOR_SIDEBAR); + mvwhline(sw, 0, 0, ACS_HLINE, x - 1); + mvwaddch(sw, 0, x - 1, ACS_TTEE); line = 1; for (int i = calc_boundaries(); i < Incoming.len && line < y - 1; i++) { @@ -298,15 +295,14 @@ int sidebar_draw(void) while (line < y - 1) { SETCOLOR(sw, MT_COLOR_NORMAL); - waddnstr(sw, blank, x - 1); + whline(sw, ' ', x - 1); SETCOLOR(sw, MT_COLOR_SIDEBAR); - waddch(sw, ACS_VLINE); - line++; + mvwaddch(sw, line++, x - 1, ACS_VLINE); } - SETCOLOR(sw, MT_COLOR_STATUS); - waddnstr(sw, blank, x); - SETCOLOR(sw, MT_COLOR_NORMAL); + SETCOLOR(sw, MT_COLOR_SIDEBAR); + mvwhline(sw, y - 1, 0, ACS_HLINE, x - 1); + mvwaddch(sw, y - 1, x - 1, ACS_BTEE); return 0; } diff --git a/pager.c b/pager.c index 19a8c70..78887cc 100644 --- a/pager.c +++ b/pager.c @@ -1230,7 +1230,6 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) int bodyoffset = 1; /* offset of first line of real text */ int statusoffset = 0; /* offset for the status bar */ - int helpoffset = LINES - 2; /* offset for the help bar. */ int bodylen = LINES - 2 - bodyoffset; /* length of displayable area */ MUTTMENU *pager_index = NULL; /* the Pager Index (PI) */ @@ -1289,12 +1288,10 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t * extra) statusoffset = IsHeader (extra) ? indexlen : 0; bodyoffset = statusoffset + 1; - helpoffset = LINES - 2; - bodylen = helpoffset - bodyoffset; + bodylen = LINES - 2 - bodyoffset; - SETCOLOR(main_w, MT_COLOR_STATUS); - wmove(main_w, helpoffset, 0); - mutt_paddstr(main_w, getmaxx(main_w), ""); + SETCOLOR(main_w, MT_COLOR_SIDEBAR); + mvwhline(main_w, LINES - 2, 0, ACS_HLINE, getmaxx(main_w)); SETCOLOR(main_w, MT_COLOR_NORMAL); if (Resize != NULL) {