[epiphany] ephy-web-view: avoid getting a 'Blank page' title for non titled pages
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-web-view: avoid getting a 'Blank page' title for non titled pages
- Date: Sat, 25 Aug 2012 17:05:57 +0000 (UTC)
commit 5aa6d52df9f24a3bfae876f3ac10b29b7b930dc1
Author: Xan Lopez <xan igalia com>
Date: Sat Aug 25 18:59:09 2012 +0200
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 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index e4a2e49..8d20520 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]