[Xfce4-commits] <ristretto:master> Fix zoom-in and zoom-out (accidently passed a boolean instead of a double)

Stephan Arts stephan at xfce.org
Wed Aug 12 12:19:17 CEST 2009


Updating branch refs/heads/master
         to 68f99e86e52a3bbd80337b2e8516133eab1aaa23 (commit)
       from 2b5990b32b22c130f54395eb0f61f9c7ad107e27 (commit)

commit 68f99e86e52a3bbd80337b2e8516133eab1aaa23
Author: Stephan Arts <stephan at xfce.org>
Date:   Mon Mar 9 21:44:47 2009 +0100

    Fix zoom-in and zoom-out (accidently passed a boolean instead of a double)

 src/picture_viewer.c |    9 +++++----
 src/picture_viewer.h |    4 ++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/picture_viewer.c b/src/picture_viewer.c
index ad607cb..acc1c5a 100644
--- a/src/picture_viewer.c
+++ b/src/picture_viewer.c
@@ -748,7 +748,7 @@ cb_rstto_picture_viewer_scroll_event (RsttoPictureViewer *viewer, GdkEventScroll
     {
         case GDK_SCROLL_UP:
         case GDK_SCROLL_LEFT:
-            if (scale <= 0.05)
+            if (scale= 0.05)
                 return;
             if (viewer->priv->refresh.idle_id > 0)
             {
@@ -954,7 +954,8 @@ cb_rstto_picture_viewer_queued_repaint (RsttoPictureViewer *viewer)
         scale = rstto_picture_viewer_calculate_scale (viewer);
         *p_scale = scale;
     }
-    rstto_picture_viewer_calculate_adjustments (viewer);
+
+    rstto_picture_viewer_calculate_adjustments (viewer, scale);
 
 
     switch (viewer->priv->state)
@@ -1287,7 +1288,7 @@ rstto_picture_viewer_zoom_100 (RsttoPictureViewer *viewer)
  * Zoom in the scale with a certain factor
  */
 void
-rstto_picture_viewer_zoom_in (RsttoPictureViewer *viewer, gboolean factor)
+rstto_picture_viewer_zoom_in (RsttoPictureViewer *viewer, gdouble factor)
 {
     gdouble scale;
 
@@ -1304,7 +1305,7 @@ rstto_picture_viewer_zoom_in (RsttoPictureViewer *viewer, gboolean factor)
  * Zoom out the scale with a certain factor
  */
 void
-rstto_picture_viewer_zoom_out (RsttoPictureViewer *viewer, gboolean factor)
+rstto_picture_viewer_zoom_out (RsttoPictureViewer *viewer, gdouble factor)
 {
     gdouble scale;
 
diff --git a/src/picture_viewer.h b/src/picture_viewer.h
index 458118f..c241da8 100644
--- a/src/picture_viewer.h
+++ b/src/picture_viewer.h
@@ -73,8 +73,8 @@ gdouble    rstto_picture_viewer_get_scale(RsttoPictureViewer *viewer);
 
 void       rstto_picture_viewer_zoom_fit (RsttoPictureViewer *viewer);
 void       rstto_picture_viewer_zoom_100 (RsttoPictureViewer *viewer);
-void       rstto_picture_viewer_zoom_in  (RsttoPictureViewer *viewer, gboolean factor);
-void       rstto_picture_viewer_zoom_out (RsttoPictureViewer *viewer, gboolean factor);
+void       rstto_picture_viewer_zoom_in  (RsttoPictureViewer *viewer, gdouble factor);
+void       rstto_picture_viewer_zoom_out (RsttoPictureViewer *viewer, gdouble factor);
 
 /**
 gdouble    rstto_picture_viewer_fit_scale(RsttoPictureViewer *viewer);



More information about the Xfce4-commits mailing list