diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-07 12:40:44 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-07 12:40:44 +0200 |
commit | f309d604a720a9442c2249d3a738f746d1503b47 (patch) | |
tree | af482a8e331db23281c51d5d3f2781a32eb497c6 /src/ui/documentwidget.c | |
parent | 5e3302f8bb6f38a564ad7c6db525617c7e42c7c1 (diff) |
DocumentWidget: Set document format
This was previously overlooked so everything was shown as text/gemini.
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 1b6e485a..193f2099 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -726,6 +726,7 @@ static void showErrorPage_DocumentWidget_(iDocumentWidget *d, enum iGmStatusCode | |||
726 | } | 726 | } |
727 | } | 727 | } |
728 | setSiteBannerEnabled_GmDocument(d->doc, useBanner); | 728 | setSiteBannerEnabled_GmDocument(d->doc, useBanner); |
729 | setFormat_GmDocument(d->doc, gemini_GmDocumentFormat); | ||
729 | setSource_DocumentWidget_(d, src); | 730 | setSource_DocumentWidget_(d, src); |
730 | updateTheme_DocumentWidget_(d); | 731 | updateTheme_DocumentWidget_(d); |
731 | init_Anim(&d->scrollY, 0); | 732 | init_Anim(&d->scrollY, 0); |
@@ -838,6 +839,7 @@ static void updateDocument_DocumentWidget_(iDocumentWidget *d, const iGmResponse | |||
838 | deinit_String(&str); | 839 | deinit_String(&str); |
839 | return; | 840 | return; |
840 | } | 841 | } |
842 | setFormat_GmDocument(d->doc, docFormat); | ||
841 | /* Convert the source to UTF-8 if needed. */ | 843 | /* Convert the source to UTF-8 if needed. */ |
842 | if (!equalCase_Rangecc(charset, "utf-8")) { | 844 | if (!equalCase_Rangecc(charset, "utf-8")) { |
843 | set_String(&str, | 845 | set_String(&str, |