aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2008-04-10 09:16:25 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2008-04-10 09:16:25 +0000
commit034053fcdff288dfe0e05f4d0046578d990338bc (patch)
tree824431251a9ed7abc19fc3642ea13e2146b1c860 /src
parent8ad18e775be48cb52a6b182b88a831255793f465 (diff)
added 'Edit/Quick search' menu. Also search To: header in Sent/Draft/Queue folders.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1975 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.c12
-rw-r--r--src/quick_search.c5
2 files changed, 17 insertions, 0 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 893edef4..6540e321 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -566,6 +566,7 @@ static GtkItemFactoryEntry mainwin_entries[] =
{N_("/_Edit/_Find in current message..."),
"<control>F", search_cb, 0, NULL},
{N_("/_Edit/_Search messages..."), "<shift><control>F", search_cb, 1, NULL},
+ {N_("/_Edit/_Quick search"), "<shift><control>S", search_cb, 2, NULL},
{N_("/_View"), NULL, NULL, 0, "<Branch>"},
{N_("/_View/Show or hi_de"), NULL, NULL, 0, "<Branch>"},
@@ -3306,6 +3307,17 @@ static void search_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
prefs_search_folder_open(item);
else
query_search(item);
+ } else if (action == 2) {
+ if (!prefs_common.show_searchbar) {
+ GtkWidget *menuitem;
+
+ menuitem = gtk_item_factory_get_item
+ (mainwin->menu_factory,
+ "/View/Show or hide/Search bar");
+ gtk_check_menu_item_set_active
+ (GTK_CHECK_MENU_ITEM(menuitem), TRUE);
+ }
+ gtk_widget_grab_focus(mainwin->summaryview->qsearch->entry);
} else
message_search(mainwin->messageview);
}
diff --git a/src/quick_search.c b/src/quick_search.c
index 28f69795..484d0d29 100644
--- a/src/quick_search.c
+++ b/src/quick_search.c
@@ -220,6 +220,11 @@ GSList *quick_search_filter(QuickSearch *qsearch, QSearchCondType type,
cond = filter_cond_new(FLT_COND_HEADER, FLT_CONTAIN, 0,
"From", key);
cond_list = g_slist_append(cond_list, cond);
+ if (FOLDER_ITEM_IS_SENT_FOLDER(summaryview->folder_item)) {
+ cond = filter_cond_new(FLT_COND_TO_OR_CC, FLT_CONTAIN,
+ 0, NULL, key);
+ cond_list = g_slist_append(cond_list, cond);
+ }
rule = filter_rule_new("Quick search rule", FLT_OR, cond_list,
NULL);
}