From 5aa6d52df9f24a3bfae876f3ac10b29b7b930dc1 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Sat, 25 Aug 2012 18:59:09 +0200 Subject: ephy-web-view: avoid getting a 'Blank page' title for non titled pages In WebKit2 we'll get no notify::title for pages without title, so check this case and reset the title to NULL, which for non-blank pages will use the address as title. This also removes the last notify::embed-title calls outside of ephy_web_view_set_title. Cherry-picked from a patch by Carlos Garcia. https://bugzilla.gnome.org/show_bug.cgi?id=682354 --- embed/ephy-web-view.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index e4a2e49a5..8d20520e1 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -2181,8 +2181,8 @@ load_changed_cb (WebKitWebView *web_view, g_object_notify (object, "status-message"); ephy_web_view_set_loading_title (view, NULL, FALSE); - if (priv->is_blank) - g_object_notify (object, "embed-title"); + if (priv->is_blank || !webkit_web_view_get_title (web_view)) + ephy_web_view_set_title (view, NULL); #if 0 /* TODO: DOM bindings */ @@ -2337,7 +2337,7 @@ load_status_cb (WebKitWebView *web_view, ephy_web_view_set_loading_title (view, NULL, FALSE); if (priv->is_blank) - g_object_notify (object, "embed-title"); + ephy_web_view_set_title (view, NULL); if (ephy_embed_shell_get_mode (embed_shell) != EPHY_EMBED_SHELL_MODE_PRIVATE && g_settings_get_boolean (EPHY_SETTINGS_MAIN, -- cgit v1.2.3