[baobab/wip/vala: 48/65] Move logic for excluded mount points to Scanner



commit 3ec392e7a52e99357f22c275cf16ca02692e94f5
Author: Stefano Facchini <stefano facchini gmail com>
Date:   Thu Mar 15 15:36:35 2012 +0100

    Move logic for excluded mount points to Scanner

 src/baobab-application.vala |    7 +------
 src/baobab-scanner.vala     |    9 ++++++++-
 2 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/baobab-application.vala b/src/baobab-application.vala
index 21abeda..b8981d1 100644
--- a/src/baobab-application.vala
+++ b/src/baobab-application.vala
@@ -22,7 +22,7 @@ namespace Baobab {
 			}
 		}
 
-		public static HashTable<File, unowned File> get_excluded_locations (bool exclude_mounts) {
+		public static HashTable<File, unowned File> get_excluded_locations () {
 			var app = baobab;
 
 			var excluded_locations = new HashTable<File, unowned File> (File.hash, File.equal);
@@ -41,11 +41,6 @@ namespace Baobab {
 				}
 			}
 
-			if (exclude_mounts) {
-				foreach (unowned UnixMountEntry mount in UnixMountEntry.get (null))
-					excluded_locations.add (File.new_for_path (mount.get_mount_path ()));
-			}
-
 			return excluded_locations;
 		}
 
diff --git a/src/baobab-scanner.vala b/src/baobab-scanner.vala
index 50f90bb..0fe42e7 100644
--- a/src/baobab-scanner.vala
+++ b/src/baobab-scanner.vala
@@ -132,7 +132,14 @@ namespace Baobab {
 			                  typeof (State),   // STATE
 			                  typeof (Error)}); // ERROR (if STATE is ERROR)
 			set_sort_column_id (Columns.SIZE, Gtk.SortType.DESCENDING);
-			excluded_locations = Application.get_excluded_locations (exclude_mounts);
+
+			excluded_locations = Application.get_excluded_locations ();
+
+			if (exclude_mounts) {
+				foreach (unowned UnixMountEntry mount in UnixMountEntry.get (null))
+					excluded_locations.add (File.new_for_path (mount.get_mount_path ()));
+			}
+
 			excluded_locations.remove (directory);
 		}
 	}



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