aboutsummaryrefslogtreecommitdiffstats
path: root/em-format
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-05-30 00:32:32 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-05-30 01:09:36 +0800
commit9b9d1935d74818bfbaf32160fa8458be5d86ecd9 (patch)
tree30d2482efef2174def60cc418f40ab8a2fda0b58 /em-format
parentd845222a117a665f25e4d6e110760c8908182336 (diff)
downloadgsoc2013-evolution-9b9d1935d74818bfbaf32160fa8458be5d86ecd9.tar
gsoc2013-evolution-9b9d1935d74818bfbaf32160fa8458be5d86ecd9.tar.gz
gsoc2013-evolution-9b9d1935d74818bfbaf32160fa8458be5d86ecd9.tar.bz2
gsoc2013-evolution-9b9d1935d74818bfbaf32160fa8458be5d86ecd9.tar.lz
gsoc2013-evolution-9b9d1935d74818bfbaf32160fa8458be5d86ecd9.tar.xz
gsoc2013-evolution-9b9d1935d74818bfbaf32160fa8458be5d86ecd9.tar.zst
gsoc2013-evolution-9b9d1935d74818bfbaf32160fa8458be5d86ecd9.zip
Remove Evolution icon from header section.
We don't show an icon for other mailers, and the tiny 16x16 pixel icon looks stupid next to the much larger contact/gravatar image.
Diffstat (limited to 'em-format')
-rw-r--r--em-format/e-mail-formatter-headers.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/em-format/e-mail-formatter-headers.c b/em-format/e-mail-formatter-headers.c
index 39aceb30c7..358ed01b65 100644
--- a/em-format/e-mail-formatter-headers.c
+++ b/em-format/e-mail-formatter-headers.c
@@ -199,36 +199,6 @@ write_contact_picture (CamelMimePart *part,
g_free (content_type);
}
-static CamelMimePart *
-load_picture_from_file (const gchar *mime_type,
- const gchar *filename,
- GCancellable *cancellable)
-{
- CamelMimePart *part;
- CamelStream *stream;
- CamelDataWrapper *dw;
- gchar *basename;
-
- stream = camel_stream_fs_new_with_name (filename, O_RDONLY, 0, NULL);
- if (stream == NULL)
- return NULL;
-
- dw = camel_data_wrapper_new ();
- camel_data_wrapper_construct_from_stream_sync (
- dw, stream, cancellable, NULL);
- g_object_unref (stream);
- if (mime_type)
- camel_data_wrapper_set_mime_type (dw, mime_type);
- part = camel_mime_part_new ();
- camel_medium_set_content ((CamelMedium *) part, dw);
- g_object_unref (dw);
- basename = g_path_get_basename (filename);
- camel_mime_part_set_filename (part, basename);
- g_free (basename);
-
- return part;
-}
-
static void
format_full_headers (EMailFormatter *formatter,
GString *buffer,
@@ -240,7 +210,6 @@ format_full_headers (EMailFormatter *formatter,
const gchar *charset;
CamelContentType *ct;
struct _camel_header_raw *header;
- gboolean have_icon = FALSE;
const gchar *photo_name = NULL;
gboolean face_decoded = FALSE, contact_has_photo = FALSE;
guchar *face_header_value = NULL;
@@ -426,8 +395,6 @@ format_full_headers (EMailFormatter *formatter,
e_mail_formatter_format_header (
formatter, buffer, part,
&xmailer, h->flags, charset);
- if (strstr (use_header->value, "Evolution"))
- have_icon = TRUE;
} else if (!face_decoded && face && !g_ascii_strcasecmp (header->name, "Face")) {
gchar *cp = header->value;
@@ -496,31 +463,6 @@ format_full_headers (EMailFormatter *formatter,
g_free (face_header_value);
}
- if (have_icon) {
- GtkIconInfo *icon_info;
- CamelMimePart *iconpart = NULL;
-
- icon_info = gtk_icon_theme_lookup_icon (
- gtk_icon_theme_get_default (),
- "evolution", 16, GTK_ICON_LOOKUP_NO_SVG);
- if (icon_info != NULL) {
- iconpart = load_picture_from_file (
- "image/png",
- gtk_icon_info_get_filename (icon_info),
- cancellable);
- gtk_icon_info_free (icon_info);
- }
- if (iconpart != NULL) {
- g_string_append (
- buffer,
- "<td align=\"right\" valign=\"top\">");
- write_contact_picture (iconpart, 16, buffer);
- g_string_append (buffer, "</td>");
-
- g_object_unref (iconpart);
- }
- }
-
g_string_append (buffer, "</tr></table>");
}