Original export
- From: Stian Jordet <liste jordet nu>
- To: f-spot-list gnome org
- Subject: Original export
- Date: Mon, 09 Jan 2006 00:42:23 +0100
Hi,
I see you have "fixed" the comments in original export twice now. It
still doesn't work at all. The filename _must_ be just 1.txt 2.txt and
so on. Not img-1.txt... Second, it's plain ugly to have "Photo 1 This is
the description". Much better to use only the description if it's
available. Else, use "Photo 1".
I have this patch that does this. It's probably both ugly and wrong, but
it works for me. Sent something similar some weeks ago. Please, please
implement something similar in f-spot.
Best regards,
Stian
--- src/FolderExport.cs.orig 2006-01-08 20:44:33.768078536 +0100
+++ src/FolderExport.cs 2006-01-09 00:36:35.972200568 +0100
@@ -457,11 +457,6 @@
return String.Format ("img-{0}.jpg", photo_index + 1);
}
- private string AlternateName (int photo_index, string extension)
- {
- return System.IO.Path.GetFileNameWithoutExtension (ImageName (photo_index)) + extension;
- }
-
private void SetTime ()
{
try {
@@ -483,9 +478,11 @@
private void CreateComments(string photo_path, int photo_index)
{
- StreamWriter comment = File.CreateText(SubdirPath ("comments", AlternateName (photo_index + 1, ".txt")));
- comment.Write("<span>photo " + (photo_index + 1) + "</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]