diff options
author | Diego Escalante Urrelo <descalante@igalia.com> | 2011-08-03 19:31:48 +0800 |
---|---|---|
committer | Diego Escalante Urrelo <descalante@igalia.com> | 2011-08-13 00:03:04 +0800 |
commit | a79821955d1fd50f3e7cd9d4dae91b24e193d855 (patch) | |
tree | b233aaca3d4935fc9e95f7ffa90c05b17276f5cb /embed/ephy-web-view.c | |
parent | 60bea9a1003343635d27fba83d3b089fb208efec (diff) | |
download | gsoc2013-epiphany-a79821955d1fd50f3e7cd9d4dae91b24e193d855.tar.gz gsoc2013-epiphany-a79821955d1fd50f3e7cd9d4dae91b24e193d855.tar.zst gsoc2013-epiphany-a79821955d1fd50f3e7cd9d4dae91b24e193d855.zip |
e-web-view: use hostname in geolocation infobar
Instead of the full URI, make it more readable and use only the
hostname.
Bug #649164
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r-- | embed/ephy-web-view.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index a4d972061..fd4577208 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -1711,6 +1711,7 @@ geolocation_policy_decision_requested_cb (WebKitWebView *web_view, GtkWidget *content_area; GtkWidget *label; char *message; + char *host; info_bar = gtk_info_bar_new (); @@ -1733,8 +1734,10 @@ geolocation_policy_decision_requested_cb (WebKitWebView *web_view, G_CALLBACK (send_yes_response_cb), info_bar); /* Label */ + host = ephy_string_get_host_name (webkit_web_frame_get_uri (web_frame)); message = g_markup_printf_escaped (_("The page at <b>%s</b> wants to know your location."), - webkit_web_frame_get_uri (web_frame)); + host); + g_free (host); label = gtk_label_new (message); g_object_set (label, "use-markup", TRUE, "wrap", TRUE, NULL); |