[Commits] attachwarner.c 1.1.2.19 1.1.2.20 attachwarner.h 1.1.2.8 1.1.2.9 attachwarner_prefs.c 1.1.2.11 1.1.2.12 attachwarner_prefs.h 1.1.2.4 1.1.2.5

mones at claws-mail.org mones at claws-mail.org
Mon Oct 29 18:24:56 CET 2012


Update of /home/claws-mail/plugins/attachwarner/src
In directory srv:/tmp/cvs-serv1286/src

Modified Files:
      Tag: gtk2
	attachwarner.c attachwarner.h attachwarner_prefs.c 
	attachwarner_prefs.h 
Log Message:
2012-10-29 [mones]	0.2.24cvs4

	* src/attachwarner.c
	* src/attachwarner.h
	* src/attachwarner_prefs.c
	* src/attachwarner_prefs.h
		Sync with github repository:
		- new feature to skip signature when searching, by
		  Rowan Thorpe <rowanthorpe at gmail.com>
		- fix years in headers 

Index: attachwarner_prefs.c
===================================================================
RCS file: /home/claws-mail/plugins/attachwarner/src/Attic/attachwarner_prefs.c,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -u -d -r1.1.2.11 -r1.1.2.12
--- attachwarner_prefs.c	6 Jan 2012 14:11:45 -0000	1.1.2.11
+++ attachwarner_prefs.c	29 Oct 2012 17:24:54 -0000	1.1.2.12
@@ -1,7 +1,7 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2010 Hiroyuki Yamamoto and the Claws Mail Team
- * Copyright (C) 2006-2010 Ricardo Mones
+ * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail Team
+ * Copyright (C) 2006-2012 Ricardo Mones
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -40,6 +40,7 @@
 	GtkWidget *regexp_text;
 	GtkWidget *skip_quotes_checkbox;
 	GtkWidget *skip_forwards_and_redirections;
+	GtkWidget *skip_signature;
 };
 
 struct AttachWarnerPrefsPage attwarnerprefs_page;
@@ -51,6 +52,8 @@
 	 NULL, NULL, NULL},
 	{"skip_forwards_and_redirections", "TRUE", &attwarnerprefs.skip_forwards_and_redirections, P_BOOL,
 	 NULL, NULL, NULL},
+	{"skip_signature", "TRUE", &attwarnerprefs.skip_signature, P_BOOL,
+	 NULL, NULL, NULL},
 	{NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
 };
 
@@ -65,6 +68,7 @@
 	GtkTextBuffer *buffer;
 	GtkWidget *skip_quotes_checkbox;
 	GtkWidget *skip_fwd_redir_checkbox;
+	GtkWidget *skip_signature_checkbox;
 
 	vbox = gtk_vbox_new(FALSE, 6);
 	hbox = gtk_hbox_new(FALSE, 6);
@@ -108,6 +112,16 @@
 			_("Don't check for missing attachments when forwarding or redirecting messages"));
 	page->skip_forwards_and_redirections = skip_fwd_redir_checkbox;
 
+	skip_signature_checkbox = gtk_check_button_new_with_label(_("Skip signature"));
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(skip_signature_checkbox),
+	    	 attwarnerprefs.skip_signature);
+	gtk_box_pack_start(GTK_BOX(vbox), skip_signature_checkbox, FALSE, FALSE, 0);
+	gtk_widget_show(skip_signature_checkbox);
+
+	CLAWS_SET_TIP(skip_signature_checkbox,
+			_("Exclude lines from the first signature-separator onwards from checking for the regular expressions above"));
+	page->skip_signature = skip_signature_checkbox;
+
 	gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 6);
 	gtk_widget_show_all(hbox);
 	
@@ -166,6 +180,8 @@
 			(GTK_TOGGLE_BUTTON(page->skip_quotes_checkbox));
 	attwarnerprefs.skip_forwards_and_redirections = gtk_toggle_button_get_active
 			(GTK_TOGGLE_BUTTON(page->skip_forwards_and_redirections));
+	attwarnerprefs.skip_signature = gtk_toggle_button_get_active
+			(GTK_TOGGLE_BUTTON(page->skip_signature));
 
 	attwarner_save_config();
 	g_free(attwarnerprefs.match_strings);
@@ -204,5 +220,4 @@
 void attachwarner_prefs_done(void)
 {
 	prefs_gtk_unregister_page((PrefsPage *) &attwarnerprefs_page);
-
 }

Index: attachwarner.c
===================================================================
RCS file: /home/claws-mail/plugins/attachwarner/src/Attic/attachwarner.c,v
retrieving revision 1.1.2.19
retrieving revision 1.1.2.20
diff -u -d -r1.1.2.19 -r1.1.2.20
--- attachwarner.c	19 Oct 2011 22:32:19 -0000	1.1.2.19
+++ attachwarner.c	29 Oct 2012 17:24:54 -0000	1.1.2.20
@@ -1,7 +1,7 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2011 Hiroyuki Yamamoto and the Claws Mail Team
- * Copyright (C) 2006-2011 Ricardo Mones
+ * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail Team
+ * Copyright (C) 2006-2012 Ricardo Mones
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -138,6 +138,11 @@
 		&& *prefs_common_get_prefs()->quote_chars != '\0') {
 		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) {
+				debug_print("reached signature delimiter at line %d\n", i);
+				break;
+			}
 			if (line_has_quote_char(lines[i], 
 				prefs_common_get_prefs()->quote_chars) == NULL) {
 				debug_print("testing line %d\n", i);
@@ -149,6 +154,11 @@
 	} else {
 		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) {
+				debug_print("reached signature delimiter at line %d\n", i);
+				break;
+			}
 			debug_print("testing line %d\n", i);
 			info.subject = lines[i];
 			ret = matcherlist_match(matchers, &info);

Index: attachwarner.h
===================================================================
RCS file: /home/claws-mail/plugins/attachwarner/src/Attic/attachwarner.h,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -u -d -r1.1.2.8 -r1.1.2.9
--- attachwarner.h	19 Oct 2011 22:32:19 -0000	1.1.2.8
+++ attachwarner.h	29 Oct 2012 17:24:54 -0000	1.1.2.9
@@ -1,7 +1,7 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2011 Hiroyuki Yamamoto and the Claws Mail Team
- * Copyright (C) 2006-2011 Ricardo Mones
+ * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail Team
+ * Copyright (C) 2006-2012 Ricardo Mones
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -54,5 +54,7 @@
 const gchar *	plugin_version		  (void);
 struct PluginFeature *plugin_provides	  (void);
 
+#define SIG_SEPARATOR "-- "
+
 #endif
 

Index: attachwarner_prefs.h
===================================================================
RCS file: /home/claws-mail/plugins/attachwarner/src/Attic/attachwarner_prefs.h,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -d -r1.1.2.4 -r1.1.2.5
--- attachwarner_prefs.h	18 Nov 2010 07:43:43 -0000	1.1.2.4
+++ attachwarner_prefs.h	29 Oct 2012 17:24:54 -0000	1.1.2.5
@@ -1,7 +1,7 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2010 Hiroyuki Yamamoto and the Claws Mail Team
- * Copyright (C) 2006-2010 Ricardo Mones
+ * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail Team
+ * Copyright (C) 2006-2012 Ricardo Mones
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -30,6 +30,7 @@
 	gchar		 *match_strings;
 	gboolean	 skip_quotes;
 	gboolean	 skip_forwards_and_redirections;
+	gboolean	 skip_signature;
 };
 
 extern AttachWarnerPrefs attwarnerprefs;



More information about the Commits mailing list