summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-12-09 20:57:34 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-12-09 20:57:34 +0200
commitf0e555b97f6adffbd8288ca3208934547a93af42 (patch)
tree818406bc2e4cf82a7fda2837c6090ce47cfd7e17 /src/ui
parentd72b54573599a8377d24d2812896ba2f8a11c6d3 (diff)
DocumentWidget: Clicking on certificate warning
Show the Certificate Status dialog. IssueID #93
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/documentwidget.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 7a297aa7..c9eda18f 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -2447,8 +2447,17 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e
2447 refresh_Widget(w); 2447 refresh_Widget(w);
2448 } 2448 }
2449 /* Clicking on the top/side banner navigates to site root. */ 2449 /* Clicking on the top/side banner navigates to site root. */
2450 if (contains_Rect(siteBannerRect_DocumentWidget_(d), pos_Click(&d->click))) { 2450 const iRect banRect = siteBannerRect_DocumentWidget_(d);
2451 postCommand_Widget(d, "navigate.root"); 2451 if (contains_Rect(banRect, pos_Click(&d->click))) {
2452 /* Clicking on a warning? */
2453 if (bannerType_DocumentWidget_(d) == certificateWarning_GmDocumentBanner &&
2454 pos_Click(&d->click).y - top_Rect(banRect) >
2455 lineHeight_Text(banner_FontId) * 2) {
2456 postCommand_App("server.showcert");
2457 }
2458 else {
2459 postCommand_Widget(d, "navigate.root");
2460 }
2452 } 2461 }
2453 } 2462 }
2454 return iTrue; 2463 return iTrue;