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 745507 - preview: Simplify the load-finished logic
preview: Simplify the load-finished logic
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
3.15.x
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-03-03 09:45 UTC by Debarshi Ray
Modified: 2015-03-04 00:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
preview: Simplify the load-finished logic (2.50 KB, patch)
2015-03-03 10:02 UTC, Debarshi Ray
committed Details | Review
preview: Simplify the PreviewNavControls setModel code (1.10 KB, patch)
2015-03-03 10:02 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2015-03-03 09:45:41 UTC
Currently PreviewView reacts to load-finished in two steps. First, its own load-finished handler is called, and then the load-finished handler from Embed sets the model.

Depending on the order in which handlers for the same signal are called is a bad idea. If the order got swapped, then the logic for showing the places and bookmarks controls will break because the check for multiple pages is only done when setting the model.

Let's consolidate things in one place.
Comment 1 Debarshi Ray 2015-03-03 10:02:20 UTC
Created attachment 298398 [details] [review]
preview: Simplify the load-finished logic
Comment 2 Debarshi Ray 2015-03-03 10:02:46 UTC
Created attachment 298399 [details] [review]
preview: Simplify the PreviewNavControls setModel code
Comment 3 Cosimo Cecchi 2015-03-03 18:06:12 UTC
Review of attachment 298398 [details] [review]:

Looks good
Comment 4 Cosimo Cecchi 2015-03-03 18:06:33 UTC
Review of attachment 298399 [details] [review]:

OK
Comment 5 Debarshi Ray 2015-03-04 00:14:45 UTC
Thanks, Cosimo.