]> git.deb.at Git - pkg/abook.git/commitdiff
merged newtabstyle.diff
authorJaakko Heinonen <jheinonen@users.sourceforge.net>
Tue, 8 Oct 2002 15:13:56 +0000 (15:13 +0000)
committerJaakko Heinonen <jheinonen@users.sourceforge.net>
Tue, 8 Oct 2002 15:13:56 +0000 (15:13 +0000)
edit.c
ui.h

diff --git a/edit.c b/edit.c
index d8e3278065bff4922588d90ac446958e0f22e53d..67a8e2d7bd88e59a319a1656169b462dfee9e80e 100644 (file)
--- 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 5cdd87357412ee2b2c9bb7151b6ecdc65359ed9c..fdb4dcaeb1d8f9eb5ec0ab554a7bcca393fe580f 100644 (file)
--- 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