diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-07-18 19:48:13 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-10-24 15:12:57 +0100 |
commit | ac8eccd035a4676938fb08d70b23bc4dfb9fa4d6 (patch) | |
tree | 240f956dcca0dbbd47a7ea84596767c7cb9ea6d2 /riscos/window.c | |
parent | 53141c70899962fbcf88e56d08a7ecd8d5e15f9c (diff) | |
download | netsurf-ac8eccd035a4676938fb08d70b23bc4dfb9fa4d6.tar.gz netsurf-ac8eccd035a4676938fb08d70b23bc4dfb9fa4d6.tar.bz2 |
Enable RISC OS to display decoded IDNs in the URL bar (subject to local charset restrictions)
Diffstat (limited to 'riscos/window.c')
-rw-r--r-- | riscos/window.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/riscos/window.c b/riscos/window.c index 097ab9ee6..dbed46d2a 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -1038,8 +1038,16 @@ void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape) /* exported function documented in riscos/window.h */ nserror ro_gui_window_set_url(struct gui_window *g, nsurl *url) { + char *idn_url = NULL; + if (g->toolbar) { - ro_toolbar_set_url(g->toolbar, nsurl_access(url), true, false); + if (nsoption_bool(display_decoded_idn) == false) { + ro_toolbar_set_url(g->toolbar, nsurl_access(url), true, false); + } else { + idn_url = nsurl_access_utf8(url); + ro_toolbar_set_url(g->toolbar, idn_url, true, false); + free(idn_url); + } ro_gui_url_complete_start(g->toolbar); } |