Line 0
Link Here
|
|
|
1 |
written by Nicolas Rachinsky <nr@rachinsky.de> |
2 |
http://www.rachinsky.de |
3 |
|
4 |
This program is free software; you can redistribute it and/or modify |
5 |
it under the terms of the GNU General Public License as published |
6 |
by the Free Software Foundation; version 2 of the License. |
7 |
|
8 |
This program is distributed in the hope that it will be useful, |
9 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11 |
General Public License for more details. |
12 |
|
13 |
--- mutt-1.3.28.ori/mutt.h Thu Mar 14 19:22:25 2002 |
14 |
+++ mutt.h Fri Mar 15 00:22:41 2002 |
15 |
@@ -198,6 +198,7 @@ |
16 |
M_LIMIT, |
17 |
M_EXPIRED, |
18 |
M_SUPERSEDED, |
19 |
+ M_THREADCOMPLETE, |
20 |
|
21 |
/* actions for mutt_pattern_comp/mutt_pattern_exec */ |
22 |
M_AND, |
23 |
--- pattern.c.orig Fri Jul 11 09:19:06 2003 |
24 |
+++ pattern.c Fri Jul 11 09:23:17 2003 |
25 |
@@ -44,6 +44,7 @@ |
26 |
} |
27 |
Flags[] = |
28 |
{ |
29 |
+ { 'a', M_THREADCOMPLETE, 0, NULL }, |
30 |
{ 'A', M_ALL, 0, NULL }, |
31 |
{ 'b', M_BODY, M_FULL_MSG, eat_regexp }, |
32 |
{ 'B', M_WHOLE_MSG, M_FULL_MSG, eat_regexp }, |
33 |
@@ -946,6 +947,27 @@ |
34 |
return alladdr; |
35 |
} |
36 |
|
37 |
+static int match_threadcomplete(int flag,THREAD *t,int left,int up,int right,int down) |
38 |
+{ |
39 |
+ int a=0; |
40 |
+ HEADER *h=NULL; |
41 |
+ |
42 |
+ if(! t)return 0; |
43 |
+ h=t->message; |
44 |
+ if(! flag && h && h->tagged)return 1; |
45 |
+ if(flag && h && ! h->tagged) return 1; |
46 |
+ |
47 |
+ if(up)a=match_threadcomplete(flag,t->parent,1,1,1,0); |
48 |
+ if(a)return a; |
49 |
+ if(right && t->parent)a=match_threadcomplete(flag,t->next,0,0,1,1); |
50 |
+ if(a)return a; |
51 |
+ if(left && t->parent)a=match_threadcomplete(flag,t->prev,1,0,0,1); |
52 |
+ if(a)return a; |
53 |
+ if(down)a=match_threadcomplete(flag,t->child,1,0,1,1); |
54 |
+ if(a)return a; |
55 |
+ return 0; |
56 |
+} |
57 |
+ |
58 |
/* flags |
59 |
M_MATCH_FULL_ADDRESS match both personal and machine address */ |
60 |
int |
61 |
@@ -1024,6 +1046,8 @@ |
62 |
pat->alladdr, 2, h->env->to, h->env->cc)); |
63 |
case M_LIST: |
64 |
return (pat->not ^ mutt_is_list_recipient (pat->alladdr, h->env->to, h->env->cc)); |
65 |
+ case M_THREADCOMPLETE: |
66 |
+ return ((h->thread && match_threadcomplete(pat->not,h->thread,1,1,1,1))); |
67 |
case M_PERSONAL_RECIP: |
68 |
return (pat->not ^ match_user (pat->alladdr, h->env->to, h->env->cc)); |
69 |
case M_PERSONAL_FROM: |
70 |
--- PATCHES~ Tue Nov 6 19:59:33 2001 |
71 |
+++ PATCHES Tue Nov 6 19:59:42 2001 |
72 |
@@ -1,0 +1 @@ |
73 |
+1.3.28.nr.threadcomplete |