]> spindle.queued.net Git - midori/commitdiff
Display IDN hostnames decoded in address completion
authorChristian Dywan <christian@twotoasts.de>
Sat, 3 Oct 2009 00:16:15 +0000 (02:16 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 3 Oct 2009 00:16:15 +0000 (02:16 +0200)
midori/midori-locationaction.c

index ffda4453dba64e0150289a9ddffee8552bd583f3..f19f0d9b10e0b7dfada5749afd599c6478e60767 100644 (file)
@@ -619,6 +619,7 @@ midori_location_entry_render_text_cb (GtkCellLayout*   layout,
                                       GtkTreeIter*     iter,
                                       gpointer         data)
 {
+    gchar* uri_raw;
     gchar* uri;
     gchar* title;
     gchar* desc;
@@ -632,7 +633,14 @@ midori_location_entry_render_text_cb (GtkCellLayout*   layout,
     gchar** parts;
     size_t len;
 
-    gtk_tree_model_get (model, iter, URI_COL, &uri, TITLE_COL, &title, -1);
+    gtk_tree_model_get (model, iter, URI_COL, &uri_raw, TITLE_COL, &title, -1);
+
+    #if GLIB_CHECK_VERSION (2, 22, 0)
+    uri = g_hostname_to_unicode (uri_raw);
+    g_free (uri_raw);
+    #else
+    uri = uri_raw;
+    #endif
 
     desc = desc_uri = desc_title = key = NULL;
     if (G_LIKELY (data))