[epiphany/wip/mcatanzaro/fedora-needs-upstreamed: 20/32] Properly display UTF-8 URLs in the location entry
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/mcatanzaro/fedora-needs-upstreamed: 20/32] Properly display UTF-8 URLs in the location entry
- Date: Wed, 4 Mar 2015 15:24:57 +0000 (UTC)
commit 314f17ee0cb4c0b5d616b6efa08bd4fb5929deef
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Wed Dec 10 20:38:49 2014 +0100
Properly display UTF-8 URLs in the location entry
https://bugzilla.gnome.org/show_bug.cgi?id=710004
lib/widgets/ephy-location-entry.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 4d3ad89..82c04f1 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -1328,7 +1328,7 @@ ephy_location_entry_set_location (EphyLocationEntry *entry,
GtkWidget *widget = GTK_WIDGET (entry);
EphyLocationEntryPrivate *priv = entry->priv;
GtkClipboard *clipboard;
- const char *text;
+ char *text;
char *effective_text = NULL, *selection = NULL;
int start, end;
@@ -1357,7 +1357,7 @@ ephy_location_entry_set_location (EphyLocationEntry *entry,
if (g_str_has_prefix (address, EPHY_ABOUT_SCHEME))
effective_text = g_strdup_printf ("about:%s",
address + strlen (EPHY_ABOUT_SCHEME) + 1);
- text = address;
+ text = g_uri_unescape_string (address, NULL);
gtk_entry_set_icon_drag_source (GTK_ENTRY (entry),
GTK_ENTRY_ICON_PRIMARY,
priv->drag_targets,
@@ -1365,7 +1365,7 @@ ephy_location_entry_set_location (EphyLocationEntry *entry,
}
else
{
- text = "";
+ text = g_strdup ("");
gtk_entry_set_icon_drag_source (GTK_ENTRY (entry),
GTK_ENTRY_ICON_PRIMARY,
NULL,
@@ -1378,6 +1378,7 @@ ephy_location_entry_set_location (EphyLocationEntry *entry,
priv->block_update = TRUE;
gtk_entry_set_text (GTK_ENTRY (widget), effective_text ? effective_text : text);
priv->block_update = FALSE;
+ g_free (text);
g_free (effective_text);
/* We need to call update_address_state() here, as the 'changed' signal
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]