From: Jaakko Heinonen Date: Tue, 8 Oct 2002 15:13:56 +0000 (+0000) Subject: merged newtabstyle.diff X-Git-Tag: upstream/0.6.1~2^2~273 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=a7c0a4d347393550a0671c68cb848d142226f5ba;p=pkg%2Fabook.git merged newtabstyle.diff --- diff --git a/edit.c b/edit.c index d8e3278..67a8e2d 100644 --- a/edit.c +++ b/edit.c @@ -37,18 +37,29 @@ editor_tab(int tab) { int i; char *tab_names[] = { - "/ CONTACT \\", - "/ ADDRESS \\", - "/ PHONE \\", - "/ OTHER \\" + " CONTACT ", + " ADDRESS ", + " PHONE ", + " OTHER " }; mvwhline(editw, TABLINE+1, 0, UI_HLINE_CHAR, EDITW_COLS); + for(i=0; i < TABS; i++) { + mvwaddch(editw, TABLINE+1, 16 * i + 2, UI_TEE_CHAR); + mvwaddch(editw, TABLINE+1, 16 * i + 14, UI_TEE_CHAR); + } - for(i=0; i < TABS; i++) - mvwaddstr(editw, TABLINE, 16 * i + 3, tab_names[i]); + for(i=0; i < TABS; i++) { + mvwaddch(editw, TABLINE, 16 * i + 2, UI_ULCORNER_CHAR); + mvwaddch(editw, TABLINE, 16 * i + 3, UI_LBOXLINE_CHAR); + mvwaddstr(editw, TABLINE, 16 * i + 4, tab_names[i]); + mvwaddch(editw, TABLINE, 16 * i + 13, UI_RBOXLINE_CHAR); + mvwaddch(editw, TABLINE, 16 * i + 14, UI_URCORNER_CHAR); + } - mvwaddstr(editw, TABLINE+1, 16 * tab + 2, "/ \\"); + mvwaddch(editw, TABLINE+1, 16 * tab + 2, UI_LRCORNER_CHAR); + mvwaddstr(editw, TABLINE+1, 16 * tab + 3, " "); + mvwaddch(editw, TABLINE+1, 16 * tab + 14, UI_LLCORNER_CHAR); } void diff --git a/ui.h b/ui.h index 5cdd873..fdb4dca 100644 --- a/ui.h +++ b/ui.h @@ -37,5 +37,19 @@ void ui_open_datafile(); #define UI_HLINE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ '-' : ACS_HLINE +#define UI_TEE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ + '-' : ACS_BTEE +#define UI_LBOXLINE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ + '/' : ACS_HLINE +#define UI_RBOXLINE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ + '\\' : ACS_HLINE +#define UI_ULCORNER_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ + ' ' : ACS_ULCORNER +#define UI_URCORNER_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ + ' ' : ACS_URCORNER +#define UI_LLCORNER_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ + '+' : ACS_LLCORNER +#define UI_LRCORNER_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ + '+' : ACS_LRCORNER #endif