diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | cut-n-paste/zoom-control/ephy-zoom.c | 8 |
2 files changed, 11 insertions, 4 deletions
@@ -1,3 +1,10 @@ +2005-05-18 Marco Pesenti Gritti <mpg@redhat.com> + + * cut-n-paste/zoom-control/ephy-zoom.c: + (ephy_zoom_get_zoom_level_index): + + Fix current zoom -> zoom control match + 2005-05-18 James Bowes <bowes@cs.dal.ca> * shell/ev-window.c: (ev_window_init): Give focus to the ev-view, diff --git a/cut-n-paste/zoom-control/ephy-zoom.c b/cut-n-paste/zoom-control/ephy-zoom.c index 6b76457..ee91784 100644 --- a/cut-n-paste/zoom-control/ephy-zoom.c +++ b/cut-n-paste/zoom-control/ephy-zoom.c @@ -30,16 +30,16 @@ ephy_zoom_get_zoom_level_index (float level) guint i; float previous, current, mean; - /* Handle our options at the end of the list. */ + /* Handle our options at the beginning of the list. */ if (level == EPHY_ZOOM_BEST_FIT) { return 0; } else if (level == EPHY_ZOOM_FIT_WIDTH) { return 1; } - previous = zoom_levels[0].level; + previous = zoom_levels[3].level; - for (i = 1; i < n_zoom_levels - 2; i++) + for (i = 4; i < n_zoom_levels; i++) { current = zoom_levels[i].level; mean = sqrt (previous * current); @@ -49,7 +49,7 @@ ephy_zoom_get_zoom_level_index (float level) previous = current; } - return n_zoom_levels - 4; + return n_zoom_levels - 1; } |