aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/summaryview.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/summaryview.c b/src/summaryview.c
index d2372398..b1b91e1e 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -263,6 +263,9 @@ static void summary_show_all_header_cb (SummaryView *summaryview,
static void summary_add_address_cb (SummaryView *summaryview,
guint action,
GtkWidget *widget);
+static void summary_create_filter_cb (SummaryView *summaryview,
+ guint action,
+ GtkWidget *widget);
static void summary_column_clicked (GtkWidget *button,
SummaryView *summaryview);
@@ -403,6 +406,15 @@ static GtkItemFactoryEntry summary_popup_entries[] =
{N_("/---"), NULL, NULL, 0, "<Separator>"},
{N_("/Add sender to address boo_k..."),
NULL, summary_add_address_cb, 0, NULL},
+ {N_("/Create f_ilter rule"), NULL, NULL, 0, "<Branch>"},
+ {N_("/Create f_ilter rule/_Automatically"),
+ NULL, summary_create_filter_cb, FLT_BY_AUTO, NULL},
+ {N_("/Create f_ilter rule/by _From"),
+ NULL, summary_create_filter_cb, FLT_BY_FROM, NULL},
+ {N_("/Create f_ilter rule/by _To"),
+ NULL, summary_create_filter_cb, FLT_BY_TO, NULL},
+ {N_("/Create f_ilter rule/by _Subject"),
+ NULL, summary_create_filter_cb, FLT_BY_SUBJECT, NULL},
{N_("/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_View"), NULL, NULL, 0, "<Branch>"},
{N_("/_View/Open in new _window"),
@@ -1025,6 +1037,7 @@ static void summary_set_menu_sensitive(SummaryView *summaryview)
menu_set_sensitive(ifactory, "/Redirect", sens);
menu_set_sensitive(ifactory, "/Add sender to address book...", sens);
+ menu_set_sensitive(ifactory, "/Create filter rule", sens);
menu_set_sensitive(ifactory, "/View", sens);
menu_set_sensitive(ifactory, "/View/Open in new window", sens);
@@ -4835,6 +4848,12 @@ static void summary_add_address_cb(SummaryView *summaryview,
summary_add_address(summaryview);
}
+static void summary_create_filter_cb(SummaryView *summaryview,
+ guint action, GtkWidget *widget)
+{
+ summary_filter_open(summaryview, (FilterCreateType)action);
+}
+
static void summary_sort_by_column_click(SummaryView *summaryview,
SummaryColumnType type)
{