aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-format.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-09-04 13:14:55 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-09-04 13:14:55 +0800
commit53ebb93266d8ae2f4f14792063bef5e2ef9f0063 (patch)
tree063c7f8e4b08d70aad8f8d5d769c385b9a697046 /mail/mail-format.c
parentbb0529fc37b103599d16434d1bd16aad024c5f62 (diff)
downloadgsoc2013-evolution-53ebb93266d8ae2f4f14792063bef5e2ef9f0063.tar.gz
gsoc2013-evolution-53ebb93266d8ae2f4f14792063bef5e2ef9f0063.tar.zst
gsoc2013-evolution-53ebb93266d8ae2f4f14792063bef5e2ef9f0063.zip
Applied Jesse's patch that will append a signature to the replied message
2000-09-04 Jeffrey Stedfast <fejj@helixcode.com> * mail-format.c (mail_generate_reply): Applied Jesse's patch that will append a signature to the replied message text * folder-browser-factory.c: Changed "Send & Receieve" back to "Get Mail" temporarily so that the toolbar buttons don't all get stretched to some weird proportion svn path=/trunk/; revision=5191
Diffstat (limited to 'mail/mail-format.c')
-rw-r--r--mail/mail-format.c47
1 files changed, 26 insertions, 21 deletions
diff --git a/mail/mail-format.c b/mail/mail-format.c
index a73d2faf89..fc0fd20f87 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -1630,18 +1630,24 @@ mail_generate_reply (CamelMimeMessage *message, gboolean to_all)
gboolean want_plain, is_html;
const char *repl_to, *message_id, *references;
GList *to, *cc;
-
+ MailConfigIdentity *id;
+ gchar *sig_file = NULL;
+
want_plain = !mail_config_send_html ();
-
+
contents = camel_medium_get_content_object (CAMEL_MEDIUM (message));
text = mail_get_message_body (contents, want_plain, &is_html);
- composer = E_MSG_COMPOSER (e_msg_composer_new ());
+ id = mail_config_get_default_identity ();
+ if (id)
+ sig_file = id->sig;
+
+ composer = E_MSG_COMPOSER (e_msg_composer_new_with_sig_file (sig_file));
/* Set the quoted reply text. */
if (text) {
char *repl_text;
-
+
if (is_html) {
repl_text = g_strdup_printf ("<blockquote><i>\n%s\n"
"</i></blockquote>\n",
@@ -1649,7 +1655,7 @@ mail_generate_reply (CamelMimeMessage *message, gboolean to_all)
} else {
char *s, *d, *quoted_text;
int lines, len;
-
+
/* Count the number of lines in the body. If
* the text ends with a \n, this will be one
* too high, but that's ok. Allocate enough
@@ -1658,10 +1664,10 @@ mail_generate_reply (CamelMimeMessage *message, gboolean to_all)
for (s = text, lines = 0; s; s = strchr (s + 1, '\n'))
lines++;
quoted_text = g_malloc (strlen (text) + lines * 2);
-
+
s = text;
d = quoted_text;
-
+
/* Copy text to quoted_text line by line,
* prepending "> ".
*/
@@ -1675,7 +1681,7 @@ mail_generate_reply (CamelMimeMessage *message, gboolean to_all)
break;
d += len + 3;
}
-
+
/* Now convert that to HTML. */
repl_text = e_text_to_html (quoted_text,
E_TEXT_TO_HTML_PRE);
@@ -1685,19 +1691,19 @@ mail_generate_reply (CamelMimeMessage *message, gboolean to_all)
g_free (repl_text);
g_free (text);
}
-
+
/* Set the recipients */
repl_to = camel_mime_message_get_reply_to (message);
if (!repl_to)
repl_to = camel_mime_message_get_from (message);
to = g_list_append (NULL, (gpointer)repl_to);
-
+
if (to_all) {
const CamelInternetAddress *recip;
const char *name, *addr;
char *fulladdr;
int i;
-
+
recip = camel_mime_message_get_recipients (message,
CAMEL_RECIPIENT_TYPE_TO);
i = 0;
@@ -1710,21 +1716,19 @@ mail_generate_reply (CamelMimeMessage *message, gboolean to_all)
fulladdr = g_strdup (addr);
cc = g_list_append (cc, fulladdr);
}
-
- recip = camel_mime_message_get_recipients (message,
- CAMEL_RECIPIENT_TYPE_CC);
+
+ recip = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC);
i = 0;
while (camel_internet_address_get (recip, i++, &name, &addr)) {
if (*name) {
- fulladdr = g_strdup_printf ("\"%s\" <%s>",
- name, addr);
+ fulladdr = g_strdup_printf ("\"%s\" <%s>", name, addr);
} else
fulladdr = g_strdup (addr);
cc = g_list_append (cc, fulladdr);
}
} else
cc = NULL;
-
+
/* Set the subject of the new message. */
subject = (char *)camel_mime_message_get_subject (message);
if (!subject)
@@ -1735,12 +1739,12 @@ mail_generate_reply (CamelMimeMessage *message, gboolean to_all)
else
subject = g_strdup_printf ("Re: %s", subject);
}
-
+
e_msg_composer_set_headers (composer, to, cc, NULL, subject);
g_list_free (to);
g_list_free (cc);
g_free (subject);
-
+
/* Add In-Reply-To and References. */
message_id = camel_medium_get_header (CAMEL_MEDIUM (message),
"Message-Id");
@@ -1757,8 +1761,9 @@ mail_generate_reply (CamelMimeMessage *message, gboolean to_all)
reply_refs);
g_free (reply_refs);
}
- } else if (references)
+ } else if (references) {
e_msg_composer_add_header (composer, "References", references);
-
+ }
+
return composer;
}
1-1/+1 * converters/bibtexconv: Update to 1.1.11 [1]dbaio2017-11-183-11/+14 * Add PHP 7.2 RC6tz2017-11-165-0/+81 * Chase upgrade of lang/sbcljrm2017-11-151-1/+1 * Update to 0.58sunpoet2017-11-142-4/+4 * Update to 4.004adamw2017-11-136-12/+14 * Update to 0.57sunpoet2017-11-132-4/+4 * Update to 2.0.5sunpoet2017-11-062-4/+4 * Update to 5.6.32 release.ale2017-11-011-2/+0 * Cleanup dead master_sitesbapt2017-10-133-6/+3 * Mark as broken ports with invalid checksum or no public distfilesbapt2017-10-132-0/+3 * - Update to 0.94.0amdmi32017-10-094-31/+5 * - Mark architecture neutralantoine2017-10-081-0/+6 * Update py-bencode 1.0 to py-bencode.py 1.2.0, this is a fork that worksantoine2017-10-085-7/+10 * Update to 2.93sunpoet2017-10-072-4/+4 * Update to 2.1.7sunpoet2017-10-062-4/+4 * - Update MASTER_SITES for my portsak2017-10-051-1/+1 * converters/p5-Bencode: Update to 1.500feld2017-09-292-5/+5 * Update to 2.1.6sunpoet2017-09-282-6/+7 * Update to 2.0.4sunpoet2017-09-272-4/+4 * Update to 2.0.3sunpoet2017-09-262-4/+4 * Define ICONV_GET_ILSEQ_INVALID and ICONV_SET_ILSEQ_INVALID when mimickingtijl2017-09-262-4/+10 * Update to 2.0.2sunpoet2017-09-252-4/+4 * devel/boost-*: update to 1.65.1jbeich2017-09-251-1/+1 * devel/boost-*: enable C++11 featuresjbeich2017-09-251-1/+1 * Update LICENSEsunpoet2017-09-251-1/+2 * New ports, converters/rubygem-json-ld-preloaded andjrm2017-09-167-0/+64 * Fix license information for portgs that use "the same license as Perl".mat2017-09-1530-30/+30 * Bump PORTREVISION for ports depending on the canonical version of GCCgerald2017-09-111-1/+1 * Bump PORTREVISION on *-sbcl ports after lang/sbcl upgradejrm2017-09-071-1/+1 * Update to 3.0239sunpoet2017-08-302-4/+4 * Update to 3.0238sunpoet2017-08-272-4/+4 * Bump PORTREVISION after recent poppler updateswills2017-08-241-1/+1 * Update to 3.04sunpoet2017-08-182-4/+4 * - Update The Glorious Glasgow Haskell Compiler to version 8.0.2tcberner2017-08-0914-19/+66 * - Pass maintainership to me. marino@ is not part of FreeBSD committersacm2017-08-041-1/+0 * Update PHP 7.1 from 7.1.7 to 7.1.8tz2017-08-031-2/+0 * Update PHP 7 from 7.0.21 to 7.0.22tz2017-08-031-2/+0 * lang/php56: Change from oniguruma5 to oniguruma6tz2017-08-021-0/+2 * Update to 3.0237sunpoet2017-07-302-4/+4 * Update to 3.0236sunpoet2017-07-282-4/+4 * Update to 2.92sunpoet2017-07-192-4/+4 * - Update MASTER_SITEScpm2017-07-162-12/+12 * Simplify post-patch:sunpoet2017-07-161-10/+3 * Update modifier: use :S instead of :Csunpoet2017-07-161-1/+1 * New port: converters/rubygem-xdrantoine2017-07-144-0/+31 * PHP 7.0 and 7.1: switch to devel/oniguruma6tz2017-07-102-0/+4 * Update to 2.03sunpoet2017-07-072-4/+5 * - Update to 0.04.21wen2017-07-022-4/+4 * Remove Perl core modulessunpoet2017-06-301-3/+1 * - Update to 2.94sunpoet2017-06-282-3/+5 * Fix WWWsunpoet2017-06-251-1/+1 * Fix WWWsunpoet2017-06-251-1/+1 * Update to 2.91sunpoet2017-06-242-4/+4 * qa: add check for NO_ARCHdbn2017-06-192-2/+4 * Update to 0.30sunpoet2017-06-142-4/+4 * New port: rubygem-url_safe_base64tz2017-06-124-0/+26 * Update distinfo and unbreak this portsunpoet2017-06-111-2/+3 * Update to 2.90sunpoet2017-06-112-4/+4 * converters/p5-URI-UTF8-Punycode: Update version 1.00=>1.05bofh2017-06-063-4/+9 * - Update to 1.5tota2017-06-062-4/+4 * Remove outdated PERL_LEVEL checksunpoet2017-06-021-8/+1 * Remove outdated PERL_LEVEL checksunpoet2017-06-022-13/+1 * Add LICENSEsunpoet2017-06-011-0/+3 * Update WWWsunpoet2017-05-301-1/+1 * Add rubygem-po_to_json 1.0.1sunpoet2017-05-304-0/+31 * Mark some ports failing on power64. In cases where the error messagelinimon2017-05-221-0/+2 * converters/p5-MIME-Base32: Update version 1.301=>1.303bofh2017-05-202-3/+4 * Update to 1.0.5sunpoet2017-05-192-5/+9 * - Update maintainer addressjoneum2017-05-161-1/+1 * Update to 3.0233sunpoet2017-05-042-4/+4 * - Update to 1.4tota2017-05-042-4/+4 * - Update devel/libical to version 2.0pawel2017-05-041-1/+7 * devel/boost-*: update to 1.64.0jbeich2017-05-021-0/+1 * - Fix shebangsmiwi2017-04-221-1/+3 * Update to 2.89sunpoet2017-04-222-4/+4 * - Update to 0.92.1amdmi32017-04-204-8/+8 * Convert all PECL ports to USES=php:pecl.mat2017-04-102-9/+2 * Update to 11.5sunpoet2017-04-074-30/+58 * - Update WWWamdmi32017-04-062-2/+2 * Bump PORTREVISIONs for ports depending on the canonical version of GCC andgerald2017-04-011-1/+1 * Update to 3.0231sunpoet2017-03-302-4/+4 * - Update converters/ytnef to version 1.9.2, now hosted on GitHubpawel2017-03-305-41/+31 * Update to 0.12.4grembo2017-03-274-9/+143 * Update to 0.29sunpoet2017-03-252-3/+4 * - Fix LICENSEamdmi32017-03-222-2/+3 * Fix typosunpoet2017-03-151-1/+1 * Update to 3.0230sunpoet2017-03-132-4/+4 * Update to 3.0229sunpoet2017-03-112-4/+4 * Update to 3.0228sunpoet2017-03-102-4/+4 * converters/p5-Encode-Punycode: Update version 1.001=>1.002bofh2017-03-052-4/+7 * - Update to 0.04.20wen2017-03-032-4/+6 * Update to 1.003009sunpoet2017-02-282-4/+4 * Update to 3.0227sunpoet2017-02-142-4/+4 * Update to 3.0226sunpoet2017-02-122-4/+4 * - Update to 0.92.0 and unbreak by switching geos dependency to graphics/geos35amdmi32017-02-074-25/+37 * Mark ports not building with PHP 7.1.mat2017-02-072-2/+2 * Update to 1.30sunpoet2017-02-033-4/+85 * Fix r433199sunpoet2017-02-031-4/+4 * Add LICENSEsunpoet2017-02-031-0/+4 * converters/iconv-extra: unbreak on 12.0 after base r306297jbeich2017-02-021-0/+15 * converters/iconv: unbreak on 12.0 after base r306297jbeich2017-02-021-0/+23 * converters/fix-mime-charset: unbreak with libc++ 3.9jbeich2017-02-021-0/+9 * Update to 1.3.4sunpoet2017-02-023-4/+6 * Remove expired ports:rene2017-01-284-39/+0 * Connect PHP 7.1 ports (r432324)tz2017-01-241-0/+3 * Add PHP 7.1tz2017-01-244-0/+78 * Update default GEM_NAMEsunpoet2017-01-221-1/+0 * converters/wkhtmltopdf: unbreak with clang 4.0 (same as r431742)jbeich2017-01-211-0/+21 * Update WWW: SF redirects to https://sourceforge.net/projects/<PROJECT_NAME>/sunpoet2017-01-211-1/+1 * Update WWW: remove trailing /sunpoet2017-01-201-1/+1 * - Add NO_ARCHamdmi32017-01-121-1/+2 * Fix *_DEPENDS: remove Perl core modulessunpoet2017-01-111-2/+3 * Update WWWehaupt2017-01-081-1/+1 * Chase update of graphics/poppler (and slaves ports) in revision r430777olivierd2017-01-071-1/+1 * devel/boost-*: update to 1.63.0jbeich2017-01-061-1/+1 * Update to 1.0.vanilla2017-01-062-4/+4 * - Update to 1.2tota2016-12-312-4/+4 * converters/ruby-dump.rb: deprecateswills2016-12-281-0/+3 * Add an EXPIRATION_DATE to DEPRECATED ports without one.mat2016-12-261-0/+1 * Revert r428451 and unbreakantoine2016-12-241-0/+1 * - Update to 2.0.1sunpoet2016-12-222-5/+4 * - Update WWW: pear.php.net uses https://sunpoet2016-12-131-1/+1 * - Update WWW: pecl.php.net uses https://sunpoet2016-12-132-2/+2 * - Remove unnecessary GEM_NAMEsunpoet2016-12-131-4/+1 * - Add LICENSEsunpoet2016-12-091-0/+3 * Remove expired ports:rene2016-12-094-40/+0 * Remove libintl.so.9 compatibility link that was added in r374303 totijl2016-12-092-1/+2 * Remove libiconv.so.3 compatibility link that was added in r374303 totijl2016-12-096-7/+5 * Remove libexpat.so.6 compatibility link that was added in r374303 totijl2016-12-091-1/+1 * Remove libcurl.so.7 compatibility link that was added in r374303 totijl2016-12-091-0/+1 * http://github.com redirects to https://github.com, spare everyone a redirect.mat2016-12-023-3/+3 * Mark broken.mat2016-12-011-0/+2 * Don't quote {} in find -exec calls.mat2016-12-011-1/+1 * - Update to 2.88sunpoet2016-12-012-5/+5 * Fetch a distfile directly from GitHubknu2016-11-272-7/+8 * - Fix installation of igbinary.h and php_igbinary.hsunpoet2016-11-261-1/+13 * - Update to 3.0225sunpoet2016-11-252-4/+4 * devel/boost-*: update to 1.62.0jbeich2016-11-231-1/+1 * In several dozen ports, use single space for WWW: line in pkg-descr, anddanfe2016-11-221-3/+3 * - Upgrade to 0.08.kuriyama2016-11-223-3/+7 * - Update to 2.0.0sunpoet2016-11-212-5/+4 * - Update to 3.0224sunpoet2016-11-212-4/+4 * - Update to 3.03sunpoet2016-11-202-3/+4 * - Update to 3.0223sunpoet2016-11-202-4/+4 * converters/py-bcode: Fix python dependencyfeld2016-11-161-1/+2 * Mark as broken on various tier-2 archs.linimon2016-11-141-2/+5 * Chase print/py-reportlab2 expirationantoine2016-11-091-0/+3 * - Update to 1.003008sunpoet2016-11-072-4/+13 * - Update to 2.87sunpoet2016-11-072-3/+4 * - Update to 3.0222sunpoet2016-11-072-4/+4 * OSVERSION needs the pre/post.mk dance.linimon2016-11-041-1/+3 * Pass maintainership of PEAR ports to the submitterjbeich2016-11-031-1/+1 * Cleanup no longer needed CHMOD usage after r424898.mat2016-11-03