summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRebecca Schulman <rebecka@eazel.com>2000-12-06 00:59:41 +0000
committerRebecca Schulman <rebecka@src.gnome.org>2000-12-06 00:59:41 +0000
commitfda762d74b19b0db8e19550a665d81ba19ffc0e2 (patch)
tree874124a5b85d6347fc9b4f53ef5bcea7763322dc /src
parent69cd9a437d4d86f32bfa429308ed909cf72ead1e (diff)
downloadnautilus-fda762d74b19b0db8e19550a665d81ba19ffc0e2.tar.gz
reviewed by: Darin Adler <darin@eazel.com>
2000-12-05 Rebecca Schulman <rebecka@eazel.com> reviewed by: Darin Adler <darin@eazel.com> * src/file-manager/fm-search-list-view.c: (load_error_callback): Added an error callback for search uris that produce error GNOME_VFS_ERROR_TOO_BIG, which happens when a search matches every criterion in the database. * src/nautilus-search-bar-criterion.c: (get_owner_location_for): Fixed an "is not" in a search uri that should have been "is_not" so that searches did not produce an error.
Diffstat (limited to 'src')
-rw-r--r--src/file-manager/fm-search-list-view.c20
-rw-r--r--src/nautilus-search-bar-criterion.c2
2 files changed, 17 insertions, 5 deletions
diff --git a/src/file-manager/fm-search-list-view.c b/src/file-manager/fm-search-list-view.c
index 33dfc4cb0..904f684fd 100644
--- a/src/file-manager/fm-search-list-view.c
+++ b/src/file-manager/fm-search-list-view.c
@@ -123,7 +123,9 @@ load_error_callback (FMDirectoryView *nautilus_view,
GnomeDialog *load_error_dialog;
char *generic_error_string;
- if (result == GNOME_VFS_ERROR_SERVICE_OBSOLETE) {
+
+ switch (result) {
+ case GNOME_VFS_ERROR_SERVICE_OBSOLETE:
/* FIXME: Shoudl be two messages, one for each of whether
"slow complete search" turned on or not */
load_error_dialog = nautilus_yes_no_dialog (_("The search you have selected "
@@ -140,9 +142,19 @@ load_error_callback (FMDirectoryView *nautilus_view,
"clicked",
nautilus_indexing_info_request_reindex,
NULL);
-
- }
- else {
+ break;
+ case GNOME_VFS_ERROR_TOO_BIG:
+ generic_error_string = g_strdup_printf (_("Every indexed file on your computer "
+ "matches the criteria you selected. "
+ "You can check the spelling on your selections "
+ "or add more criteria to narrow your results."),
+ NULL);
+ load_error_dialog = nautilus_error_dialog (generic_error_string,
+ "Error during directory load",
+ NULL);
+ break;
+
+ default:
generic_error_string = g_strdup_printf (_("An error occurred while loading "
"this search's contents: "
"%s"),
diff --git a/src/nautilus-search-bar-criterion.c b/src/nautilus-search-bar-criterion.c
index f0b752808..88c0422ef 100644
--- a/src/nautilus-search-bar-criterion.c
+++ b/src/nautilus-search-bar-criterion.c
@@ -958,7 +958,7 @@ static char *
get_owner_location_for (int relation_number,
char *owner_text)
{
- const char *possible_relations[] = { "is", "is not" };
+ const char *possible_relations[] = { "is", "is_not" };
g_assert (relation_number == 0 || relation_number == 1);
return g_strdup_printf ("%s %s %s",
NAUTILUS_SEARCH_URI_TEXT_OWNER,