After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 524587 - Window Title seems to be copying the status bar
Window Title seems to be copying the status bar
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
2.22.x
Other Linux
: Normal normal
: gnome-2-22
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-27 01:44 UTC by Alexander “weej” Jones
Modified: 2008-05-24 12:29 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
20080520_bgo_524587_window-title: proposed fix (943 bytes, patch)
2008-05-20 09:21 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
20080520_bgo_524587_window-title: updated (1.03 KB, patch)
2008-05-20 19:30 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review

Description Alexander “weej” Jones 2008-03-27 01:44:48 UTC
The window title frequently displays things like "Transferring data from..." etc.

Chpe says this is a bug, as do I.
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2008-03-27 02:35:59 UTC
Indeed. Sucks. Let's all use firefox.

Or fix it :).
Comment 2 Diego Escalante Urrelo (not reading bugmail) 2008-05-20 09:21:16 UTC
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...
Comment 3 Alexander “weej” Jones 2008-05-20 11:22:57 UTC
+	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>.
Comment 4 Diego Escalante Urrelo (not reading bugmail) 2008-05-20 18:59:59 UTC
(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.
Comment 5 Diego Escalante Urrelo (not reading bugmail) 2008-05-20 19:30:30 UTC
Created attachment 111252 [details] [review]
20080520_bgo_524587_window-title: updated

is_blank is back
Comment 6 Christian Persch 2008-05-23 21:07:28 UTC
 	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.
Comment 7 Diego Escalante Urrelo (not reading bugmail) 2008-05-24 12:29:48 UTC
Committed to trunk and 2-22.