diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-01-03 19:10:31 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-01-03 19:10:31 +0200 |
commit | 142d07eadbbce374ddc7b838279db2cd19c4faba (patch) | |
tree | 985bfefbe978655a81064e8a2dcb403aeb47afa7 /src | |
parent | 600fa2348ec7736bfbcd8511be3e92f973974cf9 (diff) |
DocumentWidget: Updating trust
Hide the warning banner immediately.
IssueID #107
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/documentwidget.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index c4cf0db9..1c95593b 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -1593,6 +1593,11 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) | |||
1593 | actionLabels + (canTrust ? 0 : haveFingerprint ? 1 : 2), | 1593 | actionLabels + (canTrust ? 0 : haveFingerprint ? 1 : 2), |
1594 | actionCmds + (canTrust ? 0 : haveFingerprint ? 1 : 2), | 1594 | actionCmds + (canTrust ? 0 : haveFingerprint ? 1 : 2), |
1595 | canTrust ? 3 : haveFingerprint ? 2 : 1); | 1595 | canTrust ? 3 : haveFingerprint ? 2 : 1); |
1596 | /* Enforce a minimum size. */ | ||
1597 | iWidget *sizer = new_Widget(); | ||
1598 | setSize_Widget(sizer, init_I2(gap_UI * 90, 1)); | ||
1599 | addChildFlags_Widget(dlg, iClob(sizer), frameless_WidgetFlag); | ||
1600 | arrange_Widget(dlg); | ||
1596 | addAction_Widget(dlg, SDLK_ESCAPE, 0, "message.ok"); | 1601 | addAction_Widget(dlg, SDLK_ESCAPE, 0, "message.ok"); |
1597 | addAction_Widget(dlg, SDLK_SPACE, 0, "message.ok"); | 1602 | addAction_Widget(dlg, SDLK_SPACE, 0, "message.ok"); |
1598 | return iTrue; | 1603 | return iTrue; |
@@ -1601,9 +1606,12 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) | |||
1601 | const iRangecc host = urlHost_String(d->mod.url); | 1606 | const iRangecc host = urlHost_String(d->mod.url); |
1602 | if (!isEmpty_Block(d->certFingerprint) && !isEmpty_Range(&host)) { | 1607 | if (!isEmpty_Block(d->certFingerprint) && !isEmpty_Range(&host)) { |
1603 | setTrusted_GmCerts(certs_App(), host, d->certFingerprint, &d->certExpiry); | 1608 | setTrusted_GmCerts(certs_App(), host, d->certFingerprint, &d->certExpiry); |
1604 | d->certFlags |= trusted_GmCertFlag; | 1609 | d->certFlags |= trusted_GmCertFlag; |
1605 | postCommand_App("document.reload"); | ||
1606 | postCommand_App("document.info"); | 1610 | postCommand_App("document.info"); |
1611 | updateTrust_DocumentWidget_(d, NULL); | ||
1612 | redoLayout_GmDocument(d->doc); | ||
1613 | invalidate_DocumentWidget_(d); | ||
1614 | refresh_Widget(d); | ||
1607 | } | 1615 | } |
1608 | return iTrue; | 1616 | return iTrue; |
1609 | } | 1617 | } |