[f-spot] Cosmetics: use Gdk.Point for coordinates.



commit 30109b9d2dfbed04ceb18b0a48395e99c82e803a
Author: Wojciech Dzierżanowski <wojciech dzierzanowski gmail com>
Date:   Wed Sep 16 22:23:25 2009 +0200

    Cosmetics: use Gdk.Point for coordinates.

 src/Widgets/ImageView.cs |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/Widgets/ImageView.cs b/src/Widgets/ImageView.cs
index d26064d..801f73b 100644
--- a/src/Widgets/ImageView.cs
+++ b/src/Widgets/ImageView.cs
@@ -1017,8 +1017,7 @@ namespace FSpot.Widgets
 
 
 		bool panning = false;
-		int pan_anchor_x = 0;
-		int pan_anchor_y = 0;
+		Point pan_anchor = new Point (0, 0);
 
 		bool OnPanButtonPressEvent (EventButton evnt)
 		{
@@ -1029,8 +1028,8 @@ namespace FSpot.Widgets
 			System.Diagnostics.Debug.Assert (!panning);
 			panning = true;
 
-			pan_anchor_x = (int) evnt.X;
-			pan_anchor_y = (int) evnt.Y;
+			pan_anchor.X = (int) evnt.X;
+			pan_anchor.Y = (int) evnt.Y;
 
 			return true;
 		}
@@ -1041,12 +1040,12 @@ namespace FSpot.Widgets
 				return false;
 			}
 
-			int pan_x = pan_anchor_x - (int) evnt.X;
-			int pan_y = pan_anchor_y - (int) evnt.Y;
+			int pan_x = pan_anchor.X - (int) evnt.X;
+			int pan_y = pan_anchor.Y - (int) evnt.Y;
 			ScrollBy (pan_x, pan_y);
 
-			pan_anchor_x = (int) evnt.X;
-			pan_anchor_y = (int) evnt.Y;
+			pan_anchor.X = (int) evnt.X;
+			pan_anchor.Y = (int) evnt.Y;
 
 			return true;
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]