From 62835f070c26a7d066e9dc6b40c0df4e15c0e91c Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Fri, 20 Jul 2007 19:18:09 +0000 Subject: status_bar() updated to use window_t type --- src/utils.c | 6 +++--- src/utils.h | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/utils.c b/src/utils.c index 95914a3..37ba0db 100755 --- a/src/utils.c +++ b/src/utils.c @@ -1,4 +1,4 @@ -/* $calcurse: utils.c,v 1.29 2007/07/01 17:50:53 culot Exp $ */ +/* $calcurse: utils.c,v 1.30 2007/07/20 19:18:09 culot Exp $ */ /* * Calcurse - text-based organizer @@ -375,7 +375,7 @@ border_nocolor(WINDOW *window) * utils.h, depending on which panel the added keybind is assigned to. */ void -status_bar(int which_pan, int nc_bar, int nl_bar) +status_bar(int which_pan, window_t *win) { int cmd_length, space_between_cmds, start, end, i, j = 0; const int pos[NB_PANELS + 1] = @@ -425,7 +425,7 @@ status_bar(int which_pan, int nc_bar, int nl_bar) cmd_length += space_between_cmds; /* Drawing the keybinding with attribute and label without. */ - erase_window_part(swin, 0, 0, nc_bar, nl_bar); + erase_window_part(swin, 0, 0, win->w, win->h); start = pos[which_pan] + 2*CMDS_PER_LINE*(status_page - 1); end = MIN(start + 2*CMDS_PER_LINE, pos[which_pan + 1]); for (i = start; i < end; i += 2) { diff --git a/src/utils.h b/src/utils.h index 48f7536..0549535 100755 --- a/src/utils.h +++ b/src/utils.h @@ -1,4 +1,4 @@ -/* $calcurse: utils.h,v 1.18 2007/07/01 17:50:53 culot Exp $ */ +/* $calcurse: utils.h,v 1.19 2007/07/20 19:19:56 culot Exp $ */ /* * Calcurse - text-based organizer @@ -28,6 +28,7 @@ #define CALCURSE_UTILS_H #include "calendar.h" +#include "vars.h" #define MAX(x,y) ((x)>(y)?(x):(y)) #define MIN(x,y) ((x)<(y)?(x):(y)) @@ -65,7 +66,7 @@ int updatestring(WINDOW *, char **, int, int); int is_all_digit(char *); void border_color(WINDOW *); void border_nocolor(WINDOW *); -void status_bar(int, int, int); +void status_bar(int, window_t *); long date2sec(date_t, unsigned, unsigned); char *date_sec2hour_str(long); char *date_sec2date_str(long); -- cgit v1.2.3-54-g00ecf