diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-09-12 22:30:49 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-09-12 22:30:49 +0800 |
commit | 395a311fe36286101e2d82c13d2ad1227df3e8bb (patch) | |
tree | 882c8e6cce944212f2117baa118d4a15b56f4994 /mail/message-list.c | |
parent | 64b4dcdffa1ae23a39b92fa71520269777fdc451 (diff) | |
download | gsoc2013-evolution-395a311fe36286101e2d82c13d2ad1227df3e8bb.tar.gz gsoc2013-evolution-395a311fe36286101e2d82c13d2ad1227df3e8bb.tar.zst gsoc2013-evolution-395a311fe36286101e2d82c13d2ad1227df3e8bb.zip |
Cool Hack of the Day: right-click menu item to autodetect what mailing
list a message comes from and create the rule for it on the fly.
(Many thanks to Joakim for suggesting the way to implement this.)
Also, use the new shiny toolbar icons from TigerT and mark some
strings for translation.
svn path=/trunk/; revision=5362
Diffstat (limited to 'mail/message-list.c')
-rw-r--r-- | mail/message-list.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mail/message-list.c b/mail/message-list.c index 65f035fe5b..110f96912e 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -18,16 +18,20 @@ #include <e-util/e-popup-menu.h> #include <camel/camel-exception.h> #include <camel/camel-folder.h> + #include "message-list.h" #include "message-thread.h" #include "mail-threads.h" #include "mail-tools.h" +#include "mail-mlist-magic.h" #include "mail-ops.h" #include "mail-config.h" #include "mail-vfolder.h" #include "mail-autofilter.h" #include "mail.h" + #include "Mail.h" + #include "widgets/e-table/e-table-header-item.h" #include "widgets/e-table/e-table-item.h" @@ -1204,6 +1208,25 @@ filter_recipient(GtkWidget *w, FolderBrowser *fb) filter_gui_add_from_message(fb->mail_display->current_message, AUTO_TO); } +void +filter_mlist (GtkWidget *w, FolderBrowser *fb) +{ + char *name; + char *header_value; + const char *header_name; + + name = mail_mlist_magic_detect_list (fb->mail_display->current_message, &header_name, &header_value); + if (name == NULL) { + g_print ("No fucking mlist!\n"); + return; + } + + filter_gui_add_for_mailing_list (fb->mail_display->current_message, name, header_name, header_value); + + g_free (name); + g_free (header_value); +} + static gint on_right_click (ETableScrolled *table, gint row, gint col, GdkEvent *event, MessageList *list) { @@ -1230,6 +1253,7 @@ on_right_click (ETableScrolled *table, gint row, gint col, GdkEvent *event, Mess { "Filter on Subject", NULL, GTK_SIGNAL_FUNC (filter_subject), 2 }, { "Filter on Sender", NULL, GTK_SIGNAL_FUNC (filter_sender), 2 }, { "Filter on Recipients", NULL, GTK_SIGNAL_FUNC (filter_recipient), 2 }, + { "Filter on Mailing List", NULL, GTK_SIGNAL_FUNC (filter_mlist), 2 }, { NULL, NULL, NULL, 0 } }; |