[baobab/wip/vala: 19/53] Make the directory a property of the scanner.



commit 15b5b48aee41a70338773b759a9a95c97cfddd85
Author: Paolo Borelli <pborelli gnome org>
Date:   Fri Jan 6 11:27:53 2012 +0100

    Make the directory a property of the scanner.

 src/baobab-scanner.vala          |    2 ++
 src/baobab-sync-scanner.vala     |    1 +
 src/baobab-threaded-scanner.vala |    1 -
 3 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/baobab-scanner.vala b/src/baobab-scanner.vala
index 8beabd4..ccea96c 100644
--- a/src/baobab-scanner.vala
+++ b/src/baobab-scanner.vala
@@ -42,6 +42,8 @@ namespace Baobab {
 			FILE_ATTRIBUTE_UNIX_DEVICE + "," +
 			FILE_ATTRIBUTE_ACCESS_CAN_READ;
 
+		public File directory { get; protected set; }
+
 		public abstract void scan (File directory);
 
 		public int max_depth { get; protected set; }
diff --git a/src/baobab-sync-scanner.vala b/src/baobab-sync-scanner.vala
index 7208305..a8d8317 100644
--- a/src/baobab-sync-scanner.vala
+++ b/src/baobab-sync-scanner.vala
@@ -114,6 +114,7 @@ namespace Baobab {
 		}
 
 		protected override void scan (File directory) {
+			this.directory = directory;
 			try {
 				var info = directory.query_info (ATTRIBUTES, 0, cancellable);
 				var results = add_directory (directory, info);
diff --git a/src/baobab-threaded-scanner.vala b/src/baobab-threaded-scanner.vala
index 1abcbfd..9a813e7 100644
--- a/src/baobab-threaded-scanner.vala
+++ b/src/baobab-threaded-scanner.vala
@@ -2,7 +2,6 @@ namespace Baobab {
 	class ThreadedScanner : Scanner {
 		AsyncQueue<ResultsArray> results_queue;
 		ThreadedScanner? self;
-		File directory;
 
 		/* General overview:
 		 *



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