X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-ui%2Fsidebar.c;h=e99c9c6bd4fb83ab27ba05e76c9338f41c06341f;hp=abf76d762d4888b9dcde9ba87a0a206e5618fef2;hb=62660b191284bee3b9bc3eeb126f7632636af535;hpb=8ab1ab66eb1c4b95f9b2a5ed9c2b2cf1dfa74544 diff --git a/lib-ui/sidebar.c b/lib-ui/sidebar.c index abf76d7..e99c9c6 100644 --- a/lib-ui/sidebar.c +++ b/lib-ui/sidebar.c @@ -173,11 +173,6 @@ sidebar_number_format(char* dest, ssize_t destlen, return src; } -int sidebar_need_count(void) -{ - return sidebar_w && !m_strisempty(SidebarNumberFormat); -} - /* print single item * returns: * 0 item was not printed ('cause of $sidebar_newmail_only) @@ -259,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 */ @@ -275,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++) { @@ -303,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; }