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 720985 - preview: Simplify the PreviewNavButtons show/hide code
preview: Simplify the PreviewNavButtons show/hide code
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
3.11.x
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-12-23 17:15 UTC by Debarshi Ray
Modified: 2013-12-24 11:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
preview: Simplify the PreviewNavButtons show/hide code (1.36 KB, patch)
2013-12-23 17:19 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2013-12-23 17:15:53 UTC
We could just call _updateVisibility instead of fading it in and out ourself.

In fact, it would be more correct to do so because otherwise show will always fade in both widgets -- which is wrong. The reason it works correctly now is that show is called before setModel. So the call to _fadeInButton from show aborts because this._model is null. This is due to the particular order in which _onLoadFinished is called in PreviewView and Embed.
Comment 1 Debarshi Ray 2013-12-23 17:19:04 UTC
Created attachment 264806 [details] [review]
preview: Simplify the PreviewNavButtons show/hide code
Comment 2 Cosimo Cecchi 2013-12-23 19:03:36 UTC
Review of attachment 264806 [details] [review]:

Looks good to me, thanks.
Comment 3 Debarshi Ray 2013-12-24 11:56:41 UTC
Comment on attachment 264806 [details] [review]
preview: Simplify the PreviewNavButtons show/hide code

Thanks for the review.