diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-07-17 19:44:26 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2015-10-24 15:12:56 +0100 |
commit | 6afda499c290bea17fe2bcf5fcd257a1770528cf (patch) | |
tree | ee5e5494a853e1f10f32b3e8fa23832292d8b038 /gtk | |
parent | 5f5ca2c20587e035278163c9b444b36cfff6dced (diff) | |
download | netsurf-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.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/scaffolding.c b/gtk/scaffolding.c index 4506ac27f..dc03d9453 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; |