diff options
author | Xan Lopez <xan@igalia.com> | 2012-08-26 00:59:09 +0800 |
---|---|---|
committer | Xan Lopez <xan@igalia.com> | 2012-08-26 01:01:02 +0800 |
commit | 5aa6d52df9f24a3bfae876f3ac10b29b7b930dc1 (patch) | |
tree | 06f9fe7592d3bea512da18eaaffb5e14461db50b | |
parent | 933d7b788afb9b64e0a75cc060dc3ec09adc04f3 (diff) | |
download | gsoc2013-epiphany-5aa6d52df9f24a3bfae876f3ac10b29b7b930dc1.tar.gz gsoc2013-epiphany-5aa6d52df9f24a3bfae876f3ac10b29b7b930dc1.tar.zst gsoc2013-epiphany-5aa6d52df9f24a3bfae876f3ac10b29b7b930dc1.zip |
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
-rw-r--r-- | embed/ephy-web-view.c | 6 |
1 files 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, |