[f-spot/cleanup-backend: 3/23] Add ActiveSoruce Property to App



commit 29e0487acd2fe399b3524a4cc10a0fc53062584a
Author: Mike Gemünde <mike gemuende de>
Date:   Thu Jul 15 09:53:10 2010 +0200

    Add ActiveSoruce Property to App
    
    This property is currently nearly useless, but it should be extended
    so select different sources. At the moment, there is just one and
    therfore it is hardcoded.

 src/Core/App.cs |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/App.cs b/src/Core/App.cs
index 04b9213..edf00ac 100644
--- a/src/Core/App.cs
+++ b/src/Core/App.cs
@@ -21,6 +21,8 @@ using Mono.Unix;
 
 using Hyena;
 
+using FSpot.Sources;
+
 namespace FSpot
 {
 	public class App : Unique.App
@@ -79,6 +81,19 @@ namespace FSpot
 			}
 		}
 
+        private IPhotoSource active_source;
+        public IPhotoSource ActiveSource {
+            get {
+                lock (sync_handle) {
+                    if (active_source == null) {
+                        active_source = new DatabaseSource (Database);
+                    }
+                }
+
+                return active_source;
+            }
+        }
+
 		public void Import (string path)
 		{
 			if (IsRunning) {



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