diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-25 08:25:41 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-25 08:25:41 +0000 |
commit | 88fe3b7e37244b83076c243741e2c71338d37360 (patch) | |
tree | 375da95ed456ed7e4487222905047e9b0de07922 /src/summary_search.c | |
parent | 34a24148d4315d15e092760c983ff45115a32e00 (diff) |
exclude trash on recursive search.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@928 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/summary_search.c')
-rw-r--r-- | src/summary_search.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/summary_search.c b/src/summary_search.c index c21407c5..c2cc33aa 100644 --- a/src/summary_search.c +++ b/src/summary_search.c @@ -1,6 +1,6 @@ /* * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 1999-2005 Hiroyuki Yamamoto + * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -103,6 +103,8 @@ static struct SummarySearchWindow { FilterRule *rule; gboolean requires_full_headers; + gboolean exclude_trash; + gboolean on_search; gboolean cancelled; } search_window; @@ -481,6 +483,14 @@ static void summary_search_query(void) search_window.requires_full_headers = filter_rule_requires_full_headers(search_window.rule); + if (search_window.rule->recursive) { + if (item->stype == F_TRASH) + search_window.exclude_trash = FALSE; + else + search_window.exclude_trash = TRUE; + } else + search_window.exclude_trash = FALSE; + search_window.cancelled = FALSE; gtk_button_set_label(GTK_BUTTON(search_window.search_btn), @@ -496,6 +506,7 @@ static void summary_search_query(void) filter_rule_free(search_window.rule); search_window.rule = NULL; search_window.requires_full_headers = FALSE; + search_window.exclude_trash = FALSE; gtk_button_set_label(GTK_BUTTON(search_window.search_btn), GTK_STOCK_FIND); @@ -600,6 +611,8 @@ static gboolean summary_search_recursive_func(GNode *node, gpointer data) if (!item->path) return FALSE; + if (search_window.exclude_trash && item->stype == F_TRASH) + return FALSE; summary_search_folder(item); |