diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-05-06 04:27:55 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-05-06 04:27:55 +0800 |
commit | 8b4ba053eb05318b6a85c72232602ef5fba49dd8 (patch) | |
tree | 5987b372db2a1d0de462336a1198203f89cee87a /mail | |
parent | 60a9d81314d2d74f385ac2e3d6060bcb4df5af25 (diff) | |
download | gsoc2013-evolution-8b4ba053eb05318b6a85c72232602ef5fba49dd8.tar.gz gsoc2013-evolution-8b4ba053eb05318b6a85c72232602ef5fba49dd8.tar.zst gsoc2013-evolution-8b4ba053eb05318b6a85c72232602ef5fba49dd8.zip |
Removed. (rule_from_message): Removed the AUTO_THREAD bit.
2004-05-05 Jeffrey Stedfast <fejj@ximian.com>
* mail-autofilter.c (rule_match_thread): Removed.
(rule_from_message): Removed the AUTO_THREAD bit.
* em-folder-view.c: Removed vFolder/Filter on Thread. These were
both broken.
(struct _filter_data): Removed a bunch of data members since most
of them weren't used.
svn path=/trunk/; revision=25810
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 10 | ||||
-rw-r--r-- | mail/em-folder-view.c | 23 | ||||
-rw-r--r-- | mail/mail-autofilter.c | 46 | ||||
-rw-r--r-- | mail/mail-autofilter.h | 1 |
4 files changed, 11 insertions, 69 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 092ba21eae..3ebda567f7 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,13 @@ +2004-05-05 Jeffrey Stedfast <fejj@ximian.com> + + * mail-autofilter.c (rule_match_thread): Removed. + (rule_from_message): Removed the AUTO_THREAD bit. + + * em-folder-view.c: Removed vFolder/Filter on Thread. These were + both broken. + (struct _filter_data): Removed a bunch of data members since most + of them weren't used. + 2004-05-05 Not Zed <NotZed@Ximian.com> ** See bug #57720. diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index dd4311ab8a..10e8be6600 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -862,13 +862,11 @@ 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 */ @@ -924,8 +922,6 @@ 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_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 }, @@ -933,8 +929,6 @@ static EMPopupItem emfv_popup_menu[] = { { 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 }, }; static void @@ -1312,24 +1306,15 @@ emfv_text_zoom_reset(BonoboUIComponent *uic, void *data, const char *path) /* ********************************************************************** */ struct _filter_data { - CamelFolder *folder; const char *source; - char *uid; - int type; char *uri; - char *mlist; - char *references; + int type; }; static void filter_data_free (struct _filter_data *fdata) { - g_free (fdata->uid); g_free (fdata->uri); - if (fdata->folder) - camel_object_unref (fdata->folder); - g_free (fdata->mlist); - g_free (fdata->references); g_free (fdata); } @@ -1380,7 +1365,6 @@ 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) @@ -1422,7 +1406,6 @@ 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) /* ********************************************************************** */ @@ -1489,12 +1472,10 @@ 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 */ @@ -1597,12 +1578,10 @@ static const EMFolderViewEnable emfv_enable_map[] = { { "ToolsFilterRecipient", EM_POPUP_SELECT_ONE }, { "ToolsFilterSender", 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 }, diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c index 71443f431c..469c7ce55b 100644 --- a/mail/mail-autofilter.c +++ b/mail/mail-autofilter.c @@ -223,28 +223,6 @@ rule_match_mlist(RuleContext *context, FilterRule *rule, const char *mlist) } static void -rule_match_thread (RuleContext *context, FilterRule *rule, const char *msgid) -{ - FilterElement *element; - FilterPart *part; - - if (msgid[0] == 0) - return; - - part = rule_context_create_part (context, "header"); - filter_rule_add_part (rule, part); - - element = filter_part_find_element (part, "header-type"); - filter_option_set_current ((FilterOption *) element, "contains"); - - element = filter_part_find_element (part, "header-field"); - filter_input_set_value ((FilterInput *) element, "References"); - - element = filter_part_find_element (part, "word"); - filter_input_set_value ((FilterInput *) element, msgid); -} - -static void rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg, int flags) { CamelInternetAddress *addr; @@ -296,30 +274,6 @@ rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg } g_free(mlist); } - if (flags & AUTO_THREAD) { - const char *msgid = NULL, *refs = NULL; - char *name; - - if (!(refs = camel_medium_get_header ((CamelMedium *) msg, "References"))) { - if (!(refs = camel_medium_get_header ((CamelMedium *) msg, "In-Reply-To"))) - msgid = camel_mime_message_get_message_id (msg); - } - - if (refs || msgid) { - struct _camel_header_references *r = NULL; - - if (refs) { - r = camel_header_references_decode (refs); - msgid = r->id; - } - - rule_match_thread (context, rule, msgid); - name = g_strdup_printf (_("Replies to %s"), msgid); - - if (r) - camel_header_references_list_clear (&r); - } - } } FilterRule * diff --git a/mail/mail-autofilter.h b/mail/mail-autofilter.h index a5c2575338..45f9d15863 100644 --- a/mail/mail-autofilter.h +++ b/mail/mail-autofilter.h @@ -35,7 +35,6 @@ enum { AUTO_FROM = 2, AUTO_TO = 4, AUTO_MLIST = 8, - AUTO_THREAD = 16, }; FilterRule *vfolder_rule_from_message(VfolderContext *context, CamelMimeMessage *msg, int flags, const char *source); |