status_bar() updated to use window_t type
This commit is contained in:
parent
e86181022d
commit
62835f070c
@ -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
|
* Calcurse - text-based organizer
|
||||||
@ -375,7 +375,7 @@ border_nocolor(WINDOW *window)
|
|||||||
* utils.h, depending on which panel the added keybind is assigned to.
|
* utils.h, depending on which panel the added keybind is assigned to.
|
||||||
*/
|
*/
|
||||||
void
|
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;
|
int cmd_length, space_between_cmds, start, end, i, j = 0;
|
||||||
const int pos[NB_PANELS + 1] =
|
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;
|
cmd_length += space_between_cmds;
|
||||||
|
|
||||||
/* Drawing the keybinding with attribute and label without. */
|
/* 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);
|
start = pos[which_pan] + 2*CMDS_PER_LINE*(status_page - 1);
|
||||||
end = MIN(start + 2*CMDS_PER_LINE, pos[which_pan + 1]);
|
end = MIN(start + 2*CMDS_PER_LINE, pos[which_pan + 1]);
|
||||||
for (i = start; i < end; i += 2) {
|
for (i = start; i < end; i += 2) {
|
||||||
|
@ -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
|
* Calcurse - text-based organizer
|
||||||
@ -28,6 +28,7 @@
|
|||||||
#define CALCURSE_UTILS_H
|
#define CALCURSE_UTILS_H
|
||||||
|
|
||||||
#include "calendar.h"
|
#include "calendar.h"
|
||||||
|
#include "vars.h"
|
||||||
|
|
||||||
#define MAX(x,y) ((x)>(y)?(x):(y))
|
#define MAX(x,y) ((x)>(y)?(x):(y))
|
||||||
#define MIN(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 *);
|
int is_all_digit(char *);
|
||||||
void border_color(WINDOW *);
|
void border_color(WINDOW *);
|
||||||
void border_nocolor(WINDOW *);
|
void border_nocolor(WINDOW *);
|
||||||
void status_bar(int, int, int);
|
void status_bar(int, window_t *);
|
||||||
long date2sec(date_t, unsigned, unsigned);
|
long date2sec(date_t, unsigned, unsigned);
|
||||||
char *date_sec2hour_str(long);
|
char *date_sec2hour_str(long);
|
||||||
char *date_sec2date_str(long);
|
char *date_sec2date_str(long);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user