aboutsummaryrefslogtreecommitdiffstats
path: root/filter/filter-rule.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2006-01-25 16:35:36 +0800
committerParthasarathi Susarla <saps@src.gnome.org>2006-01-25 16:35:36 +0800
commitaaa9ce406e09660b8a623898c246bb1c244623ca (patch)
treeb93511f72706419623b7aedb6b505eb152ab84a2 /filter/filter-rule.c
parent6931a0d8bd4bb9e65a1c7c0dc36b77cddc6bf461 (diff)
downloadgsoc2013-evolution-aaa9ce406e09660b8a623898c246bb1c244623ca.tar
gsoc2013-evolution-aaa9ce406e09660b8a623898c246bb1c244623ca.tar.gz
gsoc2013-evolution-aaa9ce406e09660b8a623898c246bb1c244623ca.tar.bz2
gsoc2013-evolution-aaa9ce406e09660b8a623898c246bb1c244623ca.tar.lz
gsoc2013-evolution-aaa9ce406e09660b8a623898c246bb1c244623ca.tar.xz
gsoc2013-evolution-aaa9ce406e09660b8a623898c246bb1c244623ca.tar.zst
gsoc2013-evolution-aaa9ce406e09660b8a623898c246bb1c244623ca.zip
Added new thread-matching mode 'single' for messages not part of any
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 svn path=/trunk/; revision=31305
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);