Commit 3e192c75 authored by Michael Catanzaro's avatar Michael Catanzaro

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.
parent 5d2e8280
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment