aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-zoom.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-05-31 22:36:51 +0800
committerChristian Persch <chpe@src.gnome.org>2005-05-31 22:36:51 +0800
commit65d72dadd8762f9d86c2a1f28a4af0c8dc784973 (patch)
tree1194ed95470fb750128f364aff0c58224a0906e0 /lib/ephy-zoom.c
parent30457fd1bc79dfc4e2fc36a165de0abf1b1d5b77 (diff)
downloadgsoc2013-epiphany-65d72dadd8762f9d86c2a1f28a4af0c8dc784973.tar
gsoc2013-epiphany-65d72dadd8762f9d86c2a1f28a4af0c8dc784973.tar.gz
gsoc2013-epiphany-65d72dadd8762f9d86c2a1f28a4af0c8dc784973.tar.bz2
gsoc2013-epiphany-65d72dadd8762f9d86c2a1f28a4af0c8dc784973.tar.lz
gsoc2013-epiphany-65d72dadd8762f9d86c2a1f28a4af0c8dc784973.tar.xz
gsoc2013-epiphany-65d72dadd8762f9d86c2a1f28a4af0c8dc784973.tar.zst
gsoc2013-epiphany-65d72dadd8762f9d86c2a1f28a4af0c8dc784973.zip
Add scroll event listener, and change zoom on scroll+wheel events.
2005-05-31 Christian Persch <chpe@cvs.gnome.org> * data/default-prefs-common.js: * embed/mozilla/EphyBrowser.cpp: * embed/mozilla/EphyBrowser.h: Add scroll event listener, and change zoom on scroll+wheel events. * lib/ephy-zoom.c: (ephy_zoom_get_changed_zoom_level): * lib/ephy-zoom.h: Fix signed/unsigned integer problems (underflow).
Diffstat (limited to 'lib/ephy-zoom.c')
-rw-r--r--lib/ephy-zoom.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ephy-zoom.c b/lib/ephy-zoom.c
index b6cf8c68b..00fd34aae 100644
--- a/lib/ephy-zoom.c
+++ b/lib/ephy-zoom.c
@@ -24,7 +24,7 @@
#include <math.h>
-guint
+int
ephy_zoom_get_zoom_level_index (float level)
{
guint i;
@@ -47,12 +47,12 @@ ephy_zoom_get_zoom_level_index (float level)
float
-ephy_zoom_get_changed_zoom_level (float level, gint steps)
+ephy_zoom_get_changed_zoom_level (float level, int steps)
{
- guint index;
+ int index;
index = ephy_zoom_get_zoom_level_index (level);
- return zoom_levels[CLAMP(index + steps, 0, n_zoom_levels - 1)].level;
+ return zoom_levels[CLAMP(index + steps, 0, (int) n_zoom_levels - 1)].level;
}
float ephy_zoom_get_nearest_zoom_level (float level)