[f-spot/rubenv-gsoc-2009: 51/86] Add saving API.
- From: Ruben Vermeersch <rubenv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot/rubenv-gsoc-2009: 51/86] Add saving API.
- Date: Sun, 23 May 2010 12:36:14 +0000 (UTC)
commit 85294c2b38582bc5c4ee124129c138a4994c3ab0
Author: Ruben Vermeersch <ruben savanne be>
Date: Mon Aug 3 22:39:29 2009 +0200
Add saving API.
src/Editors/Processing/Pipeline.cs | 10 ++++++++--
src/Editors/Processing/Setting.cs | 2 --
src/Editors/Processing/SettingStore.cs | 1 -
3 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/Editors/Processing/Pipeline.cs b/src/Editors/Processing/Pipeline.cs
index af0e35d..b156eae 100644
--- a/src/Editors/Processing/Pipeline.cs
+++ b/src/Editors/Processing/Pipeline.cs
@@ -50,8 +50,7 @@ namespace FSpot.Editors.Processing {
{
Pixbuf input = Input.ShallowCopy ();
Pixbuf output = null;
- foreach (Step step in Steps.Values)
- {
+ foreach (Step step in Steps.Values) {
step.Process (this, input, out output);
input.Dispose ();
input = output;
@@ -84,6 +83,13 @@ namespace FSpot.Editors.Processing {
setting = new Setting (Photo.Id, Photo.DefaultVersionId, key, null);
return setting;
}
+
+ public void Save ()
+ {
+ foreach (Setting setting in Settings.Values) {
+ Core.Database.ProcessingSettings.Commit (setting);
+ }
+ }
#endregion
}
}
diff --git a/src/Editors/Processing/Setting.cs b/src/Editors/Processing/Setting.cs
index 2be5791..bbdcd03 100644
--- a/src/Editors/Processing/Setting.cs
+++ b/src/Editors/Processing/Setting.cs
@@ -12,7 +12,6 @@ using System;
namespace FSpot.Editors.Processing {
public class Setting : DbItem
{
- public uint Id { get; internal set; }
public uint PhotoId { get; private set; }
public uint VersionId { get; private set; }
public string Key { get; private set; }
@@ -23,7 +22,6 @@ namespace FSpot.Editors.Processing {
public Setting (uint id, uint photo, uint version, string key, string val)
: base (id) {
- Id = id;
PhotoId = photo;
VersionId = version;
Key = key;
diff --git a/src/Editors/Processing/SettingStore.cs b/src/Editors/Processing/SettingStore.cs
index dfe0fc1..e0a4002 100644
--- a/src/Editors/Processing/SettingStore.cs
+++ b/src/Editors/Processing/SettingStore.cs
@@ -87,7 +87,6 @@ namespace FSpot.Editors.Processing {
"value", setting.Value
)
);
- setting.Id = id;
} else {
Database.ExecuteNonQuery (
new DbCommand (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]