summaryrefslogtreecommitdiff
path: root/src/custom.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2012-05-17 21:59:49 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2012-05-17 22:08:00 +0200
commit6c11b8985cbd8fbb5525a4c4d2338603b81729c5 (patch)
tree197335b82e9039ba98b2438e48c3d477aa198bc5 /src/custom.c
parentdec97c7c81add925511153a06639922974147018 (diff)
downloadcalcurse-6c11b8985cbd8fbb5525a4c4d2338603b81729c5.zip
Fix data type of "general.firstdayofweek"
This option wasn't converted to a proper data type when it was renamed from "week_begins_on_monday" to "general.firstdayofweek". Convert the boolean option into an enumeration type that can take the values "monday" and "sunday". Also, update the documentation, add a conversion rule to the upgrade script and convert the configuration file used in the test suite. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/custom.c')
-rw-r--r--src/custom.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/custom.c b/src/custom.c
index dab05d0..017136d 100644
--- a/src/custom.c
+++ b/src/custom.c
@@ -630,7 +630,7 @@ print_general_options (WINDOW *win)
CONFIRM_DELETE,
SYSTEM_DIAGS,
PROGRESS_BAR,
- WEEK_BEGINS_MONDAY,
+ FIRST_DAY_OF_WEEK,
OUTPUT_DATE_FMT,
INPUT_DATE_FMT,
NB_OPTIONS
@@ -700,12 +700,13 @@ print_general_options (WINDOW *win)
_("(if set to YES, progress bar will be displayed "
"when saving data)"));
y += YOFF;
- mvwprintw (win, y, XPOS, "[8] %s ", opt[WEEK_BEGINS_MONDAY]);
- print_bool_option_incolor (win, calendar_week_begins_on_monday (), y,
- XPOS + 4 + strlen (opt[WEEK_BEGINS_MONDAY]));
+ mvwprintw (win, y, XPOS, "[8] %s ", opt[FIRST_DAY_OF_WEEK]);
+ custom_apply_attr (win, ATTR_HIGHEST);
+ mvwprintw (win, y, XPOS + 4 + strlen (opt[FIRST_DAY_OF_WEEK]), "%s",
+ calendar_week_begins_on_monday () ? _("Monday") : _("Sunday"));
+ custom_remove_attr (win, ATTR_HIGHEST);
mvwprintw (win, y + 1, XPOS,
- _("(if set to YES, monday is the first day of the week, "
- "else it is sunday)"));
+ _("(specifies the first day of week in the calendar view)"));
y += YOFF;
mvwprintw (win, y, XPOS, "[9] %s ", opt[OUTPUT_DATE_FMT]);
custom_apply_attr (win, ATTR_HIGHEST);