diff options
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 8cc47e2a..a789a759 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -55,7 +55,7 @@ static void finished_MediaRequest_(iAnyObject *obj) { | |||
55 | void init_MediaRequest(iMediaRequest *d, iDocumentWidget *doc, iGmLinkId linkId, const iString *url) { | 55 | void init_MediaRequest(iMediaRequest *d, iDocumentWidget *doc, iGmLinkId linkId, const iString *url) { |
56 | d->doc = doc; | 56 | d->doc = doc; |
57 | d->linkId = linkId; | 57 | d->linkId = linkId; |
58 | d->req = new_GmRequest(); | 58 | d->req = new_GmRequest(certs_App()); |
59 | setUrl_GmRequest(d->req, url); | 59 | setUrl_GmRequest(d->req, url); |
60 | iConnect(GmRequest, d->req, updated, d, updated_MediaRequest_); | 60 | iConnect(GmRequest, d->req, updated, d, updated_MediaRequest_); |
61 | iConnect(GmRequest, d->req, finished, d, finished_MediaRequest_); | 61 | iConnect(GmRequest, d->req, finished, d, finished_MediaRequest_); |
@@ -202,6 +202,11 @@ static void requestUpdated_DocumentWidget_(iAnyObject *obj) { | |||
202 | } | 202 | } |
203 | } | 203 | } |
204 | 204 | ||
205 | static void requestTimedOut_DocumentWidget_(iAnyObject *obj) { | ||
206 | iDocumentWidget *d = obj; | ||
207 | postCommandf_App("document.request.timeout doc:%p request:%p", d, d->request); | ||
208 | } | ||
209 | |||
205 | static void requestFinished_DocumentWidget_(iAnyObject *obj) { | 210 | static void requestFinished_DocumentWidget_(iAnyObject *obj) { |
206 | iDocumentWidget *d = obj; | 211 | iDocumentWidget *d = obj; |
207 | postCommand_Widget(obj, "document.request.finished doc:%p request:%p", d, d->request); | 212 | postCommand_Widget(obj, "document.request.finished doc:%p request:%p", d, d->request); |
@@ -402,9 +407,10 @@ static void fetch_DocumentWidget_(iDocumentWidget *d) { | |||
402 | d->certFlags = 0; | 407 | d->certFlags = 0; |
403 | d->state = fetching_DocumentState; | 408 | d->state = fetching_DocumentState; |
404 | set_Atomic(&d->isRequestUpdated, iFalse); | 409 | set_Atomic(&d->isRequestUpdated, iFalse); |
405 | d->request = new_GmRequest(); | 410 | d->request = new_GmRequest(certs_App()); |
406 | setUrl_GmRequest(d->request, d->url); | 411 | setUrl_GmRequest(d->request, d->url); |
407 | iConnect(GmRequest, d->request, updated, d, requestUpdated_DocumentWidget_); | 412 | iConnect(GmRequest, d->request, updated, d, requestUpdated_DocumentWidget_); |
413 | iConnect(GmRequest, d->request, timeout, d, requestTimedOut_DocumentWidget_); | ||
408 | iConnect(GmRequest, d->request, finished, d, requestFinished_DocumentWidget_); | 414 | iConnect(GmRequest, d->request, finished, d, requestFinished_DocumentWidget_); |
409 | submit_GmRequest(d->request); | 415 | submit_GmRequest(d->request); |
410 | } | 416 | } |
@@ -792,7 +798,7 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd) | |||
792 | postCommandf_App("document.changed url:%s", cstr_String(d->url)); | 798 | postCommandf_App("document.changed url:%s", cstr_String(d->url)); |
793 | return iFalse; | 799 | return iFalse; |
794 | } | 800 | } |
795 | else if (equal_Command(cmd, "gmrequest.timeout") && | 801 | else if (equal_Command(cmd, "document.request.timeout") && |
796 | pointerLabel_Command(cmd, "request") == d->request) { | 802 | pointerLabel_Command(cmd, "request") == d->request) { |
797 | cancel_GmRequest(d->request); | 803 | cancel_GmRequest(d->request); |
798 | return iFalse; | 804 | return iFalse; |