[baobab/wip/vala: 34/44] Make the directory a property of the scanner.
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab/wip/vala: 34/44] Make the directory a property of the scanner.
- Date: Sun, 8 Jan 2012 15:28:33 +0000 (UTC)
commit ad758733a09301d7054dec1b4e5eb5ba648d6fad
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 2018923..072191b 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]