Pass date parameter to ui_day_update_panel()
This allows for drawing appointment panels for days other than the current day. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
parent
bd4f4a136f
commit
ca83e65696
@ -627,7 +627,7 @@ void ui_day_scroll_pad_down(int, int);
|
|||||||
void ui_day_scroll_pad_up(int);
|
void ui_day_scroll_pad_up(int);
|
||||||
struct notify_app *apoint_check_next(struct notify_app *, long);
|
struct notify_app *apoint_check_next(struct notify_app *, long);
|
||||||
void apoint_switch_notify(struct apoint *);
|
void apoint_switch_notify(struct apoint *);
|
||||||
void ui_day_update_panel(int);
|
void ui_day_update_panel(int, struct date);
|
||||||
void apoint_paste_item(struct apoint *, long);
|
void apoint_paste_item(struct apoint *, long);
|
||||||
|
|
||||||
/* args.c */
|
/* args.c */
|
||||||
|
@ -923,7 +923,7 @@ void ui_day_scroll_pad_up(int nb_events_inday)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Updates the Appointment panel */
|
/* Updates the Appointment panel */
|
||||||
void ui_day_update_panel(int which_pan)
|
void ui_day_update_panel(int which_pan, struct date slctd_date)
|
||||||
{
|
{
|
||||||
int title_xpos;
|
int title_xpos;
|
||||||
int bordr = 1;
|
int bordr = 1;
|
||||||
@ -931,10 +931,8 @@ void ui_day_update_panel(int which_pan)
|
|||||||
int app_width = win[APP].w - bordr;
|
int app_width = win[APP].w - bordr;
|
||||||
int app_length = win[APP].h - bordr - title_lines;
|
int app_length = win[APP].h - bordr - title_lines;
|
||||||
long date;
|
long date;
|
||||||
struct date slctd_date;
|
|
||||||
|
|
||||||
/* variable inits */
|
/* variable inits */
|
||||||
slctd_date = *ui_calendar_get_slctd_day();
|
|
||||||
title_xpos =
|
title_xpos =
|
||||||
win[APP].w - (strlen(_(monthnames[slctd_date.mm - 1])) + 16);
|
win[APP].w - (strlen(_(monthnames[slctd_date.mm - 1])) + 16);
|
||||||
if (slctd_date.dd < 10)
|
if (slctd_date.dd < 10)
|
||||||
|
@ -507,7 +507,7 @@ void wins_update_border(int flags)
|
|||||||
void wins_update_panels(int flags)
|
void wins_update_panels(int flags)
|
||||||
{
|
{
|
||||||
if (flags & FLAG_APP)
|
if (flags & FLAG_APP)
|
||||||
ui_day_update_panel(slctd_win);
|
ui_day_update_panel(slctd_win, *ui_calendar_get_slctd_day());
|
||||||
if (flags & FLAG_TOD)
|
if (flags & FLAG_TOD)
|
||||||
ui_todo_update_panel(slctd_win);
|
ui_todo_update_panel(slctd_win);
|
||||||
if (flags & FLAG_CAL)
|
if (flags & FLAG_CAL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user