aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-09-12 23:22:31 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-09-12 23:22:31 +0800
commit5994bc5006075c88b81f378ed858fdc7ac00f8bc (patch)
treee24789c067c2f5d168cd041385a4d990aee69686 /mail
parent497e2144ace593643f64eb4dfd48f691d205521b (diff)
downloadgsoc2013-evolution-5994bc5006075c88b81f378ed858fdc7ac00f8bc.tar.gz
gsoc2013-evolution-5994bc5006075c88b81f378ed858fdc7ac00f8bc.tar.zst
gsoc2013-evolution-5994bc5006075c88b81f378ed858fdc7ac00f8bc.zip
For additional coolness, display the name of the mailing list in the
right-click menu. Also, make the action box appear in the filter dialog and fix a stupid cut & paste bug that prevented the code from checking for the right headers. svn path=/trunk/; revision=5365
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog14
-rw-r--r--mail/mail-autofilter.c2
-rw-r--r--mail/mail-mlist-magic.c2
-rw-r--r--mail/message-list.c23
4 files changed, 34 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 78e597b38a..4902063e88 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,18 @@
2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
+ * message-list.c (on_right_click): Also display the name of the
+ mailing list in the "Filter on Mailing List" item for additional
+ Coolness factor.
+
+ * mail-autofilter.c (filter_gui_add_for_mailing_list): Create the
+ rule with `filter_filter_new()' so that it also has an action
+ part.
+
+ * mail-mlist-magic.c (get_header): Use the right header name to
+ retrieve the header.
+
+2000-09-12 Ettore Perazzoli <ettore@helixcode.com>
+
* message-list.c (on_right_click): Grey out the mailing list
filter item if `mail_mlist_magic_detect_list()' returns NULL on
this message [i.e., if we cannot figure out a mailing list for
@@ -12,6 +25,7 @@
(check_delivered_to): Likewise.
(check_x_mailing_list): Likewise.
(check_x_loop): Likewise.
+ (get_header): Use the right header name to retrieve the header.
* message-list.c (on_right_click): Mark strings for translation.
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
index 2b46f4288e..e7c9f8997c 100644
--- a/mail/mail-autofilter.c
+++ b/mail/mail-autofilter.c
@@ -311,7 +311,7 @@ filter_gui_add_for_mailing_list (CamelMimeMessage *msg,
systemrules = g_strdup_printf("%s/evolution/filtertypes.xml", EVOLUTION_DATADIR);
rule_context_load((RuleContext *)fc, systemrules, userrules, NULL, NULL);
- rule = filter_rule_new ();
+ rule = (FilterRule *) filter_filter_new ();
part = rule_context_create_part((RuleContext *)fc, "header");
filter_rule_add_part((FilterRule *)rule, part);
diff --git a/mail/mail-mlist-magic.c b/mail/mail-mlist-magic.c
index 10104db4d0..d02638572e 100644
--- a/mail/mail-mlist-magic.c
+++ b/mail/mail-mlist-magic.c
@@ -81,7 +81,7 @@ get_header (CamelMimeMessage *message,
{
const char *value;
- value = camel_medium_get_header (CAMEL_MEDIUM (message), "Sender");
+ value = camel_medium_get_header (CAMEL_MEDIUM (message), header_name);
if (value == NULL)
return NULL;
diff --git a/mail/message-list.c b/mail/message-list.c
index 305dfc664b..414e419c6e 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -1254,22 +1254,35 @@ on_right_click (ETableScrolled *table, gint row, gint col, GdkEvent *event, Mess
{ _("Filter on Mailing List"), NULL, GTK_SIGNAL_FUNC (filter_mlist), 6 },
{ NULL, NULL, NULL, 0 }
};
+ int last_item;
+ char *mailing_list_name;
+
+ /* Evil Hack. */
+
+ last_item = (sizeof (menu) / sizeof (*menu)) - 2;
if (fb->folder != drafts_folder)
enable_mask |= 1;
if (fb->mail_display->current_message == NULL) {
- enable_mask |= 6;
+ enable_mask |= 2;
+ mailing_list_name = NULL;
} else {
- char *mailing_list_name;
-
mailing_list_name = mail_mlist_magic_detect_list (fb->mail_display->current_message,
NULL, NULL);
- if (mailing_list_name == NULL)
- enable_mask |= 4;
+ }
+
+ if (mailing_list_name == NULL) {
+ enable_mask |= 4;
+ menu[last_item].name = g_strdup (_("Filter on Mailing List"));
+ } else {
+ menu[last_item].name = g_strdup_printf (_("Filter on Mailing List (%s)"),
+ mailing_list_name);
}
e_popup_menu_run (menu, (GdkEventButton *)event, enable_mask, 0, fb);
+
+ g_free (menu[last_item].name);
return TRUE;
}
2 * Update to 2.4.55.marcus2003-05-233-3/+9 * Update to 0.2.4, and unmark BROKEN for 5.X.adamw2003-05-232-12/+12 * Remove obsolete (and broken) kde-icontheme-crystal.olgeni2003-05-225-1839/+0 * I haven't reviewed the sources for the new versions.trevor2003-05-222-0/+4 * Update to 2.2.3ade2003-05-218-84/+331 * Remove unnecessary BUILD_DEPENDS and clean up the Makefile a bit.adamw2003-05-211-12/+8 * Add a patch to prevent lockups with custom menus.marcus2003-05-212-1/+13 * Mark ONLY_FOR_ARCHS=i386.adamw2003-05-202-8/+69 * Update to KDE 3.1.2lioux2003-05-207-119/+374 * Fix build on -CURRENT.adamw2003-05-202-5/+21 * Update to 1.0.24.petef2003-05-192-2/+2 * BROKEN on 5.1: bad C++kris2003-05-181-1/+7 * BROKEN on 5.1: bad C++kris2003-05-181-1/+7 * BROKEN on 5.1: fails to linkkris2003-05-182-2/+14 * BROKEN on 5.1: bad C++kris2003-05-182-2/+14 * BROKEN on 5.1: bad C++kris2003-05-181-1/+7 * BROKEN on 5.1: does not compilekris2003-05-181-1/+7 * Add xfwm4 020724, gtk-2.0 based window manager part of the XFCEpetef2003-05-1211-0/+2451 * Unbreak by depending on gtk20arved2003-05-101-3/+1 * BROKEN: Does not compilekris2003-05-071-0/+2 * BROKEN: Does not linkkris2003-05-061-0/+2 * Update PORTREVISION encompassing last two commits.cy2003-05-051-0/+1 * Fix for failure to detect fontconfig >= 2.1.92.cy2003-05-051-4/+45 * Fix broken dependency.cy2003-05-051-1/+1 * Chase guile's shared lib version.marcus2003-05-021-1/+1 * Upgrade to 0.99.14.sumikawa2003-05-022-6/+6 * I missed the previously defined configure args. Add --with-esd to thosemarcus2003-04-271-2/+2 * - Add two patches I forgot to commit in the previous commitingsumikawa2003-04-274-11/+50 * Make esound support permanent since esound must be installed to installmarcus2003-04-271-12/+4 * 1. Fix build error reported by Bento.cy2003-04-241-0/+7 * Convert to new GNOME infrastructure.marcus2003-04-222-9/+3 * Install files mode 644, not 664kris2003-04-214-12/+32 * Upgrade to 1.2.7sumikawa2003-04-2117-326/+124 * USE_IMLIB is deprecated. Switching all USE_IMLIB references to appropriateadamw2003-04-211-1/+1 * Add windowlab.adamw2003-04-215-0/+45 * Remove USE_GNOMENG.marcus2003-04-2128-28/+0 * [patch] x11-wm/9menu rechange url in Makefileedwin2003-04-181-1/+1 * [MAINTAINER UPDATE] x11-wm/oroborus to 2.0.12edwin2003-04-133-4/+39 * x11-wm/9menu change MASTER_SITESedwin2003-04-131-1/+1 * Add Xft dependency when WITH_XFT is defined.nork2003-04-122-2/+4 * o fix crash on sticky windows if compiled with Remember patchnork2003-04-126-6/+44 * Enable compilation with GCC 3 (tested with 3.2.2).trevor2003-04-091-0/+11 * Install man page.trevor2003-04-091-0/+2 * Update to 0.12.40.trevor2003-04-092-6/+4 * Rejoice, for the long awaited upgrade to kde 3.1.1 is here!alane2003-04-062-1/+2 * Add missing info fileskris2003-04-061-0/+2 * Update to 1.3.marcus2003-04-044-37/+21 * Udate 2.5.5 -> 2.5.6.cy2003-04-043-4/+7 * Update to 1.6.adamw2003-04-023-9/+9 * Chase new website in MASTER_SITES and WWW.adamw2003-03-232-2/+2 * Clear moonlight beckons.ade2003-03-07