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 658796 - devhelp's zoom out function of 2.30.0 cann't work correctly
devhelp's zoom out function of 2.30.0 cann't work correctly
Status: RESOLVED FIXED
Product: devhelp
Classification: Applications
Component: General
2.30.x
Other Linux
: Normal normal
: ---
Assigned To: devhelp-maint
devhelp-maint
Depends on:
Blocks:
 
 
Reported: 2011-09-12 09:47 UTC by nsynet
Modified: 2012-03-12 18:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix zoom in/out actions (4.43 KB, patch)
2012-03-02 11:37 UTC, Carlos Garcia Campos
committed Details | Review

Description nsynet 2011-09-12 09:47:06 UTC
Step1:run devhelp;
Step2:choose any book,open it;
Step3:click the "zoom in" button for several times;
Step4:click the "zoom out" button ,find the font became big,and "zoom in" button turn gray;
Comment 1 Carlos Garcia Campos 2012-03-02 11:30:02 UTC
This is a bug in window_get_current_zoom_level_index(), it converts current zoom level to integer and compares that value with the zoom_levels array. This approach doesn't work, because of rounding errors in the float of integer conversion. When the index for the exact zoom level is not found, it returns current value of loop iterator which is 8. That's why zoom in action is disabled. 
I think it should use double values in zoom_levels array, so that we don't need to convert from float to integer, and use the same approach than ephy-zoom control to get the index of the nearest zoom level.
Comment 2 Carlos Garcia Campos 2012-03-02 11:37:26 UTC
Created attachment 208847 [details] [review]
Fix zoom in/out actions
Comment 3 Frederic Peters 2012-03-02 12:12:44 UTC
Comment on attachment 208847 [details] [review]
Fix zoom in/out actions

Thanks, go ahead.
Comment 4 Javier Jardón (IRC: jjardon) 2012-03-12 18:32:19 UTC
Comment on attachment 208847 [details] [review]
Fix zoom in/out actions

This was applied in commit 7b95b493e926f759dd0f1e5f077b2ebc1ed46c20
Comment 5 Javier Jardón (IRC: jjardon) 2012-03-12 18:32:47 UTC
This problem has been fixed in our software repository. Thank you for your bug report.