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 657936 - Load progress not drawn after going to fullscreen
Load progress not drawn after going to fullscreen
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: [obsolete] URL bar
3.1.x
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-09-01 14:27 UTC by Claudio Saavedra
Modified: 2011-09-01 16:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
EphyWindow: Fix location entry's load progress (3.36 KB, patch)
2011-09-01 15:20 UTC, Claudio Saavedra
rejected Details | Review
EphyWindow: Fix location entry's load progress (2.69 KB, patch)
2011-09-01 16:22 UTC, Claudio Saavedra
committed Details | Review

Description Claudio Saavedra 2011-09-01 14:27:53 UTC
If you go fullscreen and later open a new tab, you will notice that the page load progress is not drawn anymore (and a lot of warnings are thrown to the console as well).

This was tricky to debug, but the issue is that EphyWindow is caching a pointer to the GtkEntry in location bar. When ephy goes fullscreen, the whole bar contents are destroyed (including the cached entry), making the GtkEntry pointer no longer valid.

There are a few possibilities to solve this:

1) Add a weak pointer to the entry, so that the cache becomes NULL when the entry is destroyed and recreate the cache when needed (in every method accessing it).

2) Do not cache the entry at all and fetch it from the toolbar always when needed.

3) Add a signal to the toolbar that gets triggered every time the toolbar is changed or recreated or something similar. This would probably need to go into EggEditableToolbar and seems a bit overkill.

I am implementing something along the lines of (1), since it seems reasonably simple for such a use case.
Comment 1 Claudio Saavedra 2011-09-01 15:20:52 UTC
Created attachment 195395 [details] [review]
EphyWindow: Fix location entry's load progress

The caching of the GtkEntry was broken, since the toolbar items are
destroyed on switching to/from fullscreen. Ensure the cache is correct
by adding a weak pointer to the GtkEntry object and updating the cache
when needed.
Comment 2 Claudio Saavedra 2011-09-01 16:22:23 UTC
Created attachment 195402 [details] [review]
EphyWindow: Fix location entry's load progress

The caching of the GtkEntry was broken, since the toolbar items are
destroyed on switching to/from fullscreen. Update the cache right
after toolbar is rebuilt.
Comment 3 Xan Lopez 2011-09-01 16:26:09 UTC
Review of attachment 195402 [details] [review]:

I like this.
Comment 4 Claudio Saavedra 2011-09-01 16:49:58 UTC
My pleasure!

Attachment 195402 [details] pushed as 996bf1d - EphyWindow: Fix location entry's load progress