f-spot r3849 - in trunk: . src/Widgets



Author: sdelcroix
Date: Sun Apr 27 13:37:37 2008
New Revision: 3849
URL: http://svn.gnome.org/viewvc/f-spot?rev=3849&view=rev

Log:
2008-04-27  Lorenzo Milesi <maxxer yetopen it>

	* src/Widgets/FilmStrip.cs: prevent filmstrip locking. ignore clicks
	beyond filmstrip right end.


Modified:
   trunk/ChangeLog
   trunk/src/Widgets/Filmstrip.cs

Modified: trunk/src/Widgets/Filmstrip.cs
==============================================================================
--- trunk/src/Widgets/Filmstrip.cs	(original)
+++ trunk/src/Widgets/Filmstrip.cs	Sun Apr 27 13:37:37 2008
@@ -355,6 +355,7 @@
 
 	
 		Hashtable start_indexes;
+		int filmstrip_end_pos;
 		protected override bool OnExposeEvent (EventExpose evnt)
 		{
 			if (evnt.Window != GdkWindow)
@@ -395,6 +396,7 @@
 				if (start_x > icon_pixbuf.Width)
 					break;
 			}
+			filmstrip_end_pos = start_x;
 
 			start_x = ref_x;
 			for (int i = (int) Math.Round (Position) - 1; i >= 0; i--) {
@@ -465,7 +467,7 @@
 
 		protected override bool OnButtonPressEvent (EventButton evnt)
 		{
-			if(evnt.Button != 1) 
+			if(evnt.Button != 1 || evnt.X > filmstrip_end_pos) 
 				return false;
 			HasFocus = true;
 			int pos = -1;
@@ -642,7 +644,7 @@
 
 				float increment = speed * interval / 1000f;
 
-				if (Math.Abs (distance - increment) < 0.01) {
+				if (distance == 0 || Math.Abs (distance - increment) < 0.01) {
 					handler (target);
 					return false;
 				}



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