diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-10-17 17:13:32 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-10-28 16:18:38 +0200 |
commit | 8a07b7fb14f11204a0d840792ab9f4bd54b066e5 (patch) | |
tree | e617a898c17aeb353f35d7b362ca2de290cf2b82 /platform/x11/pdfapp.c | |
parent | 4029b45e494634361a4205f8896ec429d11e990a (diff) | |
download | mupdf-8a07b7fb14f11204a0d840792ab9f4bd54b066e5.tar.xz |
Clean up link destination handling.
All link destinations should be URIs, and a document specific function
can be called to resolve them to actual page numbers.
Outlines have cached page numbers as well as string URIs.
Diffstat (limited to 'platform/x11/pdfapp.c')
-rw-r--r-- | platform/x11/pdfapp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c index 512feb2e..19983ee9 100644 --- a/platform/x11/pdfapp.c +++ b/platform/x11/pdfapp.c @@ -1737,10 +1737,10 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta wincursor(app, HAND); if (btn == 1 && state == 1 && !processed) { - if (link->dest.kind == FZ_LINK_URI) - pdfapp_gotouri(app, link->dest.ld.uri.uri); - else if (link->dest.kind == FZ_LINK_GOTO) - pdfapp_gotopage(app, link->dest.ld.gotor.page + 1); + if (fz_is_external_link(ctx, link->uri)) + pdfapp_gotouri(app, link->uri); + else + pdfapp_gotopage(app, fz_resolve_link(ctx, app->doc, link->uri) + 1); return; } } |