[Commits] main.c 1.115.2.259 1.115.2.260

wwp at claws-mail.org wwp at claws-mail.org
Thu Nov 15 09:18:22 CET 2012


Update of /home/claws-mail/claws/src
In directory srv:/tmp/cvs-serv30887/src

Modified Files:
      Tag: gtk2
	main.c 
Log Message:
2012-11-15 [wwp]	3.9.0cvs3

	* doc/man/claws-mail.1
	* src/main.c
		Add --cancel-receiving command-line switch.

Index: main.c
===================================================================
RCS file: /home/claws-mail/claws/src/main.c,v
retrieving revision 1.115.2.259
retrieving revision 1.115.2.260
diff -u -d -r1.115.2.259 -r1.115.2.260
--- main.c	26 Sep 2012 13:15:47 -0000	1.115.2.259
+++ main.c	15 Nov 2012 08:18:19 -0000	1.115.2.260
@@ -204,6 +204,7 @@
 static struct RemoteCmd {
 	gboolean receive;
 	gboolean receive_all;
+	gboolean cancel_receiving;
 	gboolean compose;
 	const gchar *compose_mailto;
 	GList *attach_files;
@@ -1131,7 +1132,7 @@
 #endif
 
 	if (cmd.status || cmd.status_full || cmd.search ||
-		cmd.statistics || cmd.reset_statistics) {
+		cmd.statistics || cmd.reset_statistics || cmd.cancel_receiving) {
 		puts("0 Claws Mail not running.");
 		lock_socket_remove();
 		return 0;
@@ -1931,6 +1932,8 @@
 			cmd.receive_all = TRUE;
 		} else if (!strncmp(argv[i], "--receive", 9)) {
 			cmd.receive = TRUE;
+		} else if (!strncmp(argv[i], "--cancel-receiving", 18)) {
+			cmd.cancel_receiving = TRUE;
 		} else if (!strncmp(argv[i], "--compose-from-file", 19)) {
 			const gchar *p = (i+1 < argc)?argv[i+1]:NULL;
 
@@ -2053,6 +2056,7 @@
 					  "                         attached"));
 			g_print("%s\n", _("  --receive              receive new messages"));
 			g_print("%s\n", _("  --receive-all          receive new messages of all accounts"));
+			g_print("%s\n", _("  --cancel-receiving     cancel receiving of messages"));
 			g_print("%s\n", _("  --search folder type request [recursive]\n"
 					  "                         searches mail\n"
 					  "                         folder ex.: \"#mh/Mailbox/inbox\" or \"Mail\"\n"
@@ -2381,6 +2385,8 @@
 		fd_write_all(uxsock, "receive_all\n", 12);
 	} else if (cmd.receive) {
 		fd_write_all(uxsock, "receive\n", 8);
+	} else if (cmd.cancel_receiving) {
+		fd_write_all(uxsock, "cancel_receiving\n", 17);
 	} else if (cmd.compose && cmd.attach_files) {
 		gchar *str, *compose_str;
 
@@ -2566,6 +2572,9 @@
 				     prefs_common.newmail_notify_manu);
 	} else if (!strncmp(buf, "receive", 7)) {
 		inc_mail(mainwin, prefs_common.newmail_notify_manu);
+	} else if (!strncmp(buf, "cancel_receiving", 16)) {
+		inc_cancel_all();
+		imap_cancel_all();
 	} else if (!strncmp(buf, "compose_attach", 14)) {
 		GList *files = NULL, *curr;
 		AttachInfo *ainfo;



More information about the Commits mailing list