From f575a7626a769b0a99e080944749958d644d4aef Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 24 May 2009 11:54:43 -0400 Subject: Eliminate redundant E_ICON_SIZE_* enumeration. --- mail/em-format-html.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mail/em-format-html.c') diff --git a/mail/em-format-html.c b/mail/em-format-html.c index 23926f8ed6..6d116a69ba 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -700,7 +700,7 @@ efh_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Camel icon = smime_sign_table[valid->sign.status].icon; else icon = smime_encrypt_table[valid->encrypt.status].icon; - iconpath = e_icon_factory_get_icon_filename(icon, E_ICON_SIZE_DIALOG); + iconpath = e_icon_factory_get_icon_filename(icon, GTK_ICON_SIZE_DIALOG); iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", iconpath); if (iconpart) { (void)em_format_add_puri(emf, sizeof(EMFormatPURI), classid, iconpart, efh_write_image); -- cgit v1.2.3 From 0cf607076dfc2c481ca1164a04cecdb0661e6bd0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 26 May 2009 10:58:25 -0400 Subject: Fix compiler warnings in mail. --- mail/em-format-html.c | 56 +++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'mail/em-format-html.c') diff --git a/mail/em-format-html.c b/mail/em-format-html.c index 6d116a69ba..d0172ea8ef 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -1176,40 +1176,40 @@ efh_image(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatH } static EMFormatHandler type_builtin_table[] = { - { "image/gif", (EMFormatFunc)efh_image }, - { "image/jpeg", (EMFormatFunc)efh_image }, - { "image/png", (EMFormatFunc)efh_image }, - { "image/x-png", (EMFormatFunc)efh_image }, - { "image/tiff", (EMFormatFunc)efh_image }, - { "image/x-bmp", (EMFormatFunc)efh_image }, - { "image/bmp", (EMFormatFunc)efh_image }, - { "image/svg", (EMFormatFunc)efh_image }, - { "image/x-cmu-raster", (EMFormatFunc)efh_image }, - { "image/x-ico", (EMFormatFunc)efh_image }, - { "image/x-portable-anymap", (EMFormatFunc)efh_image }, - { "image/x-portable-bitmap", (EMFormatFunc)efh_image }, - { "image/x-portable-graymap", (EMFormatFunc)efh_image }, - { "image/x-portable-pixmap", (EMFormatFunc)efh_image }, - { "image/x-xpixmap", (EMFormatFunc)efh_image }, - { "text/enriched", (EMFormatFunc)efh_text_enriched }, - { "text/plain", (EMFormatFunc)efh_text_plain }, - { "text/html", (EMFormatFunc)efh_text_html }, - { "text/richtext", (EMFormatFunc)efh_text_enriched }, - { "text/*", (EMFormatFunc)efh_text_plain }, - { "message/external-body", (EMFormatFunc)efh_message_external }, - { "message/delivery-status", (EMFormatFunc)efh_message_deliverystatus }, - { "multipart/related", (EMFormatFunc)efh_multipart_related }, + { (gchar *) "image/gif", (EMFormatFunc)efh_image }, + { (gchar *) "image/jpeg", (EMFormatFunc)efh_image }, + { (gchar *) "image/png", (EMFormatFunc)efh_image }, + { (gchar *) "image/x-png", (EMFormatFunc)efh_image }, + { (gchar *) "image/tiff", (EMFormatFunc)efh_image }, + { (gchar *) "image/x-bmp", (EMFormatFunc)efh_image }, + { (gchar *) "image/bmp", (EMFormatFunc)efh_image }, + { (gchar *) "image/svg", (EMFormatFunc)efh_image }, + { (gchar *) "image/x-cmu-raster", (EMFormatFunc)efh_image }, + { (gchar *) "image/x-ico", (EMFormatFunc)efh_image }, + { (gchar *) "image/x-portable-anymap", (EMFormatFunc)efh_image }, + { (gchar *) "image/x-portable-bitmap", (EMFormatFunc)efh_image }, + { (gchar *) "image/x-portable-graymap", (EMFormatFunc)efh_image }, + { (gchar *) "image/x-portable-pixmap", (EMFormatFunc)efh_image }, + { (gchar *) "image/x-xpixmap", (EMFormatFunc)efh_image }, + { (gchar *) "text/enriched", (EMFormatFunc)efh_text_enriched }, + { (gchar *) "text/plain", (EMFormatFunc)efh_text_plain }, + { (gchar *) "text/html", (EMFormatFunc)efh_text_html }, + { (gchar *) "text/richtext", (EMFormatFunc)efh_text_enriched }, + { (gchar *) "text/*", (EMFormatFunc)efh_text_plain }, + { (gchar *) "message/external-body", (EMFormatFunc)efh_message_external }, + { (gchar *) "message/delivery-status", (EMFormatFunc)efh_message_deliverystatus }, + { (gchar *) "multipart/related", (EMFormatFunc)efh_multipart_related }, /* This is where one adds those busted, non-registered types, that some idiot mailer writers out there decide to pull out of their proverbials at random. */ - { "image/jpg", (EMFormatFunc)efh_image }, - { "image/pjpeg", (EMFormatFunc)efh_image }, + { (gchar *) "image/jpg", (EMFormatFunc)efh_image }, + { (gchar *) "image/pjpeg", (EMFormatFunc)efh_image }, /* special internal types */ - { "x-evolution/message/rfc822", (EMFormatFunc)efh_format_message } + { (gchar *) "x-evolution/message/rfc822", (EMFormatFunc)efh_format_message } }; static void @@ -1547,7 +1547,7 @@ efh_format_text_header (EMFormatHTML *emfh, CamelStream *stream, const char *lab g_free(mhtml); } -static char *addrspec_hdrs[] = { +static const gchar *addrspec_hdrs[] = { "Sender", "From", "Reply-To", "To", "Cc", "Bcc", "Resent-Sender", "Resent-From", "Resent-Reply-To", "Resent-To", "Resent-Cc", "Resent-Bcc", NULL @@ -1967,7 +1967,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) if (!use_header) use_header = header; - xmailer.name = "X-Evolution-Mailer"; + xmailer.name = (gchar *) "X-Evolution-Mailer"; xmailer.value = use_header->value; mailer_shown = TRUE; -- cgit v1.2.3 From e4afd3f9fb962ea1295a0657ec9f83a427829171 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 26 May 2009 23:21:02 -0400 Subject: Remove trailing whitespace, again. --- mail/em-format-html.c | 70 +++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'mail/em-format-html.c') diff --git a/mail/em-format-html.c b/mail/em-format-html.c index d0172ea8ef..aa82851bc9 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -10,7 +10,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see + * License along with the program; if not, see * * * Authors: @@ -1500,18 +1500,18 @@ efh_format_text_header (EMFormatHTML *emfh, CamelStream *stream, const char *lab const char *fmt, *html; char *mhtml = NULL; gboolean is_rtl; - + if (value == NULL) return; while (*value == ' ') value++; - + if (!(flags & EM_FORMAT_HTML_HEADER_HTML)) html = mhtml = camel_text_to_html (value, emfh->text_html_flags, 0); - else + else html = value; - + is_rtl = gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL; if (emfh->simple_headers) { fmt = "%s: %s
"; @@ -1528,7 +1528,7 @@ efh_format_text_header (EMFormatHTML *emfh, CamelStream *stream, const char *lab else fmt = "%s %s"; } else { - + if (flags & EM_FORMAT_HEADER_BOLD) { if (is_rtl) fmt = "%2$s%1$s: "; @@ -1667,22 +1667,22 @@ static void canon_header_name (char *name) { char *inptr = name; - + /* canonicalise the header name... first letter is * capitalised and any letter following a '-' also gets * capitalised */ - + if (*inptr >= 'a' && *inptr <= 'z') *inptr -= 0x20; - + inptr++; - + while (*inptr) { if (inptr[-1] == '-' && *inptr >= 'a' && *inptr <= 'z') *inptr -= 0x20; else if (*inptr >= 'A' && *inptr <= 'Z') *inptr += 0x20; - + inptr++; } } @@ -1707,22 +1707,22 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct break; } } - + label = _(name); - + if (addrspec) { struct _camel_header_address *addrs; GString *html; char *img; - + buf = camel_header_unfold (header->value); if (!(addrs = camel_header_address_decode (buf, emf->charset ? emf->charset : emf->default_charset))) { g_free (buf); return; } - + g_free (buf); - + html = g_string_new(""); img = efh_format_address(efh, html, addrs, (char *)label); @@ -1732,7 +1732,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct flags |= EM_FORMAT_HTML_HEADER_NODEC; g_free (img); } - + camel_header_address_unref(addrs); txt = value = html->str; g_string_free(html, FALSE); @@ -1742,7 +1742,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct buf = camel_header_unfold (header->value); txt = value = camel_header_decode_string (buf, charset); g_free (buf); - + flags |= EM_FORMAT_HEADER_BOLD; } else if (!strcmp(name, "X-evolution-mailer")) { /* pseudo-header */ @@ -1769,7 +1769,7 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct if (msg_offset) { char buf[256], *html; - + msg_offset += (local.tm_hour * 60) + local.tm_min; if (msg_offset >= (24 * 60) || msg_offset < 0) { /* translators: strftime format for local time equivalent in Date header display, with day */ @@ -1782,27 +1782,27 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct e_utf8_strftime(buf, sizeof(buf), msg, &local); g_free(msg); } - + html = camel_text_to_html(txt, efh->text_html_flags, 0); txt = value = g_strdup_printf("%s %s", html, buf); g_free(html); flags |= EM_FORMAT_HTML_HEADER_HTML; } - + flags |= EM_FORMAT_HEADER_BOLD; } else if (!strcmp(name, "Newsgroups")) { struct _camel_header_newsgroup *ng, *scan; GString *html; - + buf = camel_header_unfold (header->value); - + if (!(ng = camel_header_newsgroups_decode (buf))) { g_free (buf); return; } - + g_free (buf); - + html = g_string_new(""); scan = ng; while (scan) { @@ -1811,9 +1811,9 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct if (scan) g_string_append_printf(html, ", "); } - + camel_header_newsgroups_free(ng); - + txt = html->str; g_string_free(html, FALSE); flags |= EM_FORMAT_HEADER_BOLD|EM_FORMAT_HTML_HEADER_HTML; @@ -1826,9 +1826,9 @@ efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct txt = value = camel_header_decode_string (buf, charset); g_free (buf); } - + efh_format_text_header(efh, stream, label, txt, flags); - + g_free (value); g_free (str_field); } @@ -1850,7 +1850,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) char *header_sender = NULL, *header_from = NULL, *name; gboolean mail_from_delegate = FALSE; const char *hdr_charset; - + if (!part) return; @@ -1863,9 +1863,9 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) "\n" "", efh->header_colour & 0xffffff); - + hdr_charset = emf->charset ? emf->charset : emf->default_charset; - + header = ((CamelMimePart *)part)->headers; while (header) { if (!g_ascii_strcasecmp (header->name, "Sender")) { @@ -1904,7 +1904,7 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) header = header->next; } - + if (header_sender && header_from && mail_from_delegate) { camel_stream_printf(stream, "
"); if(gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL) @@ -1976,11 +1976,11 @@ efh_format_headers(EMFormatHTML *efh, CamelStream *stream, CamelMedium *part) have_icon = TRUE; } else if (!face_decoded && face && !g_ascii_strcasecmp (header->name, "Face")) { char *cp = header->value; - + /* Skip over spaces */ while (*cp == ' ') cp++; - + face_header_value = g_base64_decode (cp, &face_header_len); face_header_value = g_realloc (face_header_value, face_header_len + 1); face_header_value[face_header_len] = 0; -- cgit v1.2.3