From 96d9657605d8d3adf29e241c2c35561f457abbb2 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Wed, 18 May 2005 16:00:47 +0000 Subject: [PATCH] Fix current zoom -> zoom control match 2005-05-18 Marco Pesenti Gritti * cut-n-paste/zoom-control/ephy-zoom.c: (ephy_zoom_get_zoom_level_index): Fix current zoom -> zoom control match --- ChangeLog | 7 +++++++ cut-n-paste/zoom-control/ephy-zoom.c | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4fb751ff..b7a58ef4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-05-18 Marco Pesenti Gritti + + * 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 * 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 6b76457d..ee917846 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; } -- 2.43.5