diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/documentwidget.c | 9 | ||||
-rw-r--r-- | src/ui/sidebarwidget.c | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 8885bb9b..ed6c2518 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -788,7 +788,7 @@ static void checkResponse_DocumentWidget_(iDocumentWidget *d) { | |||
788 | showErrorPage_DocumentWidget_(d, invalidRedirect_GmStatusCode); | 788 | showErrorPage_DocumentWidget_(d, invalidRedirect_GmStatusCode); |
789 | } | 789 | } |
790 | else { | 790 | else { |
791 | /* TODO: only accept redirects that use gemini protocol */ | 791 | /* TODO: only accept redirects that use gemini scheme */ |
792 | postCommandf_App( | 792 | postCommandf_App( |
793 | "open redirect:1 url:%s", | 793 | "open redirect:1 url:%s", |
794 | cstr_String(absoluteUrl_String(d->mod.url, meta_GmRequest(d->request)))); | 794 | cstr_String(absoluteUrl_String(d->mod.url, meta_GmRequest(d->request)))); |
@@ -1079,8 +1079,7 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) | |||
1079 | d->scrollY = d->initNormScrollY * size_GmDocument(d->doc).y; | 1079 | d->scrollY = d->initNormScrollY * size_GmDocument(d->doc).y; |
1080 | d->state = ready_RequestState; | 1080 | d->state = ready_RequestState; |
1081 | /* The response may be cached. */ { | 1081 | /* The response may be cached. */ { |
1082 | const iRangecc proto = urlProtocol_String(d->mod.url); | 1082 | if (!equal_Rangecc(urlScheme_String(d->mod.url), "about")) { |
1083 | if (!equal_Rangecc(proto, "about")) { | ||
1084 | setCachedResponse_History(d->mod.history, response_GmRequest(d->request)); | 1083 | setCachedResponse_History(d->mod.history, response_GmRequest(d->request)); |
1085 | } | 1084 | } |
1086 | } | 1085 | } |
@@ -1604,9 +1603,9 @@ static void drawRun_DrawContext_(void *context, const iGmRun *run) { | |||
1604 | &str, | 1603 | &str, |
1605 | " \u2014%s%s%s\r%c%s", | 1604 | " \u2014%s%s%s\r%c%s", |
1606 | showHost ? " " : "", | 1605 | showHost ? " " : "", |
1607 | showHost ? (!equalCase_Rangecc(parts.protocol, "gemini") | 1606 | showHost ? (!equalCase_Rangecc(parts.scheme, "gemini") |
1608 | ? format_CStr("%s://%s", | 1607 | ? format_CStr("%s://%s", |
1609 | cstr_Rangecc(parts.protocol), | 1608 | cstr_Rangecc(parts.scheme), |
1610 | cstr_Rangecc(parts.host)) | 1609 | cstr_Rangecc(parts.host)) |
1611 | : cstr_Rangecc(parts.host)) | 1610 | : cstr_Rangecc(parts.host)) |
1612 | : "", | 1611 | : "", |
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index e3d7d4a6..8b0792c8 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -771,14 +771,14 @@ static void draw_SidebarWidget_(const iSidebarWidget *d) { | |||
771 | else { | 771 | else { |
772 | iUrl parts; | 772 | iUrl parts; |
773 | init_Url(&parts, &item->url); | 773 | init_Url(&parts, &item->url); |
774 | const iBool isGemini = equalCase_Rangecc(parts.protocol, "gemini"); | 774 | const iBool isGemini = equalCase_Rangecc(parts.scheme, "gemini"); |
775 | draw_Text( | 775 | draw_Text( |
776 | font, | 776 | font, |
777 | add_I2(topLeft_Rect(itemRect), | 777 | add_I2(topLeft_Rect(itemRect), |
778 | init_I2(3 * gap_UI, (d->itemHeight - lineHeight_Text(font)) / 2)), | 778 | init_I2(3 * gap_UI, (d->itemHeight - lineHeight_Text(font)) / 2)), |
779 | fg, | 779 | fg, |
780 | "%s%s%s%s%s%s", | 780 | "%s%s%s%s%s%s", |
781 | isGemini ? "" : cstr_Rangecc(parts.protocol), | 781 | isGemini ? "" : cstr_Rangecc(parts.scheme), |
782 | isGemini ? "" : "://", | 782 | isGemini ? "" : "://", |
783 | escape_Color(isHover ? (isPressing ? uiTextPressed_ColorId | 783 | escape_Color(isHover ? (isPressing ? uiTextPressed_ColorId |
784 | : uiTextFramelessHover_ColorId) | 784 | : uiTextFramelessHover_ColorId) |