[longomatch] Add a new property to autosave projects
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add a new property to autosave projects
- Date: Tue, 25 Jun 2013 12:45:24 +0000 (UTC)
commit d7913cf5c2fedbb96581845e0859fc28a5793350
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Tue Jun 25 14:34:13 2013 +0200
Add a new property to autosave projects
LongoMatch.Core/Config.cs | 12 ++++++++++++
LongoMatch.Services/Services/EventsManager.cs | 3 +++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.Core/Config.cs b/LongoMatch.Core/Config.cs
index 9148541..308ca6e 100644
--- a/LongoMatch.Core/Config.cs
+++ b/LongoMatch.Core/Config.cs
@@ -242,6 +242,16 @@ namespace LongoMatch
Save ();
}
}
+
+ public static bool AutoSave {
+ get {
+ return state.autoSave;
+ }
+ set {
+ state.autoSave = value;
+ Save ();
+ }
+ }
#endregion
}
@@ -249,6 +259,7 @@ namespace LongoMatch
[Serializable]
public class ConfigState{
public bool fastTagging;
+ public bool autoSave;
public string currentDatabase;
public string lang;
public VideoStandard captureVideoStandard;
@@ -264,6 +275,7 @@ namespace LongoMatch
currentDatabase = Constants.DEFAULT_DB_NAME;
lang = null;
captureVideoStandard = VideoStandards.P480;
+ autoSave = false;
captureEncodingProfile = EncodingProfiles.MP4;
captureEncodingQuality = EncodingQualities.Medium;
renderVideoStandard = VideoStandards.P720_16_9;
diff --git a/LongoMatch.Services/Services/EventsManager.cs b/LongoMatch.Services/Services/EventsManager.cs
index b0ba698..2a04359 100644
--- a/LongoMatch.Services/Services/EventsManager.cs
+++ b/LongoMatch.Services/Services/EventsManager.cs
@@ -150,6 +150,9 @@ namespace LongoMatch.Services
if (projectType == ProjectType.FileProject) {
player.Play();
}
+ if (Config.AutoSave) {
+ Core.DB.UpdateProject (openedProject);
+ }
}
protected virtual void OnNewTagAtFrame(Category category, int frame) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]