[epiphany/wip/mcatanzaro/fedora-needs-upstreamed: 19/32] ephy-title-box: Show correctly UTF-8 URL



commit 5f07d6a0cd5c3b0c396c63c9f6f04e155dccf90a
Author: Yosef Or Boczko <yoseforb src gnome org>
Date:   Wed Sep 24 12:04:47 2014 +0300

    ephy-title-box: Show correctly UTF-8 URL
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710004

 src/ephy-title-box.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/ephy-title-box.c b/src/ephy-title-box.c
index 3c4366b..2cc853a 100644
--- a/src/ephy-title-box.c
+++ b/src/ephy-title-box.c
@@ -681,13 +681,16 @@ ephy_title_box_set_address (EphyTitleBox *title_box,
                             const char *address)
 {
   EphyTitleBoxPrivate *priv;
-  EphyEmbedShellMode mode;
+  EphyEmbedShellMode   mode;
+  gchar               *decode_uri;
 
   g_return_if_fail (EPHY_IS_TITLE_BOX (title_box));
 
   priv = ephy_title_box_get_instance_private (title_box);
   mode = ephy_embed_shell_get_mode (ephy_embed_shell_get_default ());
 
+  decode_uri = g_uri_unescape_string (address, NULL);
+
   if (address == NULL || mode == EPHY_EMBED_SHELL_MODE_APPLICATION) {
     gtk_label_set_text (GTK_LABEL (priv->uri), address);
   } else {
@@ -695,8 +698,10 @@ ephy_title_box_set_address (EphyTitleBox *title_box,
     char *uri;
 
     rtl = gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL;
-    uri = g_strconcat (rtl ? "▾ " : address, rtl ? address : " ▾", NULL);
+    uri = g_strconcat (rtl ? "▾ " : decode_uri, rtl ? decode_uri : " ▾", NULL);
     gtk_label_set_text (GTK_LABEL (priv->uri), uri);
     g_free (uri);
   }
+
+  g_free (decode_uri);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]