f-spot r4353 - in trunk: . src
- From: sdelcroix svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4353 - in trunk: . src
- Date: Mon, 15 Sep 2008 15:25:58 +0000 (UTC)
Author: sdelcroix
Date: Mon Sep 15 15:25:58 2008
New Revision: 4353
URL: http://svn.gnome.org/viewvc/f-spot?rev=4353&view=rev
Log:
2008-09-15 Stephane Delcroix <sdelcroix novell com>
* src/PhotoSore.cs: fixing a bug in version creation introduced by the
dupe detect patch.
Modified:
trunk/ChangeLog
trunk/src/PhotoStore.cs
Modified: trunk/src/PhotoStore.cs
==============================================================================
--- trunk/src/PhotoStore.cs (original)
+++ trunk/src/PhotoStore.cs Mon Sep 15 15:25:58 2008
@@ -521,6 +521,7 @@
public void Commit (Photo [] items)
{
+ uint timer = Log.DebugTimerStart ();
// Only use a transaction for multiple saves. Avoids recursive transactions.
bool use_transactions = !Database.InTransaction && items.Length > 1;
@@ -535,6 +536,7 @@
Database.CommitTransaction ();
EmitChanged (items, new PhotoEventArgs (items, changes));
+ Log.DebugTimerPrint (timer, "Commit took {0}");
}
private PhotoChanges Update (Photo photo) {
@@ -589,13 +591,14 @@
foreach (uint version_id in changes.VersionsAdded) {
PhotoVersion version = photo.GetVersion (version_id) as PhotoVersion;
Database.ExecuteNonQuery (new DbCommand (
- "INSERT OR IGNORE INTO photo_versions (photo_id, version_id, name, uri, protected) " +
- "VALUES (:photo_id, :version_id, :name, :uri, :is_protected)",
+ "INSERT OR IGNORE INTO photo_versions (photo_id, version_id, name, uri, protected, md5_sum) " +
+ "VALUES (:photo_id, :version_id, :name, :uri, :is_protected, :md5_sum)",
"photo_id", photo.Id,
"version_id", version_id,
"name", version.Name,
"uri", version.Uri.ToString (),
- "is_protected", version.IsProtected));
+ "is_protected", version.IsProtected,
+ "md5_sum", version.MD5Sum));
}
if (changes.VersionsModified != null)
foreach (uint version_id in changes.VersionsModified) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]