summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-02-26 14:30:55 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-02-26 14:31:02 +0200
commit41a06564d12be6888e0b9e7dee6b809169e5c42e (patch)
tree7557e5701e50b73d8a57cc37f4f6d0145196a17c /src/ui/documentwidget.c
parenta4190dd0a5aaedb2fef1e14518a1d7d3c6448b1a (diff)
Don't apply MIME hooks on downloaded files
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 6f47a26e..c953e0f3 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -1308,10 +1308,10 @@ static iMediaRequest *findMediaRequest_DocumentWidget_(const iDocumentWidget *d,
1308 return NULL; 1308 return NULL;
1309} 1309}
1310 1310
1311static iBool requestMedia_DocumentWidget_(iDocumentWidget *d, iGmLinkId linkId) { 1311static iBool requestMedia_DocumentWidget_(iDocumentWidget *d, iGmLinkId linkId, iBool enableFilters) {
1312 if (!findMediaRequest_DocumentWidget_(d, linkId)) { 1312 if (!findMediaRequest_DocumentWidget_(d, linkId)) {
1313 const iString *mediaUrl = absoluteUrl_String(d->mod.url, linkUrl_GmDocument(d->doc, linkId)); 1313 const iString *mediaUrl = absoluteUrl_String(d->mod.url, linkUrl_GmDocument(d->doc, linkId));
1314 pushBack_ObjectList(d->media, iClob(new_MediaRequest(d, linkId, mediaUrl))); 1314 pushBack_ObjectList(d->media, iClob(new_MediaRequest(d, linkId, mediaUrl, enableFilters)));
1315 invalidate_DocumentWidget_(d); 1315 invalidate_DocumentWidget_(d);
1316 return iTrue; 1316 return iTrue;
1317 } 1317 }
@@ -1410,7 +1410,7 @@ static iBool fetchNextUnfetchedImage_DocumentWidget_(iDocumentWidget *d) {
1410 if (isMediaLink_GmDocument(d->doc, run->linkId) && 1410 if (isMediaLink_GmDocument(d->doc, run->linkId) &&
1411 linkFlags & imageFileExtension_GmLinkFlag && 1411 linkFlags & imageFileExtension_GmLinkFlag &&
1412 ~linkFlags & content_GmLinkFlag && ~linkFlags & permanent_GmLinkFlag ) { 1412 ~linkFlags & content_GmLinkFlag && ~linkFlags & permanent_GmLinkFlag ) {
1413 if (requestMedia_DocumentWidget_(d, run->linkId)) { 1413 if (requestMedia_DocumentWidget_(d, run->linkId, iTrue)) {
1414 return iTrue; 1414 return iTrue;
1415 } 1415 }
1416 } 1416 }
@@ -1685,7 +1685,7 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)
1685 const iGmLinkId linkId = d->contextLink->linkId; 1685 const iGmLinkId linkId = d->contextLink->linkId;
1686 setDownloadUrl_Media( 1686 setDownloadUrl_Media(
1687 media_GmDocument(d->doc), linkId, linkUrl_GmDocument(d->doc, linkId)); 1687 media_GmDocument(d->doc), linkId, linkUrl_GmDocument(d->doc, linkId));
1688 requestMedia_DocumentWidget_(d, linkId); 1688 requestMedia_DocumentWidget_(d, linkId, iFalse /* no filters */);
1689 redoLayout_GmDocument(d->doc); /* inline downloader becomes visible */ 1689 redoLayout_GmDocument(d->doc); /* inline downloader becomes visible */
1690 updateVisible_DocumentWidget_(d); 1690 updateVisible_DocumentWidget_(d);
1691 invalidate_DocumentWidget_(d); 1691 invalidate_DocumentWidget_(d);
@@ -2583,7 +2583,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e
2583 further to do. */ 2583 further to do. */
2584 return iTrue; 2584 return iTrue;
2585 } 2585 }
2586 if (!requestMedia_DocumentWidget_(d, linkId)) { 2586 if (!requestMedia_DocumentWidget_(d, linkId, iTrue)) {
2587 if (linkFlags & content_GmLinkFlag) { 2587 if (linkFlags & content_GmLinkFlag) {
2588 /* Dismiss shown content on click. */ 2588 /* Dismiss shown content on click. */
2589 setData_Media(media_GmDocument(d->doc), 2589 setData_Media(media_GmDocument(d->doc),