aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--filter/ChangeLog6
-rw-r--r--filter/filter-rule.c12
-rw-r--r--filter/filter-rule.h1
3 files changed, 17 insertions, 2 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog
index 9248867f18..c54301a00d 100644
--- a/filter/ChangeLog
+++ b/filter/ChangeLog
@@ -1,3 +1,9 @@
+2006-01-25 Not Zed <NotZed@Ximian.com>
+
+ * filter-rule.[ch]: Added new thread-matching mode 'single' for
+ messages not part of any conversation.
+ Committed on behalf of Notzed - partha
+
2005-12-20 Matthew Hall <matt@castleinthesky.org>
* filter.glade; rule-editor.c: adding top/bottom buttons for
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);
diff --git a/filter/filter-rule.h b/filter/filter-rule.h
index 2d5ba8174a..956b9cbcb4 100644
--- a/filter/filter-rule.h
+++ b/filter/filter-rule.h
@@ -51,6 +51,7 @@ enum _filter_threading_t {
FILTER_THREAD_ALL, /* add all possible threads */
FILTER_THREAD_REPLIES, /* add only replies */
FILTER_THREAD_REPLIES_PARENTS, /* replies plus parents */
+ FILTER_THREAD_SINGLE, /* messages with no replies or parents */
};
#define FILTER_SOURCE_INCOMING "incoming" /* performed on incoming email */