From 4b987f70ac463121f9791eb3493952a77aba495f Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Sat, 28 Jul 2007 13:11:42 +0000 Subject: unuseful headers removed and some functions became static --- src/wins.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 4 deletions(-) (limited to 'src/wins.c') diff --git a/src/wins.c b/src/wins.c index 3fdbda0..17b6230 100755 --- a/src/wins.c +++ b/src/wins.c @@ -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 #include #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. -- cgit v1.2.3-54-g00ecf