[epiphany] embed: set title properly when empty
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] embed: set title properly when empty
- Date: Sat, 20 Feb 2016 19:57:58 +0000 (UTC)
commit 3e192c7590b9d4a8241c9ae8c63aae1bd3accb64
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Sat Feb 20 13:29:20 2016 -0600
embed: set title properly when empty
Otherwise notebook tabs' labels don't get updated when navigating to a
page without a title (e.g. a text file).
The problem here is we were checking for NULL titles, but not for
zero-length titles.
embed/ephy-embed.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 4982a91..e64df1f 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -283,11 +283,12 @@ load_changed_cb (WebKitWebView *web_view,
case WEBKIT_LOAD_COMMITTED:
ephy_embed_destroy_top_widgets (embed);
break;
- case WEBKIT_LOAD_FINISHED:
- if (ephy_web_view_get_is_blank (EPHY_WEB_VIEW (web_view)) ||
- !webkit_web_view_get_title (web_view))
+ case WEBKIT_LOAD_FINISHED: {
+ const char *title = webkit_web_view_get_title (web_view);
+ if (ephy_web_view_get_is_blank (EPHY_WEB_VIEW (web_view)) || !title || !*title)
ephy_embed_set_title (embed, NULL);
break;
+ }
case WEBKIT_LOAD_STARTED:
case WEBKIT_LOAD_REDIRECTED:
default:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]