diff options
author | Frederic Culot <calcurse@culot.org> | 2007-07-28 13:11:42 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2007-07-28 13:11:42 +0000 |
commit | 4b987f70ac463121f9791eb3493952a77aba495f (patch) | |
tree | 2754295b8dd40b6818ddd80d97a327329de854c0 /src/wins.c | |
parent | fdc325acd8549acf0fb52c84b8074aef0c2c38c7 (diff) | |
download | calcurse-4b987f70ac463121f9791eb3493952a77aba495f.zip |
unuseful headers removed and some functions became static
Diffstat (limited to 'src/wins.c')
-rwxr-xr-x | src/wins.c | 54 |
1 files changed, 50 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: wins.c,v 1.2 2007/07/23 19:28:37 culot Exp $ */ +/* $Id: wins.c,v 1.3 2007/07/28 13:11:43 culot Exp $ */ /* * Calcurse - text-based organizer @@ -24,15 +24,13 @@ * */ -#include <ncurses.h> #include <stdlib.h> #include "i18n.h" -#include "vars.h" -#include "calendar.h" #include "notify.h" #include "utils.h" #include "todo.h" +#include "custom.h" #include "wins.h" static window_e slctd_win; @@ -245,6 +243,54 @@ wins_get_config(conf_t *conf, window_t *status, window_t *notify, } } +/* draw panel border in color */ +static void +border_color(WINDOW *window) +{ + int color_attr = A_BOLD; + int no_color_attr = A_BOLD; + + if (colorize) { + wattron(window, color_attr | COLOR_PAIR(COLR_CUSTOM)); + box(window, 0, 0); + } else { + wattron(window, no_color_attr); + box(window, 0, 0); + } + + if (colorize) { + wattroff(window, color_attr | COLOR_PAIR(COLR_CUSTOM)); + } else { + wattroff(window, no_color_attr); + } + + wnoutrefresh(window); +} + +/* draw panel border without any color */ +static void +border_nocolor(WINDOW *window) +{ + int color_attr = A_BOLD; + int no_color_attr = A_DIM; + + if (colorize) { + wattron(window, color_attr | COLOR_PAIR(COLR_DEFAULT)); + } else { + wattron(window, no_color_attr); + } + + box(window, 0, 0); + + if (colorize) { + wattroff(window, color_attr | COLOR_PAIR(COLR_DEFAULT)); + } else { + wattroff(window, no_color_attr); + } + + wnoutrefresh(window); +} + /* * Update all of the three windows and put a border around the * selected window. |