From: Pierre Habouzit Date: Sat, 11 Aug 2007 10:10:07 +0000 (+0200) Subject: Let ncurses deal with that properly. X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=43ff595b82123a6f606b4ae6d0c27968f5916386;p=apps%2Fmadmutt.git Let ncurses deal with that properly. Signed-off-by: Pierre Habouzit --- diff --git a/init.h b/init.h index af4329d..1cbfc55 100644 --- a/init.h +++ b/init.h @@ -119,12 +119,6 @@ struct option_t MuttVars[] = { ** message could include a line like ``\fT[-- PGP output follows ...\fP" and ** give it the same color as your attachment color. */ - {"ascii_chars", DT_BOOL, R_BOTH, OPTASCIICHARS, "no" }, - /* - ** .pp - ** If \fIset\fP, Madmutt will use plain ASCII characters when displaying thread - ** and attachment trees, instead of the default \fTACS\fP characters. - */ {"askbcc", DT_BOOL, R_NONE, OPTASKBCC, "no" }, /* ** .pp diff --git a/lib-ui/menu.c b/lib-ui/menu.c index 1ce9f47..94619a3 100644 --- a/lib-ui/menu.c +++ b/lib-ui/menu.c @@ -38,60 +38,25 @@ static void print_enriched_string (int attr, unsigned char *s, int do_color) while (*s && *s < M_TREE_MAX) { switch (*s) { case M_TREE_LLCORNER: - if (option (OPTASCIICHARS)) - addch ('`'); - else if (Charset_is_utf8) - addstr ("\342\224\224"); /* WACS_LLCORNER */ - else - addch (ACS_LLCORNER); + addch (ACS_LLCORNER); break; case M_TREE_ULCORNER: - if (option (OPTASCIICHARS)) - addch (','); - else if (Charset_is_utf8) - addstr ("\342\224\214"); /* WACS_ULCORNER */ - else - addch (ACS_ULCORNER); + addch (ACS_ULCORNER); break; case M_TREE_LTEE: - if (option (OPTASCIICHARS)) - addch ('|'); - else if (Charset_is_utf8) - addstr ("\342\224\234"); /* WACS_LTEE */ - else - addch (ACS_LTEE); + addch (ACS_LTEE); break; case M_TREE_HLINE: - if (option (OPTASCIICHARS)) - addch ('-'); - else if (Charset_is_utf8) - addstr ("\342\224\200"); /* WACS_HLINE */ - else - addch (ACS_HLINE); + addch (ACS_HLINE); break; case M_TREE_VLINE: - if (option (OPTASCIICHARS)) - addch ('|'); - else if (Charset_is_utf8) - addstr ("\342\224\202"); /* WACS_VLINE */ - else - addch (ACS_VLINE); + addch (ACS_VLINE); break; case M_TREE_TTEE: - if (option (OPTASCIICHARS)) - addch ('-'); - else if (Charset_is_utf8) - addstr ("\342\224\254"); /* WACS_TTEE */ - else - addch (ACS_TTEE); + addch (ACS_TTEE); break; case M_TREE_BTEE: - if (option (OPTASCIICHARS)) - addch ('-'); - else if (Charset_is_utf8) - addstr ("\342\224\264"); /* WACS_BTEE */ - else - addch (ACS_BTEE); + addch (ACS_BTEE); break; case M_TREE_SPACE: addch (' '); diff --git a/lib-ui/menu.h b/lib-ui/menu.h index f99de6e..173c094 100644 --- a/lib-ui/menu.h +++ b/lib-ui/menu.h @@ -8,9 +8,6 @@ */ #ifndef _MUTT_MENU_H #define _MUTT_MENU_H -/* - * This file is named mutt_menu.h so it doesn't collide with ncurses menu.h - */ #include diff --git a/lib-ui/sidebar.c b/lib-ui/sidebar.c index 8065e55..d5434a9 100644 --- a/lib-ui/sidebar.c +++ b/lib-ui/sidebar.c @@ -270,12 +270,8 @@ void sidebar_draw_frames (void) { SETCOLOR (MT_COLOR_SIDEBAR); for (i = 0; i < LINES-1; i++) { move (i, SidebarWidth - delim_len); - if (option (OPTASCIICHARS)) - addstr (NONULL (SidebarDelim)); - else if (!option (OPTASCIICHARS) && !m_strcmp(SidebarDelim, "|")) + if (!m_strcmp(SidebarDelim, "|")) addch (ACS_VLINE); - else if ((Charset_is_utf8) && !m_strcmp(SidebarDelim, "|")) - addstr ("\342\224\202"); else addstr (NONULL (SidebarDelim)); } diff --git a/main.c b/main.c index 8a1b70a..0387a17 100644 --- a/main.c +++ b/main.c @@ -219,9 +219,6 @@ static void show_version (void) static void start_curses (void) { km_init (); /* must come before mutt_init */ - - /* should come before initscr() so that ncurses 4.2 doesn't try to install - its own SIGWINCH handler */ mutt_signal_initialize (); if (initscr () == NULL) { puts _("Error initializing terminal."); diff --git a/mutt.h b/mutt.h index 06b9fbb..f12bf9b 100644 --- a/mutt.h +++ b/mutt.h @@ -200,7 +200,6 @@ enum { enum { OPTALLOW8BIT, OPTALLOWANSI, - OPTASCIICHARS, OPTASKBCC, OPTASKCC, OPTASKFOLLOWUP, diff --git a/thread.c b/thread.c index 63013ba..c5cc040 100644 --- a/thread.c +++ b/thread.c @@ -195,10 +195,6 @@ static void calculate_visibility (CONTEXT * ctx, int *max_depth) /* Since the graphics characters have a value >255, I have to resort to * using escape sequences to pass the information to print_enriched_string(). * These are the macros M_TREE_* defined in mutt.h. - * - * ncurses should automatically use the default ASCII characters instead of - * graphics chars on terminals which don't support them (see the man page - * for curs_addch). */ void mutt_draw_tree (CONTEXT * ctx) {