aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
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/message-list.c
parent497e2144ace593643f64eb4dfd48f691d205521b (diff)
downloadgsoc2013-evolution-5994bc5006075c88b81f378ed858fdc7ac00f8bc.tar
gsoc2013-evolution-5994bc5006075c88b81f378ed858fdc7ac00f8bc.tar.gz
gsoc2013-evolution-5994bc5006075c88b81f378ed858fdc7ac00f8bc.tar.bz2
gsoc2013-evolution-5994bc5006075c88b81f378ed858fdc7ac00f8bc.tar.lz
gsoc2013-evolution-5994bc5006075c88b81f378ed858fdc7ac00f8bc.tar.xz
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/message-list.c')
-rw-r--r--mail/message-list.c23
1 files changed, 18 insertions, 5 deletions
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;
}