aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-rule.c
diff options
context:
space:
mode:
Diffstat (limited to 'filter/filter-rule.c')
-rw-r--r--filter/filter-rule.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/filter/filter-rule.c b/filter/filter-rule.c
index 59a43f9e92..579914fa04 100644
--- a/filter/filter-rule.c
+++ b/filter/filter-rule.c
@@ -302,6 +302,9 @@ xml_encode (FilterRule *fr)
case FILTER_THREAD_REPLIES_PARENTS:
xmlSetProp(node, "threading", "replies_parents");
break;
+ case FILTER_THREAD_SINGLE:
+ xmlSetProp(node, "threading", "single");
+ break;
}
if (fr->source) {
@@ -402,6 +405,8 @@ xml_decode (FilterRule *fr, xmlNodePtr node, RuleContext *f)
fr->threading = FILTER_THREAD_REPLIES;
else if (!strcmp(grouping, "replies_parents"))
fr->threading = FILTER_THREAD_REPLIES_PARENTS;
+ else if (!strcmp(grouping, "single"))
+ fr->threading = FILTER_THREAD_SINGLE;
xmlFree (grouping);
}
@@ -553,6 +558,9 @@ build_code (FilterRule *fr, GString *out)
case FILTER_THREAD_REPLIES_PARENTS:
g_string_append(out, " (match-threads \"replies_parents\" ");
break;
+ case FILTER_THREAD_SINGLE:
+ g_string_append(out, " (match-threads \"single\" ");
+ break;
}
switch (fr->grouping) {
@@ -878,12 +886,12 @@ get_widget (FilterRule *fr, struct _RuleContext *f)
}
if (f->flags & RULE_CONTEXT_THREADING) {
- const char *thread_types[] = { N_("None"), N_("All related"), N_("Replies"), N_("Replies and parents") };
+ const char *thread_types[] = { N_("None"), N_("All related"), N_("Replies"), N_("Replies and parents"), N_("No reply or parent") };
label = gtk_label_new (_("Include threads"));
menu = gtk_menu_new ();
- for (i=0;i<4;i++) {
+ for (i=0;i<5;i++) {
item = gtk_menu_item_new_with_label(_(thread_types[i]));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show (item);