[banshee] [Bookmark] Make setters public, add Save method



commit de56c5beee96028e0b07a65fb74260c3ce5f3ebb
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Mon May 17 15:21:55 2010 -0700

    [Bookmark] Make setters public, add Save method

 .../Banshee.Collection.Database/Bookmark.cs        |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.Collection.Database/Bookmark.cs b/src/Core/Banshee.Services/Banshee.Collection.Database/Bookmark.cs
index 914cbd3..ddac2ea 100644
--- a/src/Core/Banshee.Services/Banshee.Collection.Database/Bookmark.cs
+++ b/src/Core/Banshee.Services/Banshee.Collection.Database/Bookmark.cs
@@ -64,13 +64,13 @@ namespace Banshee.Collection.Database
         }
 
         [DatabaseColumn]
-        public TimeSpan Position { get; private set; }
+        public TimeSpan Position { get; set; }
 
         [DatabaseColumn]
-        public DateTime CreatedAt { get; private set; }
+        public DateTime CreatedAt { get; set; }
 
         [DatabaseColumn]
-        public string Type { get; private set; }
+        public string Type { get; set; }
 
         public string Name {
             get {
@@ -81,7 +81,7 @@ namespace Banshee.Collection.Database
             }
         }
 
-        public DatabaseTrackInfo Track { get; private set; }
+        public DatabaseTrackInfo Track { get; set; }
 
         public Bookmark () {}
 
@@ -94,6 +94,11 @@ namespace Banshee.Collection.Database
             CreatedAt = DateTime.Now;
             Type = type;
 
+            Save ();
+        }
+
+        public void Save ()
+        {
             Provider.Save (this);
         }
 
@@ -114,6 +119,7 @@ namespace Banshee.Collection.Database
                     }
                 }
             } else {
+                Log.ErrorFormat ("Tried to jump to bookmark {0}, but track is null", BookmarkId);
                 Remove ();
             }
         }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]