From a49adf2db7cfb3e4b12fed948c76205a42f334cd Mon Sep 17 00:00:00 2001 From: mercurialmoon Date: Wed, 23 Dec 2020 19:15:05 -0800 Subject: Allow configuration of appointment time format Added the option to configure the format in which appointment time is displayed. The setting is called "format.appointmenttime" under the general settings menu. Setting defaults to previous behavior, which was "%H:%M". Signed-off-by: mercurialmoon Signed-off-by: Lukas Fleischer --- src/calcurse.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/calcurse.h') diff --git a/src/calcurse.h b/src/calcurse.h index e94be42..8d9e3d8 100644 --- a/src/calcurse.h +++ b/src/calcurse.h @@ -111,9 +111,6 @@ #define STATUSHEIGHT 2 #define MAX_NOTESIZ 40 -/* Format for appointment hours is: HH:MM */ -#define HRMIN_SIZE 6 - /* Maximum number of colors available. */ #define NBUSERCOLORS 6 @@ -306,6 +303,7 @@ struct conf { int input_datefmt; /* format for reading date */ enum pos heading_pos; /* left/center/right for heading in appts panel */ char day_heading[BUFSIZ]; /* format for displaying heading in appts panel */ + char timefmt[BUFSIZ]; /* format for displaying time in appts panel*/ }; #define EMPTY_DAY_DEFAULT "--" @@ -338,6 +336,9 @@ enum datefmt { /* Day heading default format. */ #define DAY_HEADING_DEFAULT "%B %e, %Y" +/* Appointment time default format. */ +#define APPT_TIME_DEFAULT "%H:%M" + /* * Calcurse representation of the date of a day in the calendar. * When time_t is a 32-bit signed integer, the year range is 1902 - 2037. -- cgit v1.2.3-54-g00ecf