Small patch to Original export feature



Hi,

this patch makes the comments on Original export actually work. I'm
pretty sure the if/else thing is done wrong, but that's the best I can
do. I upped the quality on conversion to 100, because the thumbs on
Original looked pretty ugly, and this helped a bit. I'm not sure if
that's acceptable, but I couldn't find a way to do it only for the
thumbs.

Please consider (and please tell me what I've done wrong!)

Best regards,
Stian
Index: src/FolderExport.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/FolderExport.cs,v
retrieving revision 1.21
diff -u -r1.21 FolderExport.cs
--- src/FolderExport.cs	1 Dec 2005 23:52:59 -0000	1.21
+++ src/FolderExport.cs	11 Dec 2005 22:35:49 -0000
@@ -273,7 +273,7 @@
 		protected ScaleRequest [] requests;
 		
 		protected string [] pixbuf_keys = {"quality"};
-		protected string [] pixbuf_values = {"75"};
+		protected string [] pixbuf_values = {"100"};
 
 		protected struct ScaleRequest {
 			public string Name;
@@ -483,9 +483,14 @@
 
 		private void CreateComments(string photo_path, int photo_index)
 		{
-			StreamWriter comment = File.CreateText(SubdirPath  ("comments", AlternateName (photo_index, "txt")));
-			comment.Write("<span>photo " + photo_index + "</span> ");
-			comment.Write (collection [photo_index].Description + "\n");
+			StreamWriter comment = File.CreateText(SubdirPath  ("comments", photo_index + 1 + ".txt"));
+
+			if (collection [photo_index].Description != "")
+				comment.Write ("<span>" + collection [photo_index].Description + "</span>\n");
+
+			else
+				comment.Write("<span>Photo " + (photo_index + 1) + "</span> ");
+
 			comment.Close();
 		}
 


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