[Commits] attachwarner.c 1.1.2.20 1.1.2.21 attachwarner.h 1.1.2.9 1.1.2.10
mones at claws-mail.org
mones at claws-mail.org
Tue Oct 30 10:13:55 CET 2012
Update of /home/claws-mail/plugins/attachwarner/src
In directory srv:/tmp/cvs-serv26049/src
Modified Files:
Tag: gtk2
attachwarner.c attachwarner.h
Log Message:
2012-10-30 [mones] 0.2.24cvs5
* src/attachwarner.c
* src/attachwarner.h
Improve skip signature: use account preference's signature
separator instead of a harcoded value
Index: attachwarner.c
===================================================================
RCS file: /home/claws-mail/plugins/attachwarner/src/Attic/attachwarner.c,v
retrieving revision 1.1.2.20
retrieving revision 1.1.2.21
diff -u -d -r1.1.2.20 -r1.1.2.21
--- attachwarner.c 29 Oct 2012 17:24:54 -0000 1.1.2.20
+++ attachwarner.c 30 Oct 2012 09:13:53 -0000 1.1.2.21
@@ -121,7 +121,7 @@
return matcherlist_new(matchers, FALSE);
}
-static AttachWarnerMention *aw_matcherlist_string_match(MatcherList *matchers, gchar *str)
+static AttachWarnerMention *aw_matcherlist_string_match(MatcherList *matchers, gchar *str, gchar *sig_separator)
{
MsgInfo info;
int i = 0;
@@ -139,7 +139,9 @@
debug_print("checking without quotes\n");
for (i = 0; lines[i] != NULL && ret == FALSE; i++) {
if(attwarnerprefs.skip_signature
- && strcmp(lines[i], SIG_SEPARATOR) == 0) {
+ && sig_separator != NULL
+ && *sig_separator != '\0'
+ && strcmp(lines[i], sig_separator) == 0) {
debug_print("reached signature delimiter at line %d\n", i);
break;
}
@@ -155,7 +157,9 @@
debug_print("checking with quotes\n");
for (i = 0; lines[i] != NULL && ret == FALSE; i++) {
if(attwarnerprefs.skip_signature
- && strcmp(lines[i], SIG_SEPARATOR) == 0) {
+ && sig_separator != NULL
+ && *sig_separator != '\0'
+ && strcmp(lines[i], sig_separator) == 0) {
debug_print("reached signature delimiter at line %d\n", i);
break;
}
@@ -208,7 +212,7 @@
debug_print("checking text for attachment mentions\n");
if (text != NULL) {
- mention = aw_matcherlist_string_match(matchers, text);
+ mention = aw_matcherlist_string_match(matchers, text, compose->account->sig_sep);
g_free(text);
}
if (matchers != NULL)
Index: attachwarner.h
===================================================================
RCS file: /home/claws-mail/plugins/attachwarner/src/Attic/attachwarner.h,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -u -d -r1.1.2.9 -r1.1.2.10
--- attachwarner.h 29 Oct 2012 17:24:54 -0000 1.1.2.9
+++ attachwarner.h 30 Oct 2012 09:13:53 -0000 1.1.2.10
@@ -54,7 +54,5 @@
const gchar * plugin_version (void);
struct PluginFeature *plugin_provides (void);
-#define SIG_SEPARATOR "-- "
-
#endif
More information about the Commits
mailing list