summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/app.c b/src/app.c
index 29d88c2b..f44fdf4f 100644
--- a/src/app.c
+++ b/src/app.c
@@ -1008,7 +1008,7 @@ static iBool handleIdentityCreationCommands_(iWidget *dlg, const char *cmd) {
1008 sscanf(cstr_String(text_InputWidget(findChild_Widget(dlg, "ident.until"))), 1008 sscanf(cstr_String(text_InputWidget(findChild_Widget(dlg, "ident.until"))),
1009 "%04u-%u-%u %u:%u:%u", 1009 "%04u-%u-%u %u:%u:%u",
1010 &val[0], &val[1], &val[2], &val[3], &val[4], &val[5]); 1010 &val[0], &val[1], &val[2], &val[3], &val[4], &val[5]);
1011 if (n <= 0 || val[0] < (unsigned) today.year) { 1011 if (n <= 0) {
1012 makeMessage_Widget(orange_ColorEscape "INVALID DATE", 1012 makeMessage_Widget(orange_ColorEscape "INVALID DATE",
1013 "Please check the \"Valid until\" date. Examples:\n" 1013 "Please check the \"Valid until\" date. Examples:\n"
1014 "\u2022 2030\n" 1014 "\u2022 2030\n"
@@ -1022,6 +1022,7 @@ static iBool handleIdentityCreationCommands_(iWidget *dlg, const char *cmd) {
1022 until.hour = n >= 4 ? val[3] : 0; 1022 until.hour = n >= 4 ? val[3] : 0;
1023 until.minute = n >= 5 ? val[4] : 0; 1023 until.minute = n >= 5 ? val[4] : 0;
1024 until.second = n == 6 ? val[5] : 0; 1024 until.second = n == 6 ? val[5] : 0;
1025 until.gmtOffsetSeconds = today.gmtOffsetSeconds;
1025 /* In the past? */ { 1026 /* In the past? */ {
1026 iTime now, t; 1027 iTime now, t;
1027 initCurrent_Time(&now); 1028 initCurrent_Time(&now);
@@ -1471,6 +1472,7 @@ iBool handleCommand_App(const char *cmd) {
1471 } 1472 }
1472 else if (equal_Command(cmd, "ident.new")) { 1473 else if (equal_Command(cmd, "ident.new")) {
1473 iWidget *dlg = makeIdentityCreation_Widget(); 1474 iWidget *dlg = makeIdentityCreation_Widget();
1475 setFocus_Widget(findChild_Widget(dlg, "ident.until"));
1474 setCommandHandler_Widget(dlg, handleIdentityCreationCommands_); 1476 setCommandHandler_Widget(dlg, handleIdentityCreationCommands_);
1475 return iTrue; 1477 return iTrue;
1476 } 1478 }