f-spot r3773 - in trunk: . src



Author: sdelcroix
Date: Fri Mar 21 09:23:14 2008
New Revision: 3773
URL: http://svn.gnome.org/viewvc/f-spot?rev=3773&view=rev

Log:
2008-03-21  Lorenzo Milesi <maxxer yetopen it>

	* src/RotateCommand.cs: rotate only default version of photo. Fix
	bgo #505125.


Modified:
   trunk/ChangeLog
   trunk/src/RotateCommand.cs

Modified: trunk/src/RotateCommand.cs
==============================================================================
--- trunk/src/RotateCommand.cs	(original)
+++ trunk/src/RotateCommand.cs	Fri Mar 21 09:23:14 2008
@@ -45,14 +45,12 @@
 	public class RotateOperation : Operation {
 		IBrowsableItem item;
 		RotateDirection direction;
-		int version_index;
 		bool done;
 
 		public RotateOperation (IBrowsableItem item, RotateDirection direction)
 		{
 			this.item = item;
 			this.direction = direction;
-			version_index = 0;
 			done = false;
 		}
 
@@ -124,15 +122,8 @@
 			if (done)
 				return false;
 
-			if (item is Photo) {
-				Photo p = (Photo) item;
-
-				original_path = p.VersionUri (p.VersionIds [version_index++]).LocalPath;
-				done = (version_index >= p.VersionIds.Length);
-			} else {
-				original_path = item.DefaultVersionUri.LocalPath;
-				done = true;
-			}
+ 			original_path = item.DefaultVersionUri.LocalPath;
+ 			done = true;
 
 			if ((File.GetAttributes(original_path) & FileAttributes.ReadOnly) == FileAttributes.ReadOnly) {
 				throw new RotateException (Catalog.GetString ("Unable to rotate readonly file"), original_path, true);



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