diff options
author | Morgan Seltzer <MorganSeltzer000@gmail.com> | 2021-06-07 17:13:23 -0400 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2021-08-07 13:42:10 -0400 |
commit | e3fc73e0c76addc0893ad3ceeba7ef8442133a51 (patch) | |
tree | 16f5fe4e89f5ace43471754c170c936bc9103f4c /src/config.c | |
parent | 61ed5f835cae29ce6405ec34a7e310d5ea90327b (diff) | |
download | calcurse-e3fc73e0c76addc0893ad3ceeba7ef8442133a51.tar.gz calcurse-e3fc73e0c76addc0893ad3ceeba7ef8442133a51.zip |
Backend changes for first day of week
Previously only Sunday and Monday were allowed for the first day of the
week, and was internally treated as a binary variable.
This patch changes the backend so all days are accepted, a future patch
will allow users to actually select other days.
Addresses GitHub feature request #321.
Signed-off-by: Morgan Seltzer <MorganSeltzer000@gmail.com>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/config.c')
-rw-r--r-- | src/config.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/config.c b/src/config.c index b309c28..2df2559 100644 --- a/src/config.c +++ b/src/config.c @@ -468,10 +468,9 @@ static int config_serialize_default_panel(char **buf, void *dummy) static int config_serialize_first_day_of_week(char **buf, void *dummy) { - if (ui_calendar_week_begins_on_monday()) - *buf = mem_strdup("monday"); - else - *buf = mem_strdup("sunday"); + *buf = mem_strdup(get_wday_default_string(ui_calendar_get_wday_start())); + /* now stores string with uppercase first letter, changing to lower */ + **buf = tolower(**buf); return 1; } |