GNOME Bugzilla – Bug 524587
Window Title seems to be copying the status bar
Last modified: 2008-05-24 12:29:48 UTC
The window title frequently displays things like "Transferring data from..." etc. Chpe says this is a bug, as do I.
Indeed. Sucks. Let's all use firefox. Or fix it :).
Created attachment 111213 [details] [review] 20080520_bgo_524587_window-title: proposed fix I modified ephy_embed_utils_get_title_composite following this logic: is_loading = ephy_embed_get_load_status (embed); - is_blank = ephy_embed_get_is_blank (embed); loading_title = ephy_embed_get_loading_title (embed); + title = ephy_embed_get_title (embed); Get the current title of the tab: - if the tab is blank, Blank page will be returned - if we are browsing to somewhere else, then we don't want to change title until we are really out of the current site - if new site never loads, the title will be automatically set to "could not be found" or similar - if (is_blank) - { - title = _("Blank page"); - } @is_blank is not needed, it's implicit to @title - else if (is_loading && - loading_title != NULL) + if (is_loading && + title == _("Blank page")) If we are loading AND the tab is blank...
+ if (is_loading && + title == _("Blank page")) Is a bit funky... Is the get_title function returning the same char* as that gettext call? If not, it'll never match. If so, it's a pretty ugly way of doing whatever it is you're doing. And also, if not, you might use strcmp, but then I could create a funky condition by creating a web page with <title>Blank page</title>.
(In reply to comment #3) > + if (is_loading && > + title == _("Blank page")) > > Is a bit funky... Is the get_title function returning the same char* as that > gettext call? > I expect it to be the same honestly... but yeah maybe it's a bit funky. > If not, it'll never match. If so, it's a pretty ugly way of doing whatever it > is you're doing. > > And also, if not, you might use strcmp, but then I could create a funky > condition by creating a web page with <title>Blank page</title>. > Uhm, at first thought I didn't find it to be a problem since anyway the desired title was Blank page, but if you are in page 'One' and then browse to blank page, then the title would never update. A bit too hacky, I'll try another thing.
Created attachment 111252 [details] [review] 20080520_bgo_524587_window-title: updated is_blank is back
if (is_blank) { title = _("Blank page"); } - else if (is_loading && - loading_title != NULL) + if (is_loading && is_blank) { title = loading_title; } Shouldn't that better be if (is_blank) { if (is_loading) ... else ... } ? With that fixed, please commit to trunk and 2-22.
Committed to trunk and 2-22.