diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-08-18 06:53:06 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-08-18 06:53:06 +0300 |
commit | e75be46cace4f0c1f2b93b0ccf985854ba6b425a (patch) | |
tree | 25182778a5508bdd22d8868cb77ae135439c5348 /src | |
parent | 2a35cae9f223441403c13c1634cada77dadc546c (diff) |
DocumentWidget: Incorrect message in Page Info
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/documentwidget.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 703d1d13..f746c123 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -1860,7 +1860,12 @@ static void checkResponse_DocumentWidget_(iDocumentWidget *d) { | |||
1860 | updateTrust_DocumentWidget_(d, resp); | 1860 | updateTrust_DocumentWidget_(d, resp); |
1861 | init_Anim(&d->sideOpacity, 0); | 1861 | init_Anim(&d->sideOpacity, 0); |
1862 | init_Anim(&d->altTextOpacity, 0); | 1862 | init_Anim(&d->altTextOpacity, 0); |
1863 | format_String(&d->sourceHeader, "%d %s", statusCode, get_GmError(statusCode)->title); | 1863 | format_String(&d->sourceHeader, |
1864 | "%d %s", | ||
1865 | statusCode, | ||
1866 | isEmpty_String(&resp->meta) && !isSuccess_GmStatusCode(statusCode) | ||
1867 | ? get_GmError(statusCode)->title | ||
1868 | : cstr_String(&resp->meta)); | ||
1864 | d->sourceStatus = statusCode; | 1869 | d->sourceStatus = statusCode; |
1865 | switch (category_GmStatusCode(statusCode)) { | 1870 | switch (category_GmStatusCode(statusCode)) { |
1866 | case categoryInput_GmStatusCode: { | 1871 | case categoryInput_GmStatusCode: { |
@@ -2770,14 +2775,12 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) | |||
2770 | id_GmRequest(d->request) == argU32Label_Command(cmd, "reqid")) { | 2775 | id_GmRequest(d->request) == argU32Label_Command(cmd, "reqid")) { |
2771 | set_Block(&d->sourceContent, body_GmRequest(d->request)); | 2776 | set_Block(&d->sourceContent, body_GmRequest(d->request)); |
2772 | if (!isSuccess_GmStatusCode(status_GmRequest(d->request))) { | 2777 | if (!isSuccess_GmStatusCode(status_GmRequest(d->request))) { |
2778 | /* TODO: Why is this here? Can it be removed? */ | ||
2773 | format_String(&d->sourceHeader, | 2779 | format_String(&d->sourceHeader, |
2774 | "%d %s", | 2780 | "%d %s", |
2775 | status_GmRequest(d->request), | 2781 | status_GmRequest(d->request), |
2776 | cstr_String(meta_GmRequest(d->request))); | 2782 | cstr_String(meta_GmRequest(d->request))); |
2777 | } | 2783 | } |
2778 | else { | ||
2779 | clear_String(&d->sourceHeader); | ||
2780 | } | ||
2781 | updateFetchProgress_DocumentWidget_(d); | 2784 | updateFetchProgress_DocumentWidget_(d); |
2782 | checkResponse_DocumentWidget_(d); | 2785 | checkResponse_DocumentWidget_(d); |
2783 | if (category_GmStatusCode(status_GmRequest(d->request)) == categorySuccess_GmStatusCode) { | 2786 | if (category_GmStatusCode(status_GmRequest(d->request)) == categorySuccess_GmStatusCode) { |