aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-view.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-11-01 14:01:55 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-11-01 14:01:55 +0800
commit2b8a138befe06bfeee85f8b1ccb153013b4f54f6 (patch)
tree2e332a4e6f4d0bae71fd627fa05a9980cfc847d9 /mail/em-folder-view.c
parent2dfb2624476858863b56106b394cdc8c3b08dfe3 (diff)
downloadgsoc2013-evolution-2b8a138befe06bfeee85f8b1ccb153013b4f54f6.tar.gz
gsoc2013-evolution-2b8a138befe06bfeee85f8b1ccb153013b4f54f6.tar.zst
gsoc2013-evolution-2b8a138befe06bfeee85f8b1ccb153013b4f54f6.zip
setup filter-on-thread and vfolder-on-thread.
2003-11-01 Jeffrey Stedfast <fejj@ximian.com> * em-folder-view.c: setup filter-on-thread and vfolder-on-thread. * mail-autofilter.c (rule_from_message): handle AUTO_THREAD (rule_match_thread): new function to setup a filter on a msgid svn path=/trunk/; revision=23158
Diffstat (limited to 'mail/em-folder-view.c')
-rw-r--r--mail/em-folder-view.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index 94022c22b1..da015f976e 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -644,11 +644,13 @@ EMFV_POPUP_AUTO_TYPE(vfolder_type_current, emfv_popup_vfolder_subject, AUTO_SUBJ
EMFV_POPUP_AUTO_TYPE(vfolder_type_current, emfv_popup_vfolder_sender, AUTO_FROM)
EMFV_POPUP_AUTO_TYPE(vfolder_type_current, emfv_popup_vfolder_recipients, AUTO_TO)
EMFV_POPUP_AUTO_TYPE(vfolder_type_current, emfv_popup_vfolder_mlist, AUTO_MLIST)
+EMFV_POPUP_AUTO_TYPE(vfolder_type_current, emfv_popup_vfolder_thread, AUTO_THREAD)
EMFV_POPUP_AUTO_TYPE(filter_type_current, emfv_popup_filter_subject, AUTO_SUBJECT)
EMFV_POPUP_AUTO_TYPE(filter_type_current, emfv_popup_filter_sender, AUTO_FROM)
EMFV_POPUP_AUTO_TYPE(filter_type_current, emfv_popup_filter_recipients, AUTO_TO)
EMFV_POPUP_AUTO_TYPE(filter_type_current, emfv_popup_filter_mlist, AUTO_MLIST)
+EMFV_POPUP_AUTO_TYPE(filter_type_current, emfv_popup_filter_thread, AUTO_THREAD)
/* TODO: Move some of these to be 'standard' menu's */
@@ -701,13 +703,17 @@ static EMPopupItem emfv_popup_menu[] = {
{ EM_POPUP_ITEM, "90.filter.00/00.02", N_("VFolder on _Recipients"), G_CALLBACK(emfv_popup_vfolder_recipients), NULL, NULL, EM_POPUP_SELECT_ONE },
{ EM_POPUP_ITEM, "90.filter.00/00.03", N_("VFolder on Mailing _List"),
G_CALLBACK(emfv_popup_vfolder_mlist), NULL, NULL, EM_POPUP_SELECT_ONE|EM_POPUP_SELECT_MAILING_LIST },
-
+ { EM_POPUP_ITEM, "90.filter.00/00.04", N_("VFolder on Thread"),
+ G_CALLBACK(emfv_popup_vfolder_thread), NULL, NULL, EM_POPUP_SELECT_ONE|EM_POPUP_SELECT_THREAD },
+
{ EM_POPUP_BAR, "90.filter.00/10", NULL, NULL, NULL, NULL, EM_POPUP_SELECT_ONE },
{ EM_POPUP_ITEM, "90.filter.00/10.00", N_("Filter on Sub_ject"), G_CALLBACK(emfv_popup_filter_subject), NULL, NULL, EM_POPUP_SELECT_ONE },
{ EM_POPUP_ITEM, "90.filter.00/10.01", N_("Filter on Sen_der"), G_CALLBACK(emfv_popup_filter_sender), NULL, NULL, EM_POPUP_SELECT_ONE },
{ EM_POPUP_ITEM, "90.filter.00/10.02", N_("Filter on Re_cipients"), G_CALLBACK(emfv_popup_filter_recipients), NULL, NULL, EM_POPUP_SELECT_ONE },
{ EM_POPUP_ITEM, "90.filter.00/10.03", N_("Filter on _Mailing List"),
G_CALLBACK(emfv_popup_filter_mlist), NULL, NULL, EM_POPUP_SELECT_ONE|EM_POPUP_SELECT_MAILING_LIST },
+ { EM_POPUP_ITEM, "90.filter.00/10.04", N_("Filter on Thread"),
+ G_CALLBACK(emfv_popup_filter_thread), NULL, NULL, EM_POPUP_SELECT_ONE|EM_POPUP_SELECT_THREAD },
};
static void
@@ -1096,6 +1102,7 @@ struct _filter_data {
int type;
char *uri;
char *mlist;
+ char *references;
};
static void
@@ -1106,6 +1113,7 @@ filter_data_free (struct _filter_data *fdata)
if (fdata->folder)
camel_object_unref (fdata->folder);
g_free (fdata->mlist);
+ g_free (fdata->references);
g_free (fdata);
}
@@ -1156,6 +1164,7 @@ EMFV_MAP_CALLBACK(emfv_tools_filter_subject, emfv_popup_filter_subject)
EMFV_MAP_CALLBACK(emfv_tools_filter_sender, emfv_popup_filter_sender)
EMFV_MAP_CALLBACK(emfv_tools_filter_recipient, emfv_popup_filter_recipients)
EMFV_MAP_CALLBACK(emfv_tools_filter_mlist, emfv_popup_filter_mlist)
+EMFV_MAP_CALLBACK(emfv_tools_filter_thread, emfv_popup_filter_thread)
static void
vfolder_type_got_message (CamelFolder *folder, const char *uid, CamelMimeMessage *msg, void *user_data)
@@ -1197,6 +1206,7 @@ EMFV_MAP_CALLBACK(emfv_tools_vfolder_subject, emfv_popup_vfolder_subject)
EMFV_MAP_CALLBACK(emfv_tools_vfolder_sender, emfv_popup_vfolder_sender)
EMFV_MAP_CALLBACK(emfv_tools_vfolder_recipient, emfv_popup_vfolder_recipients)
EMFV_MAP_CALLBACK(emfv_tools_vfolder_mlist, emfv_popup_vfolder_mlist)
+EMFV_MAP_CALLBACK(emfv_tools_vfolder_thread, emfv_popup_vfolder_thread)
/* ********************************************************************** */
@@ -1260,10 +1270,12 @@ static BonoboUIVerb emfv_message_verbs[] = {
BONOBO_UI_UNSAFE_VERB ("ToolsFilterRecipient", emfv_tools_filter_recipient),
BONOBO_UI_UNSAFE_VERB ("ToolsFilterSender", emfv_tools_filter_sender),
BONOBO_UI_UNSAFE_VERB ("ToolsFilterSubject", emfv_tools_filter_subject),
+ BONOBO_UI_UNSAFE_VERB ("ToolsFilterThread", emfv_tools_filter_thread),
BONOBO_UI_UNSAFE_VERB ("ToolsVFolderMailingList", emfv_tools_vfolder_mlist),
BONOBO_UI_UNSAFE_VERB ("ToolsVFolderRecipient", emfv_tools_vfolder_recipient),
BONOBO_UI_UNSAFE_VERB ("ToolsVFolderSender", emfv_tools_vfolder_sender),
BONOBO_UI_UNSAFE_VERB ("ToolsVFolderSubject", emfv_tools_vfolder_subject),
+ BONOBO_UI_UNSAFE_VERB ("ToolsVFolderThread", emfv_tools_vfolder_thread),
BONOBO_UI_UNSAFE_VERB ("ViewLoadImages", emfv_view_load_images),
/* ViewHeaders stuff is a radio */
@@ -1357,11 +1369,13 @@ static const EMFolderViewEnable emfv_enable_map[] = {
{ "ToolsFilterMailingList", EM_POPUP_SELECT_ONE },
{ "ToolsFilterRecipient", EM_POPUP_SELECT_ONE },
{ "ToolsFilterSender", EM_POPUP_SELECT_ONE },
- { "ToolsFilterSubject", EM_POPUP_SELECT_ONE },
+ { "ToolsFilterSubject", EM_POPUP_SELECT_ONE },
+ { "ToolsFilterThread", EM_POPUP_SELECT_ONE },
{ "ToolsVFolderMailingList", EM_POPUP_SELECT_ONE },
{ "ToolsVFolderRecipient", EM_POPUP_SELECT_ONE },
{ "ToolsVFolderSender", EM_POPUP_SELECT_ONE },
{ "ToolsVFolderSubject", EM_POPUP_SELECT_ONE },
+ { "ToolsVFolderThread", EM_POPUP_SELECT_ONE },
{ "ViewLoadImages", EM_POPUP_SELECT_ONE },