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 690510 - share code for setting view scale limits
share code for setting view scale limits
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks: 690511
 
 
Reported: 2012-12-19 17:22 UTC by William Jon McCann
Modified: 2012-12-20 21:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Move setting limits on zoom into the view (11.45 KB, patch)
2012-12-19 17:23 UTC, William Jon McCann
committed Details | Review
Use properties for can-zoom-in and -out (5.67 KB, patch)
2012-12-19 20:47 UTC, William Jon McCann
committed Details | Review

Description William Jon McCann 2012-12-19 17:22:45 UTC
Currently the code for setting the scale/zoom limits on the document in the view is in the EvWindow class. This means that users of the library will have to duplicate this code and handle all the different cases on their own.

It also means that the limits aren't correctly updating when the page cache size changes.

I'll attach a patch to move this code into the view.
Comment 1 William Jon McCann 2012-12-19 17:23:13 UTC
Created attachment 231913 [details] [review]
Move setting limits on zoom into the view

This allows the policy to be shared by all users of the view
from the library and makes it adapt correctly to changes in the
pixbuf cache.
Comment 2 William Jon McCann 2012-12-19 20:47:59 UTC
Created attachment 231933 [details] [review]
Use properties for can-zoom-in and -out

This simplifies the logic required to enable zoom actions for
consumers of the view.
Comment 3 Carlos Garcia Campos 2012-12-20 17:18:44 UTC
Review of attachment 231913 [details] [review]:

Looks great, thanks!
Comment 4 Carlos Garcia Campos 2012-12-20 17:23:14 UTC
Review of attachment 231933 [details] [review]:

Looks good too.
Comment 5 William Jon McCann 2012-12-20 21:43:38 UTC
Attachment 231913 [details] pushed as 27a4b3e - Move setting limits on zoom into the view
Attachment 231933 [details] pushed as bbfbf91 - Use properties for can-zoom-in and -out