summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-07-17 18:44:26 (GMT)
committer Chris Young <chris@unsatisfactorysoftware.co.uk>2015-10-24 14:12:56 (GMT)
commit6afda499c290bea17fe2bcf5fcd257a1770528cf (patch)
treeee5e5494a853e1f10f32b3e8fa23832292d8b038 /gtk
parent5f5ca2c20587e035278163c9b444b36cfff6dced (diff)
downloadnetsurf-6afda499c290bea17fe2bcf5fcd257a1770528cf.tar.gz
netsurf-6afda499c290bea17fe2bcf5fcd257a1770528cf.tar.bz2
Show the IDN decoded form in the URL bar on GTK if the option is set.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/scaffolding.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/scaffolding.c b/gtk/scaffolding.c
index 4506ac2..dc03d94 100644
--- a/gtk/scaffolding.c
+++ b/gtk/scaffolding.c
@@ -2346,7 +2346,13 @@ nserror gui_window_set_url(struct gui_window *gw, nsurl *url)
g = nsgtk_get_scaffold(gw);
if (g->top_level == gw) {
- gtk_entry_set_text(GTK_ENTRY(g->url_bar), nsurl_access(url));
+ if (nsoption_bool(display_decoded_idn) == false) {
+ gtk_entry_set_text(GTK_ENTRY(g->url_bar), nsurl_access(url));
+ } else {
+ char *idn_url = nsurl_access_utf8(url);
+ gtk_entry_set_text(GTK_ENTRY(g->url_bar), idn_url);
+ free(idn_url);
+ }
gtk_editable_set_position(GTK_EDITABLE(g->url_bar), -1);
}
return NSERROR_OK;