diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-07-17 20:59:49 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-10-24 15:12:57 +0100 |
commit | dd38897a26cf888d2c546b7db9da8ec125a37b53 (patch) | |
tree | a609c6aa4a23a8ef7d8105678e686166f5cb8eb3 /amiga | |
parent | 920cb0571d93f956385e193389dd1f564efc5304 (diff) | |
download | netsurf-dd38897a26cf888d2c546b7db9da8ec125a37b53.tar.gz netsurf-dd38897a26cf888d2c546b7db9da8ec125a37b53.tar.bz2 |
Enable Amiga frontend to show decoded IDNs subject to local charset restrictions.
TODO: Statusbar link text
Diffstat (limited to 'amiga')
-rw-r--r-- | amiga/gui.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/amiga/gui.c b/amiga/gui.c index b4f3b136d..8c2fde542 100644 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -4895,9 +4895,21 @@ static nserror gui_window_set_url(struct gui_window *g, nsurl *url) if(!g) return NSERROR_OK; if (g == g->shared->gw) { - RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_URL], - g->shared->win, NULL, STRINGA_TextVal, - nsurl_access(url), TAG_DONE); + if(nsoption_bool(display_decoded_idn) == false) { + RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_URL], + g->shared->win, NULL, + STRINGA_TextVal, nsurl_access(url), + TAG_DONE); + } else { + char *idn_url = nsurl_access_utf8(url); + char *idn_url_lc = ami_utf8_easy(idn_url); + RefreshSetGadgetAttrs((struct Gadget *)g->shared->objects[GID_URL], + g->shared->win, NULL, + STRINGA_TextVal, idn_url_lc, + TAG_DONE); + free(idn_url); + ami_utf8_free(idn_url_lc); + } } ami_update_buttons(g->shared); |