X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-ui%2Fmenu.c;h=d0b8c54df12843ed25d25935147963cdfb79e29a;hp=928834cadd0c42ee94085eadeced0417f89b2ace;hb=83170cc0ea7b56b7ffe3b311b6b7d831393e7524;hpb=7dcd7ee09b8760133ac8ec00562e4d60b2f0aebd diff --git a/lib-ui/menu.c b/lib-ui/menu.c index 928834c..d0b8c54 100644 --- a/lib-ui/menu.c +++ b/lib-ui/menu.c @@ -16,7 +16,6 @@ #include "charset.h" #include -#include extern size_t UngetCount; @@ -112,13 +111,9 @@ static void menu_pad_string (char *s, size_t n) void menu_redraw_full (MUTTMENU * menu) { SETCOLOR(main_w, MT_COLOR_NORMAL); - /* wclear() doesn't optimize screen redraws */ - 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), ""); + werase(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; @@ -181,12 +176,12 @@ void menu_redraw_motion (MUTTMENU * menu) return; } - wmove (main_w, menu->oldcurrent + menu->offset - menu->top, 0); SETCOLOR(main_w, MT_COLOR_NORMAL); BKGDSET(main_w, MT_COLOR_NORMAL); /* erase the current indicator */ - wattrset (main_w, menu->color (menu->oldcurrent)); + wattrset(main_w, menu->color(menu->oldcurrent)); + wmove (main_w, menu->oldcurrent + menu->offset - menu->top, 0); wclrtoeol (main_w); menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent); menu_pad_string (buf, sizeof (buf)); @@ -213,13 +208,13 @@ void menu_redraw_current (MUTTMENU * menu) { char buf[STRING]; - wmove (main_w, menu->current + menu->offset - menu->top, 0); menu_make_entry (buf, sizeof (buf), menu, menu->current); menu_pad_string (buf, sizeof (buf)); wattrset (main_w, menu->color (menu->current)); ADDCOLOR(main_w, MT_COLOR_INDICATOR); BKGDSET(main_w, MT_COLOR_INDICATOR); + wmove (main_w, menu->current + menu->offset - menu->top, 0); wclrtoeol (main_w); print_enriched_string (menu->color (menu->current), (unsigned char *) buf, 0); @@ -240,9 +235,9 @@ static void menu_redraw_prompt (MUTTMENU * menu) if (*Errorbuf) mutt_clear_error (); - SETCOLOR(main_w, MT_COLOR_NORMAL); - mvwaddstr (main_w, LINES - 1, 0, menu->prompt); - wclrtoeol (main_w); + SETCOLOR(stdscr, MT_COLOR_NORMAL); + mvwaddstr(stdscr, LINES - 1, 0, menu->prompt); + wclrtoeol(stdscr); } } @@ -683,11 +678,11 @@ int mutt_menuLoop (MUTTMENU * menu) i = km_dokey (menu->menu); if (i == OP_TAG_PREFIX || i == OP_TAG_PREFIX_COND) { if (menu->tagged) { - mvwaddstr (main_w, LINES - 1, 0, "Tag-"); - wclrtoeol (main_w); + mvwaddstr(stdscr, LINES - 1, 0, "Tag-"); + wclrtoeol(stdscr); i = km_dokey (menu->menu); menu->tagprefix = 1; - CLEARLINE(main_w, LINES - 1); + CLEARLINE(stdscr, LINES - 1); } else if (i == OP_TAG_PREFIX) { mutt_error _("No tagged entries."); @@ -842,10 +837,6 @@ int mutt_menuLoop (MUTTMENU * menu) MAYBE_REDRAW (menu->redraw); break; - case OP_WHAT_KEY: - mutt_what_key (); - break; - case OP_REDRAW: clearok (main_w, TRUE); menu->redraw = REDRAW_FULL;