aboutsummaryrefslogtreecommitdiffstats
path: root/src/interaction.c
diff options
context:
space:
mode:
authorWilliam Pettersson <william.pettersson@gmail.com>2012-10-07 20:30:12 +1000
committerLukas Fleischer <calcurse@cryptocrack.de>2012-11-18 20:10:45 +0100
commit65dc58466260320303c7af8c5c8a8bfe3b0802c8 (patch)
tree2a1c04fcff360c0f70ccf2a3c2c630761cc9be98 /src/interaction.c
parent7e7987575a4d5228137dba649813307c381c5034 (diff)
downloadcalcurse-65dc58466260320303c7af8c5c8a8bfe3b0802c8.tar.gz
calcurse-65dc58466260320303c7af8c5c8a8bfe3b0802c8.zip
Add support for entering times in 24 hour format
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/interaction.c')
-rw-r--r--src/interaction.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/interaction.c b/src/interaction.c
index 0a3b743..2d6830e 100644
--- a/src/interaction.c
+++ b/src/interaction.c
@@ -42,9 +42,9 @@ struct day_item day_cut[38] = { { 0, 0, { NULL } } };
static int day_edit_time(int time, unsigned *new_hour, unsigned *new_minute)
{
char *timestr = date_sec2date_str(time, "%H:%M");
- const char *msg_time = _("Enter the new time ([hh:mm]) : ");
+ const char *msg_time = _("Enter the new time ([hh:mm] or [hhmm]) : ");
const char *enter_str = _("Press [Enter] to continue");
- const char *fmt_msg = _("You entered an invalid time, should be [hh:mm]");
+ const char *fmt_msg = _("You entered an invalid time, should be [hh:mm] or [hhmm]");
for (;;) {
status_mesg(msg_time, "");
@@ -67,9 +67,9 @@ static int day_edit_duration(int start, int dur, unsigned *new_duration)
char *timestr = date_sec2date_str(start + dur, "%H:%M");
const char *msg_time =
_
- ("Enter new end time ([hh:mm]) or duration ([+hh:mm], [+xxxdxxhxxm] or [+mm]) : ");
+ ("Enter new end time ([hh:mm], [hhmm]) or duration ([+hh:mm], [+xxxdxxhxxm] or [+mm]) : ");
const char *enter_str = _("Press [Enter] to continue");
- const char *fmt_msg = _("You entered an invalid time, should be [hh:mm]");
+ const char *fmt_msg = _("You entered an invalid time, should be [hh:mm] or [hhmm]");
long newtime;
unsigned hr, mn;
@@ -414,16 +414,16 @@ void interact_day_item_add(void)
#define LTIME 6
#define LDUR 12
const char *mesg_1 =
- _("Enter start time ([hh:mm]), leave blank for an all-day event : ");
+ _("Enter start time ([hh:mm] or [hhmm]), leave blank for an all-day event : ");
const char *mesg_2 =
_
- ("Enter end time ([hh:mm]) or duration ([+hh:mm], [+xxxdxxhxxm] or [+mm]) : ");
+ ("Enter end time ([hh:mm] or [hhmm]) or duration ([+hh:mm], [+xxxdxxhxxm] or [+mm]) : ");
const char *mesg_3 = _("Enter description :");
const char *format_message_1 =
- _("You entered an invalid start time, should be [hh:mm]");
+ _("You entered an invalid start time, should be [hh:mm] or [hhmm]");
const char *format_message_2 =
_
- ("Invalid end time/duration, should be [hh:mm], [+hh:mm], [+xxxdxxhxxm] or [+mm]");
+ ("Invalid end time/duration, should be [hh:mm], [hhmm], [+hh:mm], [+xxxdxxhxxm] or [+mm]");
const char *enter_str = _("Press [Enter] to continue");
int Id = 1;
char item_time[LDUR] = "";