[f-spot/cleanup-backend: 14/24] Add ActiveSoruce Property to App



commit a9032735269803f916f6b1ff019e739123dc113c
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]