aboutsummaryrefslogtreecommitdiffstats
path: root/em-format
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-08 00:22:36 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:10 +0800
commit578214584caa7805edca09b27e2306dc31d80fb6 (patch)
treedfa18882e01b362a721fd47bd901538bc5e3a9c4 /em-format
parent30fe010cffa6f290170147ea9a8b617d04fab39d (diff)
downloadgsoc2013-evolution-578214584caa7805edca09b27e2306dc31d80fb6.tar
gsoc2013-evolution-578214584caa7805edca09b27e2306dc31d80fb6.tar.gz
gsoc2013-evolution-578214584caa7805edca09b27e2306dc31d80fb6.tar.bz2
gsoc2013-evolution-578214584caa7805edca09b27e2306dc31d80fb6.tar.lz
gsoc2013-evolution-578214584caa7805edca09b27e2306dc31d80fb6.tar.xz
gsoc2013-evolution-578214584caa7805edca09b27e2306dc31d80fb6.tar.zst
gsoc2013-evolution-578214584caa7805edca09b27e2306dc31d80fb6.zip
Whitespace and coding style cleanups.
Diffstat (limited to 'em-format')
-rw-r--r--em-format/em-format-quote.c14
-rw-r--r--em-format/em-format.c35
-rw-r--r--em-format/em-stripsig-filter.c4
3 files changed, 38 insertions, 15 deletions
diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c
index e54ecf60ac..be07485e3b 100644
--- a/em-format/em-format-quote.c
+++ b/em-format/em-format-quote.c
@@ -73,7 +73,8 @@ emfq_format_clone (EMFormat *emf,
gconf = gconf_client_get_default ();
camel_stream_reset (emfq->stream, NULL);
- if (gconf_client_get_bool(gconf, "/apps/evolution/mail/composer/top_signature", NULL))
+ if (gconf_client_get_bool (
+ gconf, "/apps/evolution/mail/composer/top_signature", NULL))
camel_stream_printf (emfq->stream, "<br>\n");
g_object_unref (gconf);
handle = em_format_find_handler(emf, "x-evolution/message/prefix");
@@ -696,14 +697,19 @@ emfq_text_html (EMFormat *emf,
filtered_stream = camel_stream_filter_new (stream);
sig_strip = em_stripsig_filter_new (FALSE);
- camel_stream_filter_add (CAMEL_STREAM_FILTER (filtered_stream), sig_strip);
+ camel_stream_filter_add (
+ CAMEL_STREAM_FILTER (filtered_stream), sig_strip);
g_object_unref (sig_strip);
- em_format_format_text (emf, filtered_stream, (CamelDataWrapper *) part, cancellable);
+ em_format_format_text (
+ emf, filtered_stream,
+ (CamelDataWrapper *) part, cancellable);
camel_stream_flush (filtered_stream, cancellable, NULL);
g_object_unref (filtered_stream);
} else {
- em_format_format_text (emf, stream, (CamelDataWrapper *)part, cancellable);
+ em_format_format_text (
+ emf, stream,
+ (CamelDataWrapper *) part, cancellable);
}
}
diff --git a/em-format/em-format.c b/em-format/em-format.c
index 26f0897223..6f3d547081 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -484,9 +484,12 @@ em_format_class_remove_handler (EMFormatClass *emfc,
if (current == info) {
current = info->old;
if (current)
- g_hash_table_insert (emfc->type_handlers, (gpointer) current->mime_type, current);
+ g_hash_table_insert (
+ emfc->type_handlers,
+ (gpointer) current->mime_type, current);
else
- g_hash_table_remove (emfc->type_handlers, info->mime_type);
+ g_hash_table_remove (
+ emfc->type_handlers, info->mime_type);
} else {
while (current && current->old != info)
current = current->old;
@@ -1417,8 +1420,9 @@ em_format_format_text (EMFormat *emf,
camel_stream_reset (mem_stream, NULL);
if (max == -1 || size == -1 || size < (max * 1024) || emf->composer) {
- camel_stream_write_to_stream (mem_stream, (CamelStream *)stream, cancellable, NULL);
- camel_stream_flush ((CamelStream *)stream, cancellable, NULL);
+ camel_stream_write_to_stream (
+ mem_stream, (CamelStream *) stream, cancellable, NULL);
+ camel_stream_flush ((CamelStream *) stream, cancellable, NULL);
} else {
EM_FORMAT_GET_CLASS (emf)->format_optional (
emf, stream, (CamelMimePart *)dw,
@@ -1594,10 +1598,12 @@ emf_multipart_appledouble (EMFormat *emf,
GCancellable *cancellable,
gboolean is_fallback)
{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+ CamelMultipart *mp;
CamelMimePart *mime_part;
gint len;
+ mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+
if (!CAMEL_IS_MULTIPART (mp)) {
em_format_format_source (emf, stream, part, cancellable);
return;
@@ -1624,9 +1630,11 @@ emf_multipart_mixed (EMFormat *emf,
GCancellable *cancellable,
gboolean is_fallback)
{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+ CamelMultipart *mp;
gint i, nparts, len;
+ mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+
if (!CAMEL_IS_MULTIPART (mp)) {
em_format_format_source (emf, stream, part, cancellable);
return;
@@ -1651,10 +1659,12 @@ emf_multipart_alternative (EMFormat *emf,
GCancellable *cancellable,
gboolean is_fallback)
{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+ CamelMultipart *mp;
gint i, nparts, bestid = 0;
CamelMimePart *best = NULL;
+ mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+
if (!CAMEL_IS_MULTIPART (mp)) {
em_format_format_source (emf, stream, part, cancellable);
return;
@@ -1753,7 +1763,8 @@ emf_multipart_encrypted (EMFormat *emf,
}
/* Currently we only handle RFC2015-style PGP encryption. */
- protocol = camel_content_type_param(((CamelDataWrapper *)mpe)->mime_type, "protocol");
+ protocol = camel_content_type_param (
+ ((CamelDataWrapper *)mpe)->mime_type, "protocol");
if (!protocol || g_ascii_strcasecmp (protocol, "application/pgp-encrypted") != 0) {
em_format_format_error (
emf, stream, _("Unsupported encryption "
@@ -1822,7 +1833,7 @@ emf_multipart_related (EMFormat *emf,
GCancellable *cancellable,
gboolean is_fallback)
{
- CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+ CamelMultipart *mp;
CamelMimePart *body_part, *display_part = NULL;
CamelContentType *content_type;
const gchar *start;
@@ -1830,6 +1841,8 @@ emf_multipart_related (EMFormat *emf,
gchar *oldpartid;
GList *link;
+ mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part);
+
if (!CAMEL_IS_MULTIPART (mp)) {
em_format_format_source (emf, stream, part, cancellable);
return;
@@ -2148,7 +2161,9 @@ emf_inlinepgp_signed (EMFormat *emf,
return;
}
- emf->validity_found |= EM_FORMAT_VALIDITY_FOUND_SIGNED | EM_FORMAT_VALIDITY_FOUND_PGP;
+ emf->validity_found |=
+ EM_FORMAT_VALIDITY_FOUND_SIGNED |
+ EM_FORMAT_VALIDITY_FOUND_PGP;
cipher = camel_gpg_context_new (emf->session);
/* Verify the signature of the message */
diff --git a/em-format/em-stripsig-filter.c b/em-format/em-stripsig-filter.c
index bbca2f6161..fe08383d5c 100644
--- a/em-format/em-stripsig-filter.c
+++ b/em-format/em-stripsig-filter.c
@@ -61,7 +61,9 @@ strip_signature (CamelMimeFilter *filter,
if ((inend - inptr) >= 4 && !strncmp (inptr, "-- \n", 4)) {
start = inptr;
inptr += 4;
- } else if (!stripsig->text_plain_only && (inend - inptr) >= 7 && !g_ascii_strncasecmp (inptr, "-- <BR>", 7)) {
+ } else if (!stripsig->text_plain_only &&
+ (inend - inptr) >= 7 &&
+ !g_ascii_strncasecmp (inptr, "-- <BR>", 7)) {
start = inptr;
inptr += 7;
} else {