[baobab/reroot-view: 22/31] Add a way to retrieve the scanning progress
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab/reroot-view: 22/31] Add a way to retrieve the scanning progress
- Date: Sun, 21 Jun 2020 16:54:27 +0000 (UTC)
commit 8e3a15f3a14fc40632a202c6dfc2a671532c8d7c
Author: Stefano Facchini <stefano facchini gmail com>
Date: Thu Jun 18 19:52:52 2020 +0200
Add a way to retrieve the scanning progress
src/baobab-scanner.vala | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/baobab-scanner.vala b/src/baobab-scanner.vala
index 7ee5f8e..389284d 100644
--- a/src/baobab-scanner.vala
+++ b/src/baobab-scanner.vala
@@ -53,6 +53,8 @@ namespace Baobab {
public bool show_allocated_size { get; private set; }
+ public uint64 total_size { get; private set; }
+
public int max_depth { get; protected set; }
public signal void completed();
@@ -243,6 +245,7 @@ namespace Baobab {
}
var child_results = new Results (child_info, results);
+ total_size += child_results.size;
results.update_with_child (child_results);
results_array.results += (owned) child_results;
break;
@@ -264,6 +267,7 @@ namespace Baobab {
}
var results = new Results (info, parent);
+ total_size += results.size;
try {
add_children (directory, results, results_array);
@@ -415,6 +419,7 @@ namespace Baobab {
cancellable.reset ();
scan_error = null;
+ total_size = 0;
}
public void scan (bool force) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]