diff options
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 29 |
1 files changed, 17 insertions, 12 deletions
@@ -1491,8 +1491,8 @@ static iBool handleIdentityCreationCommands_(iWidget *dlg, const char *cmd) { | |||
1491 | const iString *country = text_InputWidget (findChild_Widget(dlg, "ident.country")); | 1491 | const iString *country = text_InputWidget (findChild_Widget(dlg, "ident.country")); |
1492 | const iBool isTemp = isSelected_Widget(findChild_Widget(dlg, "ident.temp")); | 1492 | const iBool isTemp = isSelected_Widget(findChild_Widget(dlg, "ident.temp")); |
1493 | if (isEmpty_String(commonName)) { | 1493 | if (isEmpty_String(commonName)) { |
1494 | makeMessage_Widget(orange_ColorEscape "MISSING INFO", | 1494 | makeSimpleMessage_Widget(orange_ColorEscape "MISSING INFO", |
1495 | "A \"Common name\" must be specified."); | 1495 | "A \"Common name\" must be specified."); |
1496 | return iTrue; | 1496 | return iTrue; |
1497 | } | 1497 | } |
1498 | iDate until; | 1498 | iDate until; |
@@ -1506,11 +1506,11 @@ static iBool handleIdentityCreationCommands_(iWidget *dlg, const char *cmd) { | |||
1506 | "%04u-%u-%u %u:%u:%u", | 1506 | "%04u-%u-%u %u:%u:%u", |
1507 | &val[0], &val[1], &val[2], &val[3], &val[4], &val[5]); | 1507 | &val[0], &val[1], &val[2], &val[3], &val[4], &val[5]); |
1508 | if (n <= 0) { | 1508 | if (n <= 0) { |
1509 | makeMessage_Widget(orange_ColorEscape "INVALID DATE", | 1509 | makeSimpleMessage_Widget(orange_ColorEscape "INVALID DATE", |
1510 | "Please check the \"Valid until\" date. Examples:\n" | 1510 | "Please check the \"Valid until\" date. Examples:\n" |
1511 | "\u2022 2030\n" | 1511 | "\u2022 2030\n" |
1512 | "\u2022 2025-06-30\n" | 1512 | "\u2022 2025-06-30\n" |
1513 | "\u2022 2021-12-31 23:59:59"); | 1513 | "\u2022 2021-12-31 23:59:59"); |
1514 | return iTrue; | 1514 | return iTrue; |
1515 | } | 1515 | } |
1516 | until.year = val[0]; | 1516 | until.year = val[0]; |
@@ -1525,8 +1525,8 @@ static iBool handleIdentityCreationCommands_(iWidget *dlg, const char *cmd) { | |||
1525 | initCurrent_Time(&now); | 1525 | initCurrent_Time(&now); |
1526 | init_Time(&t, &until); | 1526 | init_Time(&t, &until); |
1527 | if (cmp_Time(&t, &now) <= 0) { | 1527 | if (cmp_Time(&t, &now) <= 0) { |
1528 | makeMessage_Widget(orange_ColorEscape "INVALID DATE", | 1528 | makeSimpleMessage_Widget(orange_ColorEscape "INVALID DATE", |
1529 | "Expiration date must be in the future."); | 1529 | "Expiration date must be in the future."); |
1530 | return iTrue; | 1530 | return iTrue; |
1531 | } | 1531 | } |
1532 | } | 1532 | } |
@@ -1559,9 +1559,10 @@ const iString *searchQueryUrl_App(const iString *queryStringUnescaped) { | |||
1559 | iBool handleCommand_App(const char *cmd) { | 1559 | iBool handleCommand_App(const char *cmd) { |
1560 | iApp *d = &app_; | 1560 | iApp *d = &app_; |
1561 | if (equal_Command(cmd, "config.error")) { | 1561 | if (equal_Command(cmd, "config.error")) { |
1562 | makeMessage_Widget(uiTextCaution_ColorEscape "CONFIG ERROR", | 1562 | makeSimpleMessage_Widget(uiTextCaution_ColorEscape "CONFIG ERROR", |
1563 | format_CStr("Error in config file: %s\nSee \"about:debug\" for details.", | 1563 | format_CStr("Error in config file: %s\n" |
1564 | suffixPtr_Command(cmd, "where"))); | 1564 | "See \"about:debug\" for details.", |
1565 | suffixPtr_Command(cmd, "where"))); | ||
1565 | return iTrue; | 1566 | return iTrue; |
1566 | } | 1567 | } |
1567 | else if (equal_Command(cmd, "prefs.changed")) { | 1568 | else if (equal_Command(cmd, "prefs.changed")) { |
@@ -1810,6 +1811,10 @@ iBool handleCommand_App(const char *cmd) { | |||
1810 | setCStr_String(&d->prefs.downloadDir, suffixPtr_Command(cmd, "path")); | 1811 | setCStr_String(&d->prefs.downloadDir, suffixPtr_Command(cmd, "path")); |
1811 | return iTrue; | 1812 | return iTrue; |
1812 | } | 1813 | } |
1814 | else if (equal_Command(cmd, "downloads.open")) { | ||
1815 | postCommandf_App("open url:%s", cstrCollect_String(makeFileUrl_String(downloadDir_App()))); | ||
1816 | return iTrue; | ||
1817 | } | ||
1813 | else if (equal_Command(cmd, "ca.file")) { | 1818 | else if (equal_Command(cmd, "ca.file")) { |
1814 | setCStr_String(&d->prefs.caFile, suffixPtr_Command(cmd, "path")); | 1819 | setCStr_String(&d->prefs.caFile, suffixPtr_Command(cmd, "path")); |
1815 | if (!argLabel_Command(cmd, "noset")) { | 1820 | if (!argLabel_Command(cmd, "noset")) { |