[evolution-patches] Mailer bug #127521: Inline PGP support for evolution (part A: only sending), reviewed



This allows Evolution to send clearsigned messages.

-Bohumir


Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.1949
diff -u -r1.1949 ChangeLog
--- camel/ChangeLog	5 Jan 2004 20:55:27 -0000	1.1949
+++ camel/ChangeLog	9 Jan 2004 06:38:15 -0000
@@ -1,3 +1,12 @@
+2004-01-09  Bohumir Jelinek  <bj48 ra msstate edu>
+
+	* camel-cipher-context.c (camel_cipher_dw_to_canon_stream): added,
+	filters plain text
+	* camel-cipher-context.h: added prototypes for above
+	* camel-gpg-context.c: added GPG_CTX_MODE_CLEARSIGN enumeration
+	(camel_gpg_context_clearsign): added, signs plain text
+	* camel-gpg-context.c: added prototype for above
+	
 2004-01-05  JP Rosevear <jpr ximian com>
 
 	* camel-utf8.c: include sys/types.h for freebsd
Index: camel/camel-cipher-context.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-cipher-context.c,v
retrieving revision 1.17
diff -u -r1.17 camel-cipher-context.c
--- camel/camel-cipher-context.c	10 Dec 2003 05:25:24 -0000	1.17
+++ camel/camel-cipher-context.c	9 Jan 2004 06:38:15 -0000
@@ -650,3 +650,37 @@
 
 	return res;
 }
+
+/**
+ * camel_cipher_data_wrapper_to_canon_stream
+ * @dw: data wrapper to write.
+ * @flags: flags for the canonicalisation filter (CamelMimeFilterCanon)
+ * @ostream: stream to write canonicalised output to.
+ * 
+ * Writes a dw to a stream in a canonicalised format, suitable for signing/encrypting.
+ *
+ * Return value: -1 on error;
+ **/
+int
+camel_cipher_data_wrapper_to_canon_stream (CamelDataWrapper *dw, guint32 flags, CamelStream *ostream)
+{
+	CamelStreamFilter *filter;
+	CamelMimeFilter *canon;
+	int res = -1;
+
+	filter = camel_stream_filter_new_with_stream (ostream);
+
+	canon = camel_mime_filter_canon_new (flags);
+	camel_stream_filter_add (filter, canon);
+	camel_object_unref (canon);
+
+	if (camel_data_wrapper_write_to_stream (dw, (CamelStream *)filter) != -1
+	    && camel_stream_flush ((CamelStream *)filter) != -1)
+		res = 0;
+
+	camel_object_unref (filter);
+
+	camel_stream_reset (ostream);
+
+	return res;
+}
Index: camel/camel-cipher-context.h
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-cipher-context.h,v
retrieving revision 1.15
diff -u -r1.15 camel-cipher-context.h
--- camel/camel-cipher-context.h	10 Dec 2003 05:25:24 -0000	1.15
+++ camel/camel-cipher-context.h	9 Jan 2004 06:38:15 -0000
@@ -183,6 +183,7 @@
 
 /* utility functions */
 int		     camel_cipher_canonical_to_stream(CamelMimePart *part, guint32 flags, CamelStream *ostream);
+int		     camel_cipher_data_wrapper_to_canon_stream (CamelDataWrapper *dw, guint32 flags, CamelStream *ostream);
 
 #ifdef __cplusplus
 }
Index: camel/camel-gpg-context.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-gpg-context.c,v
retrieving revision 1.45
diff -u -r1.45 camel-gpg-context.c
--- camel/camel-gpg-context.c	11 Dec 2003 17:30:31 -0000	1.45
+++ camel/camel-gpg-context.c	9 Jan 2004 06:38:15 -0000
@@ -148,6 +148,7 @@
 
 enum _GpgCtxMode {
 	GPG_CTX_MODE_SIGN,
+	GPG_CTX_MODE_CLEARSIGN,
 	GPG_CTX_MODE_VERIFY,
 	GPG_CTX_MODE_ENCRYPT,
 	GPG_CTX_MODE_DECRYPT,
@@ -296,7 +297,7 @@
 gpg_ctx_set_mode (struct _GpgCtx *gpg, enum _GpgCtxMode mode)
 {
 	gpg->mode = mode;
-	gpg->need_passwd = ((gpg->mode == GPG_CTX_MODE_SIGN) || (gpg->mode == GPG_CTX_MODE_DECRYPT));
+	gpg->need_passwd = ((gpg->mode == GPG_CTX_MODE_SIGN) || (gpg->mode == GPG_CTX_MODE_DECRYPT) || (gpg->mode == GPG_CTX_MODE_CLEARSIGN));
 }
 
 static void
@@ -503,6 +504,18 @@
 		g_ptr_array_add (argv, "--output");
 		g_ptr_array_add (argv, "-");
 		break;
+	case GPG_CTX_MODE_CLEARSIGN:
+		g_ptr_array_add (argv, "--clearsign");
+		hash_str = gpg_hash_str (gpg->hash);
+		if (hash_str)
+			g_ptr_array_add (argv, (char *) hash_str);
+		if (gpg->userid) {
+			g_ptr_array_add (argv, "-u");
+			g_ptr_array_add (argv, (char *) gpg->userid);
+		}
+		g_ptr_array_add (argv, "--output");
+		g_ptr_array_add (argv, "-");
+		break;
 	case GPG_CTX_MODE_VERIFY:
 		if (!camel_session_is_online (gpg->session)) {
 			/* this is a deprecated flag to gpg since 1.0.7 */
@@ -821,6 +834,11 @@
 				/* FIXME: save this state? */
 			}
 			break;
+		case GPG_CTX_MODE_CLEARSIGN:
+			if (!strncmp (status, "SIG_CREATED ", 12)) {
+				/* FIXME: save this state? */
+			}
+			break;
 		case GPG_CTX_MODE_VERIFY:
 			if (!strncmp (status, "TRUST_", 6)) {
 				status += 6;
@@ -1102,6 +1120,9 @@
 	case GPG_CTX_MODE_SIGN:
 		mode = "sign";
 		break;
+	case GPG_CTX_MODE_CLEARSIGN:
+		mode = "clearsign";
+		break;
 	case GPG_CTX_MODE_VERIFY:
 		mode = "verify";
 		break;
@@ -1747,6 +1768,93 @@
 
 /* ********************************************************************** */
 
+/**
+ * camel_gpg_context_clearsign:
+ * @context: gpg context
+ * @userid: user id
+ * @hash: hash algorithm
+ * @plain: input plain text message
+ * @current: output plain text message with clear text signature added
+ * @ex: exception status
+ *
+ * Sets the @always_trust flag on the gpg context which is used for
+ * encryption.
+ **/
+int
+camel_gpg_context_clearsign (CamelCipherContext *context, const char *userid, CamelCipherHash hash, CamelDataWrapper *plain, CamelDataWrapper *current, CamelException *ex)
+{
+	struct _GpgCtx *gpg = NULL;
+	CamelStream *istream, *ostream;
+	CamelContentType *ct;
+	int res = -1;
+
+	/* Note: see rfc2440, section 7 */
+
+	istream = camel_stream_mem_new ();
+	ostream = camel_stream_mem_new ();
+	if (camel_cipher_data_wrapper_to_canon_stream (plain, CAMEL_MIME_FILTER_CANON_STRIP|CAMEL_MIME_FILTER_CANON_CRLF|CAMEL_MIME_FILTER_CANON_FROM,
+					     istream) == -1) {
+		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
+				      _("Could not generate signing data: %s"), g_strerror(errno));
+		goto fail;
+	}
+
+	gpg = gpg_ctx_new (context->session);
+	gpg_ctx_set_mode (gpg, GPG_CTX_MODE_CLEARSIGN);
+	gpg_ctx_set_hash (gpg, hash);
+	gpg_ctx_set_userid (gpg, userid);
+	gpg_ctx_set_istream (gpg, istream);
+	gpg_ctx_set_ostream (gpg, ostream);
+	
+	if (gpg_ctx_op_start (gpg) == -1) {
+		camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
+				      _("Failed to execute gpg: %s"), g_strerror (errno));
+		goto fail;
+	}
+	
+	while (!gpg_ctx_op_complete (gpg)) {
+		if (camel_operation_cancel_check (NULL)) {
+			camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL,
+					     _("Cancelled."));
+			gpg_ctx_op_cancel (gpg);
+			goto fail;
+		}
+		
+		if (gpg_ctx_op_step (gpg, ex) == -1) {
+			gpg_ctx_op_cancel (gpg);
+			goto fail;
+		}
+	}
+	
+	if (gpg_ctx_op_wait (gpg) != 0) {
+		const char *diagnostics;
+		
+		diagnostics = gpg_ctx_get_diagnostics (gpg);
+		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM,
+				     diagnostics && *diagnostics ? diagnostics :
+				     _("Failed to execute gpg."));
+		goto fail;
+	}
+
+	res = 0;
+
+	camel_stream_reset (ostream);
+	camel_data_wrapper_construct_from_stream (current, ostream);
+
+	ct = camel_content_type_new ("application", "pgp");
+	camel_content_type_set_param (ct, "x-action", "sign");
+	camel_content_type_set_param (ct, "format", "text");
+	camel_data_wrapper_set_mime_type_field (current, ct);
+	camel_content_type_unref (ct);
+
+fail:
+	camel_object_unref (ostream);
+	if (gpg)
+		gpg_ctx_free (gpg);
+	
+	return res;
+}
+
 static void
 camel_gpg_context_class_init (CamelGpgContextClass *klass)
 {
Index: camel/camel-gpg-context.h
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-gpg-context.h,v
retrieving revision 1.4
diff -u -r1.4 camel-gpg-context.h
--- camel/camel-gpg-context.h	1 Nov 2002 00:45:05 -0000	1.4
+++ camel/camel-gpg-context.h	9 Jan 2004 06:38:15 -0000
@@ -57,6 +57,8 @@
 
 void camel_gpg_context_set_always_trust (CamelGpgContext *ctx, gboolean trust);
 
+int camel_gpg_context_clearsign (CamelCipherContext *context, const char *userid, CamelCipherHash hash, CamelDataWrapper *plain, CamelDataWrapper *current, CamelException *ex);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
Index: composer/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/composer/ChangeLog,v
retrieving revision 1.592
diff -u -r1.592 ChangeLog
--- composer/ChangeLog	8 Jan 2004 03:23:46 -0000	1.592
+++ composer/ChangeLog	9 Jan 2004 06:38:15 -0000
@@ -1,3 +1,7 @@
+2004-01-09  Bohumir Jelinek  <bj48 ra msstate edu>
+
+	* e-msg-composer.c (build_message): modified to offer clearsign
+
 2004-01-08  Not Zed  <NotZed Ximian com>
 
 	* e-msg-composer.c (set_editor_signature): add an assertion for no
Index: composer/e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.427
diff -u -r1.427 e-msg-composer.c
--- composer/e-msg-composer.c	8 Jan 2004 03:23:46 -0000	1.427
+++ composer/e-msg-composer.c	9 Jan 2004 06:38:16 -0000
@@ -574,12 +574,10 @@
 		const char *pgp_userid;
 		CamelInternetAddress *from = NULL;
 		CamelCipherContext *cipher;
+		gboolean mimesign = FALSE;
 
-		part = camel_mime_part_new ();
-		camel_medium_set_content_object (CAMEL_MEDIUM (part), current);
 		if (current == plain)
 			camel_mime_part_set_encoding (part, plain_encoding);
-		camel_object_unref (current);
 
 		if (hdrs->account && hdrs->account->pgp_key && *hdrs->account->pgp_key) {
 			pgp_userid = hdrs->account->pgp_key;
@@ -588,23 +586,68 @@
 			camel_internet_address_get(from, 0, NULL, &pgp_userid);
 		}
 		
-		if (composer->pgp_sign) {
-			CamelMimePart *npart = camel_mime_part_new();
+		if (composer->pgp_sign && hdrs->account->pgp_clearsign) {
 
-			cipher = mail_crypto_get_pgp_cipher_context(hdrs->account);
-			camel_cipher_sign(cipher, pgp_userid, CAMEL_CIPHER_HASH_SHA1, part, npart, &ex);
-			camel_object_unref(cipher);
-			
-			if (camel_exception_is_set(&ex)) {
-				camel_object_unref(npart);
+			part = NULL;
+			if ((current == plain) && !composer->pgp_encrypt) {
+				/* do clearsign */
+				current = camel_data_wrapper_new ();
+
+				cipher = mail_crypto_get_pgp_cipher_context (hdrs->account);
+				camel_gpg_context_clearsign (cipher, pgp_userid, CAMEL_CIPHER_HASH_SHA1, plain, current, &ex);
+				camel_object_unref (cipher);
+
+				if (camel_exception_is_set (&ex)) {
+					camel_object_unref (current);
+					goto exception;
+				}
+			}
+			else  {
+				/* offer mimesign */
+				mimesign = em_utils_prompt_user ((GtkWindow *) composer, GTK_RESPONSE_YES, NULL,
+								 _("PGP clearsign can only be used for plain text message without encryption.\nUse MIME signature instead?\n"));
+			}
+		}
+
+		mimesign = mimesign || (composer->pgp_sign && !hdrs->account->pgp_clearsign);
+
+		if (mimesign) {
+			/* do mimesign */
+			part = camel_mime_part_new ();
+
+			camel_medium_set_content_object (CAMEL_MEDIUM (part), current);
+			camel_object_unref (current);
+
+			CamelMimePart *npart = camel_mime_part_new ();
+
+			cipher = mail_crypto_get_pgp_cipher_context (hdrs->account);
+			camel_cipher_sign (cipher, pgp_userid, CAMEL_CIPHER_HASH_SHA1, part, npart, &ex);
+			camel_object_unref (cipher);
+
+			if (camel_exception_is_set (&ex)) {
+				camel_object_unref (npart);
 				goto exception;
 			}
 
 			camel_object_unref(part);
 			part = npart;
+
+			current = camel_medium_get_content_object (CAMEL_MEDIUM (part));
+			camel_object_ref (current);
+
+			if (!composer->pgp_encrypt)
+				camel_object_unref (part);
 		}
 		
 		if (composer->pgp_encrypt) {
+			/* if mimesign was done, we will encrypt "part" created there,
+			 * otherwise we need to create a new "part" from "current" */
+			if (!mimesign) {
+				part = camel_mime_part_new ();
+				camel_medium_set_content_object (CAMEL_MEDIUM (part), current);
+				camel_object_unref (current);
+			}
+
 			CamelMimePart *npart = camel_mime_part_new();
 
 			/* check to see if we should encrypt to self, NB gets removed immediately after use */
@@ -625,14 +668,16 @@
 
 			camel_object_unref (part);
 			part = npart;
+
+			current = camel_medium_get_content_object (CAMEL_MEDIUM (part));
+			camel_object_ref (current);
+
+			camel_object_unref (part);
 		}
 
 		if (from)
 			camel_object_unref (from);	
 	
-		current = camel_medium_get_content_object (CAMEL_MEDIUM (part));
-		camel_object_ref (current);
-		camel_object_unref (part);
 	}
 	
 #if defined (HAVE_NSS) && defined (SMIME_SUPPORTED)
@@ -737,7 +782,7 @@
 	
  exception:
 	
-	if (part != CAMEL_MIME_PART (new))
+	if ((part != CAMEL_MIME_PART (new)) && (part != NULL))
 		camel_object_unref (part);
 	
 	camel_object_unref (new);
Index: e-util/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/e-util/ChangeLog,v
retrieving revision 1.428
diff -u -r1.428 ChangeLog
--- e-util/ChangeLog	5 Jan 2004 10:58:53 -0000	1.428
+++ e-util/ChangeLog	9 Jan 2004 06:38:16 -0000
@@ -1,3 +1,10 @@
+2004-01-09  Bohumir Jelinek  <bohumir ra msstate edu>
+
+	* e-account.c (e_account_set_from_xml): added clearsign setting
+	(e_account_import): added clearsign setting
+	(e_account_to_xml): added clearsign setting
+	* e-account.h:  added clearsign setting EAccount
+	
 2004-01-05  Not Zed  <NotZed Ximian com>
 
 	* e-memory.c (e_mempool_destroy): Fix from Zan Lynx
Index: e-util/e-account.c
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-account.c,v
retrieving revision 1.5
diff -u -r1.5 e-account.c
--- e-util/e-account.c	31 Oct 2003 04:55:41 -0000	1.5
+++ e-util/e-account.c	9 Jan 2004 06:38:16 -0000
@@ -329,6 +329,7 @@
 			changed |= xml_set_bool (node, "encrypt-to-self", &account->pgp_encrypt_to_self);
 			changed |= xml_set_bool (node, "always-trust", &account->pgp_always_trust);
 			changed |= xml_set_bool (node, "always-sign", &account->pgp_always_sign);
+			changed |= xml_set_bool (node, "clearsign", &account->pgp_clearsign);
 			changed |= xml_set_bool (node, "no-imip-sign", &account->pgp_no_imip_sign);
 
 			if (node->children) {
@@ -418,6 +419,7 @@
 	dest->pgp_key = g_strdup (src->pgp_key);
 	dest->pgp_encrypt_to_self = src->pgp_encrypt_to_self;
 	dest->pgp_always_sign = src->pgp_always_sign;
+	dest->pgp_clearsign = src->pgp_clearsign;
 	dest->pgp_no_imip_sign = src->pgp_no_imip_sign;
 	dest->pgp_always_trust = src->pgp_always_trust;
 	
@@ -503,6 +505,7 @@
 	xmlSetProp (node, "encrypt-to-self", account->pgp_encrypt_to_self ? "true" : "false");
 	xmlSetProp (node, "always-trust", account->pgp_always_trust ? "true" : "false");
 	xmlSetProp (node, "always-sign", account->pgp_always_sign ? "true" : "false");
+	xmlSetProp (node, "clearsign", account->pgp_clearsign ? "true" : "false");
 	xmlSetProp (node, "no-imip-sign", account->pgp_no_imip_sign ? "true" : "false");
 	if (account->pgp_key)
 		xmlNewTextChild (node, NULL, "key-id", account->pgp_key);
Index: e-util/e-account.h
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-account.h,v
retrieving revision 1.4
diff -u -r1.4 e-account.h
--- e-util/e-account.h	31 Oct 2003 04:55:41 -0000	1.4
+++ e-util/e-account.h	9 Jan 2004 06:38:16 -0000
@@ -69,6 +69,7 @@
 	char *pgp_key;
 	gboolean pgp_encrypt_to_self;
 	gboolean pgp_always_sign;
+	gboolean pgp_clearsign;
 	gboolean pgp_no_imip_sign;
 	gboolean pgp_always_trust;
 
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2978
diff -u -r1.2978 ChangeLog
--- mail/ChangeLog	8 Jan 2004 06:09:32 -0000	1.2978
+++ mail/ChangeLog	9 Jan 2004 06:38:16 -0000
@@ -1,3 +1,11 @@
+2004-01-09  Bohumir Jelinek  <bohumir ra msstate edu>
+
+	* mail-account-gui.c (mail_account_gui_new): added clearsign
+	setting
+	(mail_account_gui_save): added clearsign setting
+	* mail-account-gui.h: added clearsign setting to MailAccountGui
+	* mail-config.glade: added clearsign setting
+
 2004-01-08  Not Zed  <NotZed Ximian com>
 
 	** See bug #50786
Index: mail/mail-account-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-account-editor.c,v
retrieving revision 1.59
diff -u -r1.59 mail-account-editor.c
--- mail/mail-account-editor.c	1 Dec 2003 01:32:24 -0000	1.59
+++ mail/mail-account-editor.c	9 Jan 2004 06:38:16 -0000
@@ -199,6 +199,7 @@
 	g_signal_connect (editor->gui->pgp_key, "changed", G_CALLBACK (mail_account_editor_changed), editor);
 	g_signal_connect (editor->gui->pgp_encrypt_to_self, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
 	g_signal_connect (editor->gui->pgp_always_sign, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
+	g_signal_connect (editor->gui->pgp_clearsign, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
 	g_signal_connect (editor->gui->pgp_no_imip_sign, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
 	g_signal_connect (editor->gui->pgp_always_trust, "toggled", G_CALLBACK (mail_account_editor_changed), editor);
 
Index: mail/mail-account-gui.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-account-gui.c,v
retrieving revision 1.142
diff -u -r1.142 mail-account-gui.c
--- mail/mail-account-gui.c	13 Nov 2003 22:33:02 -0000	1.142
+++ mail/mail-account-gui.c	9 Jan 2004 06:38:16 -0000
@@ -1625,6 +1625,8 @@
 	gtk_toggle_button_set_active (gui->pgp_encrypt_to_self, account->pgp_encrypt_to_self);
 	gui->pgp_always_sign = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "pgp_always_sign"));
 	gtk_toggle_button_set_active (gui->pgp_always_sign, account->pgp_always_sign);
+	gui->pgp_clearsign = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "pgp_clearsign"));
+	gtk_toggle_button_set_active (gui->pgp_clearsign, account->pgp_clearsign);
 	gui->pgp_no_imip_sign = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "pgp_no_imip_sign"));
 	gtk_toggle_button_set_active (gui->pgp_no_imip_sign, account->pgp_no_imip_sign);
 	gui->pgp_always_trust = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "pgp_always_trust"));
@@ -2030,6 +2032,7 @@
 	new->pgp_key = g_strdup (gtk_entry_get_text (gui->pgp_key));
 	new->pgp_encrypt_to_self = gtk_toggle_button_get_active (gui->pgp_encrypt_to_self);
 	new->pgp_always_sign = gtk_toggle_button_get_active (gui->pgp_always_sign);
+	new->pgp_clearsign = gtk_toggle_button_get_active (gui->pgp_clearsign);
 	new->pgp_no_imip_sign = gtk_toggle_button_get_active (gui->pgp_no_imip_sign);
 	new->pgp_always_trust = gtk_toggle_button_get_active (gui->pgp_always_trust);
 	
Index: mail/mail-account-gui.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-account-gui.h,v
retrieving revision 1.26
diff -u -r1.26 mail-account-gui.h
--- mail/mail-account-gui.h	31 Oct 2003 04:56:46 -0000	1.26
+++ mail/mail-account-gui.h	9 Jan 2004 06:38:16 -0000
@@ -106,6 +106,7 @@
 	GtkEntry *pgp_key;
 	GtkToggleButton *pgp_encrypt_to_self;
 	GtkToggleButton *pgp_always_sign;
+	GtkToggleButton *pgp_clearsign;
 	GtkToggleButton *pgp_no_imip_sign;
 	GtkToggleButton *pgp_always_trust;
 
Index: mail/mail-config.glade
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-config.glade,v
retrieving revision 1.127
diff -u -r1.127 mail-config.glade
--- mail/mail-config.glade	7 Jan 2004 23:45:09 -0000	1.127
+++ mail/mail-config.glade	9 Jan 2004 06:38:17 -0000
@@ -2614,6 +2614,24 @@
 		      </child>
 
 		      <child>
+			<widget class="GtkCheckButton" id="pgp_clearsign">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">When signing outgoing message, use _cleartext signature if possible</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
 			<widget class="GtkCheckButton" id="pgp_no_imip_sign">
 			  <property name="visible">True</property>
 			  <property name="can_focus">True</property>
Index: shell/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1363
diff -u -r1.1363 ChangeLog
--- shell/ChangeLog	8 Jan 2004 06:04:04 -0000	1.1363
+++ shell/ChangeLog	9 Jan 2004 06:38:17 -0000
@@ -1,3 +1,7 @@
+2004-01-09  Bohumir Jelinek  <bohumir dhcp-90-219 erc msstate edu>
+
+	* e-config-upgrade.c: added clearsign setting to _map_table pgp_map
+
 2004-01-08  Not Zed  <NotZed Ximian com>
 
 	* e-shell-startup-wizard.c (get_intelligent_importers): check that
Index: shell/e-config-upgrade.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-config-upgrade.c,v
retrieving revision 1.13
diff -u -r1.13 e-config-upgrade.c
--- shell/e-config-upgrade.c	12 Sep 2003 07:36:15 -0000	1.13
+++ shell/e-config-upgrade.c	9 Jan 2004 06:38:17 -0000
@@ -798,6 +798,7 @@
 	{ "account_pgp_encrypt_to_self_%i", "encrypt-to-self", MAP_BOOL },
 	{ "account_pgp_always_trust_%i", "always-trust", MAP_BOOL },
 	{ "account_pgp_always_sign_%i", "always-sign", MAP_BOOL },
+	{ "account_pgp_clearsign_%i", "clearsign", MAP_BOOL },
 	{ "account_pgp_no_imip_sign_%i", "no-imip-sign", MAP_BOOL },
 	{ "account_pgp_key_%i", "key-id", MAP_STRING|MAP_CONTENT },
 	{ NULL },



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]