Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-utils/gsearchtool/ChangeLog,v
retrieving revision 1.338
diff -u -p -r1.338 ChangeLog
--- ChangeLog	24 Oct 2004 23:43:16 -0000	1.338
+++ ChangeLog	26 Oct 2004 05:46:55 -0000
@@ -1,3 +1,33 @@
+2004-10-25  Dennis Cranston <dennis_cranston at yahoo com>
+
+	Fix bug #153563:  Add internal logic to perform a two scan search 
+	for simple filename searches.  A quick search will consist of an 
+	indexed search that uses the locate command followed by a thorough 
+	search that uses the find command.  The quick search and second 
+	scan logic can be disabled with gconf keys.  Advanced users can 
+	fine tune the quick search and second scan logic adjusting the 
+	new excluded path gconf keys.  By default, a quick search is not 
+	performed for the paths: /mnt/*, /media/*, /dev/*, /tmp/*, /proc/*, 
+	and /var/*.  By default, a second scan is not performed for the 
+	path: /.
+	
+	* gsearchtool.[ch]:  Add first pass, disable second pass, and a 
+	file hash to the search_command structure;  build_search_command(),
+	handle_search_command_stdout_io(): add first pass logic handling;  
+	add_file_to_search_results():  do not add duplicate files in the 
+	search results.
+	
+	* gsearchtool-support.[ch]:  Add the function 
+	is_quick_search_excluded_path(), is_second_scan_excluded_path()
+	and gsearchtool_gconf_get_list().
+	
+	* gsearchtool-callbacks.c:  Pass a boolean for the first pass to
+	build_search_command().
+	
+	* gnome-search-tool.schemas:  Deprecate the force_quick_search key.
+	Add three new keys: quick_search_second_scan_exclude_path, 
+	quick_search_exclude_path and disable_quick_search_second_scan.
+	
 2004-10-24  Dennis Cranston <dennis_cranston at yahoo com>
 
 	* gsearchtool.c: Add new function intermediate_file_count_update()
Index: gsearchtool.h
===================================================================
RCS file: /cvs/gnome/gnome-utils/gsearchtool/gsearchtool.h,v
retrieving revision 1.37
diff -u -p -r1.37 gsearchtool.h
--- gsearchtool.h	17 Jul 2004 00:22:26 -0000	1.37
+++ gsearchtool.h	26 Oct 2004 05:46:56 -0000
@@ -85,8 +85,11 @@ extern struct _SearchStruct {
 	gboolean		not_running_timeout;
 	gboolean		aborted;
 	gboolean		quick_mode;
+	gboolean		first_pass;
+	gboolean		disable_second_pass;
 	RunStatus        	running;
 	GHashTable              *pixbuf_hash;
+	GHashTable		*file_hash;
 } search_command;
 
 extern struct _InterfaceStruct {
@@ -131,7 +134,7 @@ struct _SearchConstraint {
 };
 
 gchar *
-build_search_command 		(void);
+build_search_command 		(gboolean first_pass);
 
 void
 spawn_search_command 		(gchar *command);
Index: gsearchtool-support.h
===================================================================
RCS file: /cvs/gnome/gnome-utils/gsearchtool/gsearchtool-support.h,v
retrieving revision 1.23
diff -u -p -r1.23 gsearchtool-support.h
--- gsearchtool-support.h	17 Jul 2004 00:22:26 -0000	1.23
+++ gsearchtool-support.h	26 Oct 2004 05:46:56 -0000
@@ -39,22 +39,10 @@ gboolean  	
 is_path_hidden 			(const gchar *path);
 
 gboolean  	
-is_path_in_home_folder 		(const gchar *path);
+is_quick_search_excluded_path	(const gchar *path);
 
 gboolean  	
-is_path_in_mount_folder		(const gchar *path);
-
-gboolean  	
-is_path_in_proc_folder		(const gchar *path);
-
-gboolean  	
-is_path_in_dev_folder		(const gchar *path);
-
-gboolean  	
-is_path_in_var_folder		(const gchar *path);
-
-gboolean  	
-is_path_in_tmp_folder		(const gchar *path);
+is_second_scan_excluded_path	(const gchar *path);
 
 gboolean
 file_extension_is 		(const char *filename, 
@@ -113,6 +101,9 @@ gsearchtool_gconf_set_boolean 	(const gc
 
 char *
 gsearchtool_gconf_get_string 	(const gchar *key);
+
+GSList * 
+gsearchtool_gconf_get_list 	(const gchar *key);
 
 gchar *
 gsearchtool_unique_filename 	(const gchar *dir,
Index: gsearchtool.c
===================================================================
RCS file: /cvs/gnome/gnome-utils/gsearchtool/gsearchtool.c,v
retrieving revision 1.239
diff -u -p -r1.239 gsearchtool.c
--- gsearchtool.c	24 Oct 2004 23:43:16 -0000	1.239
+++ gsearchtool.c	26 Oct 2004 05:46:59 -0000
@@ -295,7 +295,7 @@ has_additional_constraints (void)
 }
 
 gchar *
-build_search_command (void)
+build_search_command (gboolean first_pass)
 {
 	GString *command;
 	gchar *file_is_named_utf8;
@@ -346,56 +346,57 @@ build_search_command (void)
 	
 	command = g_string_new ("");
 	search_command.show_hidden_files = FALSE;
-	search_command.quick_mode = FALSE;
 	search_command.regex_string = NULL;
 	search_command.date_format_pref = NULL;
 	search_command.file_is_named_pattern = NULL;
 	
+	search_command.first_pass = first_pass;
+	if (search_command.first_pass == TRUE) {
+		search_command.quick_mode = FALSE;
+	}
+	
 	if ((GTK_WIDGET_VISIBLE(interface.additional_constraints) == FALSE) ||
 	    (has_additional_constraints() == FALSE)) {
 	
-		gchar *locate;
-		gboolean disable_quick_search;
-		gboolean force_quick_search;
-		
-		locate = g_find_program_in_path ("locate");
 		file_is_named_backslashed = backslash_special_characters (file_is_named_locale);
 		file_is_named_escaped = escape_single_quotes (file_is_named_backslashed);
-
 		search_command.file_is_named_pattern = g_strdup(file_is_named_utf8);
-		disable_quick_search = gsearchtool_gconf_get_boolean ("/apps/gnome-search-tool/disable_quick_search");
-		force_quick_search = gsearchtool_gconf_get_boolean ("/apps/gnome-search-tool/force_quick_search");
 		
-		if ((disable_quick_search != TRUE) && (locate != NULL)) {
-		    	if ((force_quick_search == TRUE) || 
-			    ((is_path_in_home_folder (look_in_folder_locale) != TRUE) 
-			     && (is_path_in_mount_folder (look_in_folder_locale) != TRUE)
-			     && (is_path_in_proc_folder (look_in_folder_locale) != TRUE) 
-			     && (is_path_in_dev_folder (look_in_folder_locale) != TRUE)
-			     && (is_path_in_var_folder (look_in_folder_locale) != TRUE)
-			     && (is_path_in_tmp_folder (look_in_folder_locale) != TRUE))) {	
-				g_string_append_printf (command, "%s %s '%s*%s'", 
+		if (search_command.first_pass == TRUE) {
+		
+			gchar *locate;
+			gboolean disable_quick_search;
+		
+			locate = g_find_program_in_path ("locate");
+			disable_quick_search = gsearchtool_gconf_get_boolean ("/apps/gnome-search-tool/disable_quick_search");		
+			search_command.disable_second_pass = gsearchtool_gconf_get_boolean ("/apps/gnome-search-tool/disable_quick_search_second_pass");
+		
+			if ((disable_quick_search == FALSE) 
+			    && (locate != NULL) 
+			    && (is_quick_search_excluded_path (look_in_folder_locale) == FALSE)) {
+			    
+					g_string_append_printf (command, "%s %s '%s*%s'", 
 							locate,
 							locate_command_default_options,
 							look_in_folder_locale,
 							file_is_named_escaped);
-				search_command.quick_mode = TRUE;
-		 	}
-			else {
+					search_command.quick_mode = TRUE;
+			}
+			else {		
 				g_string_append_printf (command, "find \"%s\" %s '%s' -xdev -print", 
 							look_in_folder_locale, 
 							find_command_default_name_option, 
 							file_is_named_escaped);
 			}
-		} 
+			g_free (locate);
+		}
 		else {
 			g_string_append_printf (command, "find \"%s\" %s '%s' -xdev -print", 
 						look_in_folder_locale, 
 						find_command_default_name_option, 
 						file_is_named_escaped);
 		}
-		g_free (locate);
-	} 
+	}
 	else {
 		GList *list;
 		gboolean disable_mount_argument = FALSE;
@@ -519,6 +520,12 @@ add_file_to_search_results (const gchar 
 	gchar *utf8_base_name, *utf8_dir_name;
 	gchar *base_name, *dir_name;
 	
+	if (g_hash_table_lookup_extended (search_command.file_hash, file, NULL, NULL) == TRUE) {
+		return;
+	}
+	
+	g_hash_table_insert (search_command.file_hash, g_strdup(file), NULL);
+	
 	mime_type = gnome_vfs_get_file_mime_type (file, NULL, FALSE);
 	 
 	description = get_file_type_for_mime_type (file, mime_type);
@@ -984,15 +991,18 @@ get_desktop_item_name (void)
 static void
 start_animation (void)
 {
-	gchar *title = NULL;
+	if (search_command.first_pass == TRUE) {
+	
+		gchar *title = NULL;
 	
-	title = g_strconcat (_("Searching..."), " - ", _("Search for Files"), NULL);
-	gtk_window_set_title (GTK_WINDOW (interface.main_window), title);
+		title = g_strconcat (_("Searching..."), " - ", _("Search for Files"), NULL);
+		gtk_window_set_title (GTK_WINDOW (interface.main_window), title);
 	
-	gtk_label_set_text (GTK_LABEL (interface.results_label), "");
-	gsearch_spinner_start (GSEARCH_SPINNER (interface.spinner));
+		gtk_label_set_text (GTK_LABEL (interface.results_label), "");
+		gsearch_spinner_start (GSEARCH_SPINNER (interface.spinner));
 	
-	g_free (title);
+		g_free (title);
+	}
 } 
 
 static void
@@ -1284,35 +1294,51 @@ handle_search_command_stdout_io (GIOChan
 	}
 
 	if (condition != G_IO_IN || broken_pipe == TRUE) { 
+
+		g_io_channel_shutdown (ioc, TRUE, NULL);
 		
 		if (search_data->running == MAKE_IT_STOP) {
 			search_data->aborted = TRUE;
 		}
 		
-		search_data->lock = FALSE;
-		search_data->running = NOT_RUNNING;
-		search_data->not_running_timeout = TRUE;
-		g_hash_table_destroy (search_data->pixbuf_hash);
-		g_timeout_add (500, not_running_timeout_cb, NULL);
-
-		update_search_counts ();
-		stop_animation ();
-
-		gtk_window_set_default (GTK_WINDOW(interface.main_window), interface.find_button);
-		gtk_widget_set_sensitive (interface.additional_constraints, TRUE);
-		gtk_widget_set_sensitive (interface.expander, TRUE);
-		gtk_widget_set_sensitive (interface.table, TRUE);
-		gtk_widget_set_sensitive (interface.find_button, TRUE);
-		gtk_widget_hide (interface.stop_button);
-		gtk_widget_show (interface.find_button);
-
-		/* Free the gchar fields of search_command structure. */
-		g_free (search_data->look_in_folder);
-		g_free (search_data->file_is_named_pattern);
-		g_free (search_data->regex_string);
-		g_free (search_data->date_format_pref);
-
-		g_io_channel_shutdown (ioc, TRUE, NULL);
+		if ((search_data->aborted == FALSE)
+		     && (search_data->quick_mode == TRUE) 
+		     && (search_data->first_pass == TRUE) 
+		     && (search_data->disable_second_pass == FALSE)
+		     && (is_second_scan_excluded_path (search_data->look_in_folder) == FALSE)) { 
+		    
+			gchar *command;
+			
+			command = build_search_command (FALSE);
+			spawn_search_command (command);
+			
+			g_free (command);
+		}
+		else {
+			search_data->lock = FALSE;
+			search_data->running = NOT_RUNNING;
+			search_data->not_running_timeout = TRUE;
+			g_hash_table_destroy (search_data->pixbuf_hash);
+			g_hash_table_destroy (search_data->file_hash);
+			g_timeout_add (500, not_running_timeout_cb, NULL); 
+
+			update_search_counts (); 
+			stop_animation ();
+
+			gtk_window_set_default (GTK_WINDOW(interface.main_window), interface.find_button);
+			gtk_widget_set_sensitive (interface.additional_constraints, TRUE);
+			gtk_widget_set_sensitive (interface.expander, TRUE);
+			gtk_widget_set_sensitive (interface.table, TRUE);
+			gtk_widget_set_sensitive (interface.find_button, TRUE);
+			gtk_widget_hide (interface.stop_button);
+			gtk_widget_show (interface.find_button); 
+
+			/* Free the gchar fields of search_command structure. */
+			g_free (search_data->look_in_folder);
+			g_free (search_data->file_is_named_pattern);
+			g_free (search_data->regex_string);
+			g_free (search_data->date_format_pref);
+		}
 		return FALSE;
 	}
 	return TRUE;
@@ -1533,26 +1559,29 @@ spawn_search_command (gchar *command)
 		return;
 	}
 	
-	search_command.lock = TRUE;
-	search_command.aborted = FALSE;
-	search_command.running = RUNNING; 
-	search_command.pixbuf_hash = g_hash_table_new (g_str_hash, g_str_equal);
-	
-	/* Get value of nautilus date_format key */
-	search_command.date_format_pref = gsearchtool_gconf_get_string ("/apps/nautilus/preferences/date_format");
-
-	gtk_window_set_default (GTK_WINDOW(interface.main_window), interface.stop_button);
-	gtk_widget_show (interface.stop_button);
-	gtk_widget_set_sensitive (interface.stop_button, TRUE);
-	gtk_widget_hide (interface.find_button);
-	gtk_widget_set_sensitive (interface.find_button, FALSE);
-	gtk_widget_set_sensitive (interface.results, TRUE);
-	gtk_widget_set_sensitive (interface.additional_constraints, FALSE);
-	gtk_widget_set_sensitive (interface.expander, FALSE);
-	gtk_widget_set_sensitive (interface.table, FALSE);
+	if (search_command.first_pass == TRUE) {
+		search_command.lock = TRUE;
+		search_command.aborted = FALSE;
+		search_command.running = RUNNING; 
+		search_command.pixbuf_hash = g_hash_table_new (g_str_hash, g_str_equal);
+		search_command.file_hash = g_hash_table_new (g_str_hash, g_str_equal);
+	
+		/* Get value of nautilus date_format key */
+		search_command.date_format_pref = gsearchtool_gconf_get_string ("/apps/nautilus/preferences/date_format");
+
+		gtk_window_set_default (GTK_WINDOW(interface.main_window), interface.stop_button);
+		gtk_widget_show (interface.stop_button);
+		gtk_widget_set_sensitive (interface.stop_button, TRUE);
+		gtk_widget_hide (interface.find_button);
+		gtk_widget_set_sensitive (interface.find_button, FALSE);
+		gtk_widget_set_sensitive (interface.results, TRUE);
+		gtk_widget_set_sensitive (interface.additional_constraints, FALSE);
+		gtk_widget_set_sensitive (interface.expander, FALSE);
+		gtk_widget_set_sensitive (interface.table, FALSE);
 
-	gtk_tree_view_scroll_to_point (GTK_TREE_VIEW(interface.tree), 0, 0);
-	gtk_list_store_clear (GTK_LIST_STORE(interface.model));
+		gtk_tree_view_scroll_to_point (GTK_TREE_VIEW(interface.tree), 0, 0);	
+		gtk_list_store_clear (GTK_LIST_STORE(interface.model));
+	}
 	
 	ioc_stdout = g_io_channel_unix_new (child_stdout);
 	ioc_stderr = g_io_channel_unix_new (child_stderr);
Index: gsearchtool-callbacks.c
===================================================================
RCS file: /cvs/gnome/gnome-utils/gsearchtool/gsearchtool-callbacks.c,v
retrieving revision 1.68
diff -u -p -r1.68 gsearchtool-callbacks.c
--- gsearchtool-callbacks.c	21 Oct 2004 23:54:33 -0000	1.68
+++ gsearchtool-callbacks.c	26 Oct 2004 05:47:01 -0000
@@ -159,7 +159,7 @@ click_find_cb (GtkWidget	*widget, 
 	gtk_widget_set_sensitive (interface.stop_button, FALSE);
 	gtk_widget_set_sensitive (interface.find_button, FALSE);
 
-	command = build_search_command ();
+	command = build_search_command (TRUE);
 	
 	if (search_command.lock == FALSE) {
 		spawn_search_command (command);
Index: gsearchtool-support.c
===================================================================
RCS file: /cvs/gnome/gnome-utils/gsearchtool/gsearchtool-support.c,v
retrieving revision 1.51
diff -u -p -r1.51 gsearchtool-support.c
--- gsearchtool-support.c	15 Oct 2004 07:15:14 -0000	1.51
+++ gsearchtool-support.c	26 Oct 2004 05:47:02 -0000
@@ -116,6 +116,27 @@ gsearchtool_gconf_get_string (const gcha
 	return result;
 }
 
+GSList * 
+gsearchtool_gconf_get_list (const gchar *key)
+{
+	GSList *result;
+	GConfClient *client;
+	GError *error = NULL;
+	
+	g_return_val_if_fail (key != NULL, FALSE);
+	
+	client = gsearchtool_gconf_client_get_global ();
+	g_return_val_if_fail (client != NULL, FALSE);
+	
+	result = gconf_client_get_list (client, key, GCONF_VALUE_STRING, &error);
+	
+	if (gsearchtool_gconf_handle_error (&error)) {
+		result = NULL;
+	}
+	
+	return result;
+}
+
 gboolean 
 gsearchtool_gconf_get_boolean (const gchar *key)
 {
@@ -275,68 +296,152 @@ is_path_hidden (const gchar *path)
 	return results;
 }
 
-gboolean 
-is_path_in_home_folder (const gchar *path)
+gboolean  	
+is_quick_search_excluded_path (const gchar *path)
 {
-	if (g_strstr_len (path, strlen (g_get_home_dir ()), g_get_home_dir ()) != NULL) {
+	GSList     *exclude_path_list;
+	GSList     *tmp_list;
+	gchar      *dir;
+	
+	dir = g_strdup (path);
+	
+	/* Remove trailing G_DIR_SEPARATOR. */
+	if ((strlen (dir) > 1) && (g_str_has_suffix (dir, G_DIR_SEPARATOR_S) == TRUE)) {
+		dir[strlen (dir) - 1] = '\0'; 
+	}
+	
+	/* Always exclude a path that is symbolic link. */
+	if (g_file_test (dir, G_FILE_TEST_IS_SYMLINK)) {
+		g_free (dir);
+		
 		return TRUE;
 	}
-
-	/* See bugzilla report #137404 */
-	if (g_file_test (g_get_home_dir(), G_FILE_TEST_IS_SYMLINK)) {
-
-		GnomeVFSResult res;
-		gchar *uri;
+	g_free (dir);
 	
-		res = uri_resolve_all_symlinks (g_get_home_dir (), &uri);
+	/* Check path against the Quick-Search-Excluded-Paths list. */
+	exclude_path_list = gsearchtool_gconf_get_list ("/apps/gnome-search-tool/quick_search_excluded_paths");
 
-		if (res == GNOME_VFS_OK) {
+	for (tmp_list = exclude_path_list; tmp_list; tmp_list = tmp_list->next) {
 	
-			gchar *target;
-			gboolean value;
+		gchar *dir;
 		
-			target = (gchar *) gnome_vfs_get_local_path_from_uri (uri);
-			value = (g_strstr_len (path, strlen (target), target) != NULL);
+		dir = g_strdup (tmp_list->data);
 		
-			g_free (target);
-			g_free (uri);
+		/* Skip empty or null values. */
+		if ((dir == NULL) || (strlen (dir) == 0)) {
+			continue;
+		}
+			
+		/* Wild-card comparisons. */		
+		if (g_strstr_len (dir, strlen (dir), "*") != NULL) { 
 		
-			return value;
+			if (g_pattern_match_simple (dir, path) == TRUE) {
+
+				g_slist_free (exclude_path_list);
+				g_free (dir);			
+
+				return TRUE;
+			}
+		} 
+		/* Non-wild-card comparisons. */
+		else {
+			/* Add a trailing G_DIR_SEPARATOR. */
+			if (g_str_has_suffix (dir, G_DIR_SEPARATOR_S) == FALSE) {
+			 
+				gchar *tmp;
+			
+				tmp = dir;
+				dir = g_strconcat (dir, G_DIR_SEPARATOR_S, NULL);
+				g_free (tmp);
+			}
+			
+			if (strcmp (path, dir) == 0) {
+				
+				g_slist_free (exclude_path_list);
+				g_free (dir);
+				
+				return TRUE;
+			}
 		}
-		g_free (uri);
-	}		
+		g_free (dir);
+	}
+	g_slist_free (exclude_path_list);
+	
 	return FALSE;
 }
 
-gboolean 
-is_path_in_mount_folder (const gchar *path)
-{
-	return ((g_strstr_len (path, strlen ("/mnt/"), "/mnt/") != NULL) ||
-	        (g_strstr_len (path, strlen ("/media/"), "/media/") != NULL));
-}
-
-gboolean 
-is_path_in_proc_folder (const gchar *path)
+gboolean  	
+is_second_scan_excluded_path (const gchar *path)
 {
-	return (g_strstr_len (path, strlen ("/proc/"), "/proc/") != NULL);
-}
+	GSList     *exclude_path_list;
+	GSList     *tmp_list;
+	gchar      *dir;
+	
+	dir = g_strdup (path);
+	
+	/* Remove trailing G_DIR_SEPARATOR. */
+	if ((strlen (dir) > 1) && (g_str_has_suffix (dir, G_DIR_SEPARATOR_S) == TRUE)) {
+		dir[strlen (dir) - 1] = '\0'; 
+	}
+	
+	/* Always exclude a path that is symbolic link. */
+	if (g_file_test (dir, G_FILE_TEST_IS_SYMLINK)) {
+		g_free (dir);
+		
+		return TRUE;
+	}
+	g_free (dir);
+	
+	/* Check path against the Quick-Search-Excluded-Paths list. */
+	exclude_path_list = gsearchtool_gconf_get_list ("/apps/gnome-search-tool/quick_search_second_scan_excluded_paths");
 
-gboolean 
-is_path_in_dev_folder (const gchar *path)
-{
-	return (g_strstr_len (path, strlen ("/dev/"), "/dev/") != NULL);
-}
+	for (tmp_list = exclude_path_list; tmp_list; tmp_list = tmp_list->next) {
+	
+		gchar *dir;
+		
+		dir = g_strdup (tmp_list->data);
+		
+		/* Skip empty or null values. */
+		if ((dir == NULL) || (strlen (dir) == 0)) {
+			continue;
+		}
+			
+		/* Wild-card comparisons. */		
+		if (g_strstr_len (dir, strlen (dir), "*") != NULL) { 
+		
+			if (g_pattern_match_simple (dir, path) == TRUE) {
 
-gboolean 
-is_path_in_var_folder (const gchar *path)
-{
-	return (g_strstr_len (path, strlen ("/var/"), "/var/") != NULL);
-}
+				g_slist_free (exclude_path_list);
+				g_free (dir);			
 
-gboolean 
-is_path_in_tmp_folder (const gchar *path)
-{
-	return (g_strstr_len (path, strlen ("/tmp/"), "/tmp/") != NULL);
+				return TRUE;
+			}
+		} 
+		/* Non-wild-card comparisons. */
+		else {
+			/* Add a trailing G_DIR_SEPARATOR. */
+			if (g_str_has_suffix (dir, G_DIR_SEPARATOR_S) == FALSE) {
+			 
+				gchar *tmp;
+			
+				tmp = dir;
+				dir = g_strconcat (dir, G_DIR_SEPARATOR_S, NULL);
+				g_free (tmp);
+			}
+			
+			if (strcmp (path, dir) == 0) {
+				
+				g_slist_free (exclude_path_list);
+				g_free (dir);
+				
+				return TRUE;
+			}
+		}
+		g_free (dir);
+	}
+	g_slist_free (exclude_path_list);
+	
+	return FALSE;
 }
 
 gboolean
@@ -870,7 +975,7 @@ gsearchtool_unique_filename (const gchar
 					    suffix);
 
 		g_free (retval);
-		retval = g_strconcat (dir, "/", filename, NULL);
+		retval = g_strconcat (dir, G_DIR_SEPARATOR_S, filename, NULL);
 		exists = g_file_test (retval, G_FILE_TEST_EXISTS);
 		g_free (filename);
 	}
Index: gnome-search-tool.schemas
===================================================================
RCS file: /cvs/gnome/gnome-utils/gsearchtool/gnome-search-tool.schemas,v
retrieving revision 1.5
diff -u -p -r1.5 gnome-search-tool.schemas
--- gnome-search-tool.schemas	31 Jul 2004 08:00:12 -0000	1.5
+++ gnome-search-tool.schemas	26 Oct 2004 05:47:03 -0000
@@ -240,19 +240,50 @@ To change the gconftool target use the -
       </locale>
     </schema>
     <schema>
-      <applyto>/apps/gnome-search-tool/force_quick_search</applyto>
-      <key>/schemas/apps/gnome-search-tool/force_quick_search</key>
+      <applyto>/apps/gnome-search-tool/quick_search_excluded_paths</applyto>
+      <key>/schemas/apps/gnome-search-tool/quick_search_excluded_paths</key>
+      <owner>gnome-search-tool</owner>
+      <type>list</type>
+      <list_type>string</list_type>
+      <default>[/mnt/*,/media/*,/dev/*,/tmp/*,/proc/*,/var/*]</default>
+      <locale name="C">
+        <short>Quick Search Excluded Paths</short>
+        <long>
+	  This key defines the paths the search tool will exclude from a 
+	  quick search.  The wildcards '*' and '?' are supported.  The default 
+	  values are /mnt/*, /media/*, /dev/*, /tmp/*, /proc/*, and /var/*.
+        </long>
+      </locale>
+    </schema>
+    <schema>
+      <applyto>/apps/gnome-search-tool/disable_quick_search_second_scan</applyto>
+      <key>/schemas/apps/gnome-search-tool/disable_quick_search_second_scan</key>
       <owner>gnome-search-tool</owner>
       <type>bool</type>
       <default>FALSE</default>
       <locale name="C">
-        <short>Always Use Quick Search for Simple Searches</short>
+        <short>Disable Quick Search Second Scan</short>
+        <long>
+          This key determines if the search tool disables the use of the 
+          find command after performing a quick search.
+        </long>
+      </locale>
+    </schema>
+    <schema>
+      <applyto>/apps/gnome-search-tool/quick_search_second_scan_excluded_paths</applyto>
+      <key>/schemas/apps/gnome-search-tool/quick_search_second_scan_excluded_paths</key>
+      <owner>gnome-search-tool</owner>
+      <type>list</type>
+      <list_type>string</list_type>
+      <default>[/]</default>
+      <locale name="C">
+        <short>Quick Search Second Scan Excluded Paths</short>
         <long>
-	  This key determines if the search tool uses the locate command for 
-	  all simple file name searches.  By default, the search tool uses 
-	  the find command when searching /mnt, /proc, /dev, /var, /tmp, or 
-	  a user's home folder.  This feature is unavailable if 
-	  disable_quick_search is enabled.
+	  This key defines the paths the search tool will exclude from a 
+	  second scan when performing a quick search.  The second scan
+	  uses the find command to search for files.  The purpose of the 
+	  second scan is to find files that have not been indexed.  
+	  The wildcards '*' and '?' are supported.  The default value is /.
         </long>
       </locale>
     </schema>
