[baobab/reroot-view: 13/35] Fold two functions together
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab/reroot-view: 13/35] Fold two functions together
- Date: Sun, 28 Jun 2020 10:59:10 +0000 (UTC)
commit 878144e872f54947225c438bd1b56b4a8f50478c
Author: Stefano Facchini <stefano facchini gmail com>
Date: Wed Jun 17 19:49:02 2020 +0200
Fold two functions together
scan_active_location was now called only by scan_location.
src/baobab-window.vala | 30 +++++++++++++-----------------
1 file changed, 13 insertions(+), 17 deletions(-)
---
diff --git a/src/baobab-window.vala b/src/baobab-window.vala
index 69b0c45..c6e658b 100644
--- a/src/baobab-window.vala
+++ b/src/baobab-window.vala
@@ -283,21 +283,6 @@ namespace Baobab {
file_chooser.show ();
}
- void scan_location (Location location, bool force = false) {
- cancel_scan ();
-
- active_location = location;
-
- pathbar.location = location;
- folder_display.location = location;
-
- // Update the timestamp for GtkRecentManager
- location_list.add_location (location);
-
- treeview.model = null;
- scan_active_location (force);
- }
-
void location_activated (Location location) {
location.mount_volume.begin ((location_, res) => {
try {
@@ -638,9 +623,20 @@ namespace Baobab {
}
}
- void scan_active_location (bool force) {
- var scanner = active_location.scanner;
+ void scan_location (Location location, bool force = false) {
+ cancel_scan ();
+
+ active_location = location;
+
+ pathbar.location = location;
+ folder_display.location = location;
+
+ // Update the timestamp for GtkRecentManager
+ location_list.add_location (location);
+ treeview.model = null;
+
+ var scanner = active_location.scanner;
scan_completed_handler = scanner.completed.connect (scanner_completed);
clear_message ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]