From a79821955d1fd50f3e7cd9d4dae91b24e193d855 Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Wed, 3 Aug 2011 13:31:48 +0200 Subject: e-web-view: use hostname in geolocation infobar Instead of the full URI, make it more readable and use only the hostname. Bug #649164 --- embed/ephy-web-view.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'embed') 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 %s 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); -- cgit v1.2.3