On Sat, 2009-11-07 at 08:37 -0600, Steve McGrath wrote: > I've been attempting to make a patch based on the differences between > your branch and the latest F-Spot sources from git. I'm not having much > luck, though. I've not a whole lot of experience in this area. > > Is there any chance you could take a look at this patch file and help me > figure out what I've done wrong? Whenever I try to apply it, patch > simply hangs forever with no output... It's very strange. And... Here's the patch. Man, I hate when I do that.
diff -Naur f-spot/src/Imaging/Ciff.cs paulwbs-clone/src/Imaging/Ciff.cs
--- f-spot/src/Imaging/Ciff.cs 2009-11-07 02:40:43.111028831 -0600
+++ paulwbs-clone/src/Imaging/Ciff.cs 2009-11-07 02:20:06.939030168 -0600
@@ -441,7 +441,7 @@
return base.Date;
}
- return new CaptureTime (date, little).LocalTime.ToUniversalTime ();
+ return new CaptureTime (date, little).LocalTime;
}
}
diff -Naur f-spot/src/Imaging/ImageFile.cs paulwbs-clone/src/Imaging/ImageFile.cs
--- f-spot/src/Imaging/ImageFile.cs 2009-11-07 02:04:39.171029348 -0600
+++ paulwbs-clone/src/Imaging/ImageFile.cs 2009-11-07 01:17:46.695030565 -0600
@@ -206,7 +206,7 @@
return t;
}
-
+
[Obsolete ("use Create (System.Uri) instead")]
public static ImageFile Create (string path)
{
diff -Naur f-spot/src/Imaging/JpegFile.cs paulwbs-clone/src/Imaging/JpegFile.cs
--- f-spot/src/Imaging/JpegFile.cs 2009-11-07 02:40:43.111028831 -0600
+++ paulwbs-clone/src/Imaging/JpegFile.cs 2009-11-07 02:21:18.227040590 -0600
@@ -333,13 +333,13 @@
e = sub.Directory [0].Lookup (TagId.DateTimeOriginal);
if (e != null)
- return DirectoryEntry.DateTimeFromString (e.StringValue).ToUniversalTime ();
+ return DirectoryEntry.DateTimeFromString (e.StringValue);
}
e = ExifHeader.Directory.Lookup (TagId.DateTime);
if (e != null)
- return DirectoryEntry.DateTimeFromString (e.StringValue).ToUniversalTime ();
+ return DirectoryEntry.DateTimeFromString (e.StringValue);
return base.Date;
#else
@@ -349,7 +349,7 @@
if (time_str == null || time_str == "")
time_str = ExifData.LookupFirstValue (Exif.Tag.DateTime);
- time = Exif.ExifUtil.DateTimeFromString (time_str).ToUniversalTime ();
+ time = Exif.ExifUtil.DateTimeFromString (time_str);
#endif
} catch (System.Exception e) {
Console.WriteLine (e);
diff -Naur f-spot/src/Imaging/MrwFile.cs paulwbs-clone/src/Imaging/MrwFile.cs
--- f-spot/src/Imaging/MrwFile.cs 2009-11-07 02:40:43.111028831 -0600
+++ paulwbs-clone/src/Imaging/MrwFile.cs 2009-11-07 01:17:46.695030565 -0600
@@ -201,7 +201,7 @@
DirectoryEntry e = this.Header.Directory.Lookup (TagId.DateTime);
if (e != null)
- return DirectoryEntry.DateTimeFromString (e.StringValue).ToUniversalTime ();
+ return DirectoryEntry.DateTimeFromString (e.StringValue);
else
return base.Date;
}
diff -Naur f-spot/src/Imaging/PngFile.cs paulwbs-clone/src/Imaging/PngFile.cs
--- f-spot/src/Imaging/PngFile.cs 2009-11-07 02:40:43.115031295 -0600
+++ paulwbs-clone/src/Imaging/PngFile.cs 2009-11-07 02:22:00.327037656 -0600
@@ -1418,7 +1418,7 @@
foreach (Chunk chunk in Chunks) {
TimeChunk time = chunk as TimeChunk;
if (time != null)
- return time.Time.ToUniversalTime ();
+ return time.Time;
}
return base.Date;
}
diff -Naur f-spot/src/Imaging/Tiff.cs paulwbs-clone/src/Imaging/Tiff.cs
--- f-spot/src/Imaging/Tiff.cs 2009-11-07 02:40:43.115031295 -0600
+++ paulwbs-clone/src/Imaging/Tiff.cs 2009-11-07 01:17:46.711030015 -0600
@@ -2066,13 +2066,13 @@
e = sub.Directory [0].Lookup (TagId.DateTimeOriginal);
if (e != null)
- return DirectoryEntry.DateTimeFromString (e.StringValue).ToUniversalTime ();
+ return DirectoryEntry.DateTimeFromString (e.StringValue);
}
e = this.Header.Directory.Lookup (TagId.DateTime);
if (e != null)
- return DirectoryEntry.DateTimeFromString (e.StringValue).ToUniversalTime ();
+ return DirectoryEntry.DateTimeFromString (e.StringValue);
else
return base.Date;
}
diff -Naur f-spot/src/Jobs/SyncMetadataJob.cs paulwbs-clone/src/Jobs/SyncMetadataJob.cs
--- f-spot/src/Jobs/SyncMetadataJob.cs 2009-11-07 02:40:43.115031295 -0600
+++ paulwbs-clone/src/Jobs/SyncMetadataJob.cs 2009-11-07 01:17:46.711030015 -0600
@@ -53,7 +53,7 @@
FSpot.JpegFile jimg = img as FSpot.JpegFile;
jimg.SetDescription (photo.Description);
- jimg.SetDateTimeOriginal (photo.Time.ToLocalTime ());
+ jimg.SetDateTimeOriginal (photo.Time);
jimg.SetXmp (UpdateXmp (photo, jimg.Header.GetXmp ()));
jimg.SaveMetaData (path);
diff -Naur f-spot/src/UI.Dialog/AdjustTimeDialog.cs paulwbs-clone/src/UI.Dialog/AdjustTimeDialog.cs
--- f-spot/src/UI.Dialog/AdjustTimeDialog.cs 2009-11-07 02:40:43.119030616 -0600
+++ paulwbs-clone/src/UI.Dialog/AdjustTimeDialog.cs 2009-11-07 01:17:46.711030015 -0600
@@ -122,7 +122,7 @@
IBrowsableItem item = Item.Current;
name_label.Text = System.Uri.UnescapeDataString(item.Name);
- old_label.Text = item.Time.ToLocalTime ().ToString ();
+ old_label.Text = (item.Time).ToString ();
int i = collection.Count > 0 ? Item.Index + 1: 0;
// Note for translators: This indicates the current photo is photo {0} of {1} out of photos
diff -Naur f-spot/src/UI.Dialog/LastRollDialog.cs paulwbs-clone/src/UI.Dialog/LastRollDialog.cs
--- f-spot/src/UI.Dialog/LastRollDialog.cs 2009-11-07 02:04:39.239031430 -0600
+++ paulwbs-clone/src/UI.Dialog/LastRollDialog.cs 2009-11-07 01:17:46.711030015 -0600
@@ -86,6 +86,7 @@
for (uint k = 0; k < rolls.Length; k++)
{
uint numphotos = rollstore.PhotosInRoll (rolls [k]);
+ // Roll time is in UTC always
DateTime date = rolls [k].Time.ToLocalTime ();
string header = String.Format ("{0} ({1})",
diff -Naur f-spot/src/Utils/DbUtils.cs paulwbs-clone/src/Utils/DbUtils.cs
--- f-spot/src/Utils/DbUtils.cs 2009-11-07 02:40:43.119030616 -0600
+++ paulwbs-clone/src/Utils/DbUtils.cs 2009-11-07 01:17:46.711030015 -0600
@@ -17,23 +17,23 @@
public static DateTime DateTimeFromUnixTime (long unix_time)
{
DateTime date_time = new DateTime (1970, 1, 1);
- return date_time.AddSeconds (unix_time).ToLocalTime ();
+ return date_time.AddSeconds (unix_time);
}
public static long UnixTimeFromDateTime (DateTime date_time)
{
- return (long) (date_time.ToUniversalTime () - new DateTime (1970, 1, 1)).TotalSeconds;
+ return (long) (date_time - new DateTime (1970, 1, 1)).TotalSeconds;
}
#else
public static DateTime DateTimeFromUnixTime (long unix_time)
{
- DateTime date_time = new DateTime (1970, 1, 1).ToLocalTime ();
+ DateTime date_time = new DateTime (1970, 1, 1);
return date_time.AddSeconds (unix_time);
}
public static long UnixTimeFromDateTime (DateTime date_time)
{
- return (long) (date_time - new DateTime (1970, 1, 1).ToLocalTime ()).TotalSeconds;
+ return (long) (date_time - new DateTime (1970, 1, 1)).TotalSeconds;
}
#endif
}
diff -Naur f-spot/src/Widgets/IconView.cs paulwbs-clone/src/Widgets/IconView.cs
--- f-spot/src/Widgets/IconView.cs 2009-11-07 02:40:43.119030616 -0600
+++ paulwbs-clone/src/Widgets/IconView.cs 2009-11-07 01:17:46.715029965 -0600
@@ -902,9 +902,9 @@
if (DisplayDates) {
string date;
if (cell_width > 200) {
- date = photo.Time.ToLocalTime ().ToString ();
+ date = photo.Time.ToString ();
} else {
- date = photo.Time.ToLocalTime ().ToShortDateString ();
+ date = photo.Time.ToShortDateString ();
}
Pango.Layout layout = (Pango.Layout)date_layouts [date];
diff -Naur f-spot/src/Widgets/InfoBox.cs paulwbs-clone/src/Widgets/InfoBox.cs
--- f-spot/src/Widgets/InfoBox.cs 2009-11-07 02:40:43.127032611 -0600
+++ paulwbs-clone/src/Widgets/InfoBox.cs 2009-11-07 01:17:46.715029965 -0600
@@ -337,7 +337,7 @@
height = real_height.ToString ();
}
#if USE_EXIF_DATE
- date = img.Date.ToLocalTime ();
+ date = img.Date;
#endif
}
@@ -521,7 +521,7 @@
#if USE_EXIF_DATE
date_value_label.Text = info.Date;
#else
- DateTime local_time = photo.Time.ToLocalTime ();
+ DateTime local_time = photo.Time;
date_value_label.Text = String.Format ("{0}{2}{1}",
local_time.ToShortDateString (),
local_time.ToShortTimeString (),
@@ -637,13 +637,13 @@
if (first.Time.Date == last.Time.Date) {
//Note for translators: {0} is a date, {1} and {2} are times.
date_value_label.Text = String.Format(Catalog.GetString("On {0} between \n{1} and {2}"),
- first.Time.ToLocalTime ().ToShortDateString (),
- first.Time.ToLocalTime ().ToShortTimeString (),
- last.Time.ToLocalTime ().ToShortTimeString ());
+ first.Time.ToShortDateString (),
+ first.Time.ToShortTimeString (),
+ last.Time.ToShortTimeString ());
} else {
date_value_label.Text = String.Format(Catalog.GetString("Between {0} \nand {1}"),
- first.Time.ToLocalTime ().ToShortDateString (),
- last.Time.ToLocalTime ().ToShortDateString ());
+ first.Time.ToShortDateString (),
+ last.Time.ToShortDateString ());
}
}
date_label.Visible = show_date;
Attachment:
signature.asc
Description: This is a digitally signed message part