[Xfce4-commits] ristretto:ristretto-0.0 Fix moving of zoomed-in image

2011-10-23 Thread Stephan Arts
Updating branch refs/heads/ristretto-0.0
 to 656f9b4bb9f4b7d51cc012a384e08fa4f0175879 (commit)
   from f6b085b3e0b356796a592414249485c7a8e8ae20 (commit)

commit 656f9b4bb9f4b7d51cc012a384e08fa4f0175879
Author: Stephan Arts step...@xfce.org
Date:   Tue Mar 10 09:28:26 2009 +0100

Fix moving of zoomed-in image

 src/picture_viewer.c |   24 
 1 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/src/picture_viewer.c b/src/picture_viewer.c
index acc1c5a..e3230d3 100644
--- a/src/picture_viewer.c
+++ b/src/picture_viewer.c
@@ -965,22 +965,14 @@ cb_rstto_picture_viewer_queued_repaint 
(RsttoPictureViewer *viewer)
 {
 if (p_src_pixbuf)
 {
-if (*p_scale == 1.0 )
-{
-p_tmp_pixbuf = p_src_pixbuf;
-g_object_ref (p_tmp_pixbuf);
-}
-else
-{
-p_tmp_pixbuf = gdk_pixbuf_new_subpixbuf (p_src_pixbuf,
-   
(gint)(viewer-hadjustment-value / scale), 
-  
viewer-vadjustment-value / scale,
-
((widget-allocation.width/scale))  width?
-  
widget-allocation.width/scale:width,
-
((widget-allocation.height/scale)) height?
-  
widget-allocation.height/scale:height);
+p_tmp_pixbuf = gdk_pixbuf_new_subpixbuf (p_src_pixbuf,
+   
(gint)(viewer-hadjustment-value / scale), 
+  
viewer-vadjustment-value / scale,
+
((widget-allocation.width/scale))  width?
+  
widget-allocation.width/scale:width,
+
((widget-allocation.height/scale)) height?
+  
widget-allocation.height/scale:height);
 
-}
 if(viewer-priv-dst_pixbuf)
 {
 g_object_unref(viewer-priv-dst_pixbuf);
@@ -1039,7 +1031,7 @@ cb_rstto_picture_viewer_queued_repaint 
(RsttoPictureViewer *viewer)
 break;
 }
 
-g_source_remove(viewer-priv-repaint.idle_id);
+g_source_remove (viewer-priv-repaint.idle_id);
 viewer-priv-repaint.idle_id = -1;
 viewer-priv-repaint.refresh = FALSE;
 return FALSE;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] ristretto:ristretto-0.0 Fix moving of zoomed-in image

2011-10-23 Thread Stephan Arts
Updating branch refs/heads/ristretto-0.0
 to 656f9b4bb9f4b7d51cc012a384e08fa4f0175879 (commit)
   from f6b085b3e0b356796a592414249485c7a8e8ae20 (commit)

commit 656f9b4bb9f4b7d51cc012a384e08fa4f0175879
Author: Stephan Arts step...@xfce.org
Date:   Tue Mar 10 09:28:26 2009 +0100

Fix moving of zoomed-in image

 src/picture_viewer.c |   24 
 1 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/src/picture_viewer.c b/src/picture_viewer.c
index acc1c5a..e3230d3 100644
--- a/src/picture_viewer.c
+++ b/src/picture_viewer.c
@@ -965,22 +965,14 @@ cb_rstto_picture_viewer_queued_repaint 
(RsttoPictureViewer *viewer)
 {
 if (p_src_pixbuf)
 {
-if (*p_scale == 1.0 )
-{
-p_tmp_pixbuf = p_src_pixbuf;
-g_object_ref (p_tmp_pixbuf);
-}
-else
-{
-p_tmp_pixbuf = gdk_pixbuf_new_subpixbuf (p_src_pixbuf,
-   
(gint)(viewer-hadjustment-value / scale), 
-  
viewer-vadjustment-value / scale,
-
((widget-allocation.width/scale))  width?
-  
widget-allocation.width/scale:width,
-
((widget-allocation.height/scale)) height?
-  
widget-allocation.height/scale:height);
+p_tmp_pixbuf = gdk_pixbuf_new_subpixbuf (p_src_pixbuf,
+   
(gint)(viewer-hadjustment-value / scale), 
+  
viewer-vadjustment-value / scale,
+
((widget-allocation.width/scale))  width?
+  
widget-allocation.width/scale:width,
+
((widget-allocation.height/scale)) height?
+  
widget-allocation.height/scale:height);
 
-}
 if(viewer-priv-dst_pixbuf)
 {
 g_object_unref(viewer-priv-dst_pixbuf);
@@ -1039,7 +1031,7 @@ cb_rstto_picture_viewer_queued_repaint 
(RsttoPictureViewer *viewer)
 break;
 }
 
-g_source_remove(viewer-priv-repaint.idle_id);
+g_source_remove (viewer-priv-repaint.idle_id);
 viewer-priv-repaint.idle_id = -1;
 viewer-priv-repaint.refresh = FALSE;
 return FALSE;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits