projects
/
modest
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8582713
)
Show other bodies in attachment as other messages.
author
Jose Dapena Paz
<jdapena@igalia.com>
Thu, 21 May 2009 09:51:36 +0000
(11:51 +0200)
committer
Jose Dapena Paz
<jdapena@igalia.com>
Fri, 22 May 2009 10:48:44 +0000
(12:48 +0200)
src/widgets/modest-attachment-view.c
patch
|
blob
|
history
diff --git
a/src/widgets/modest-attachment-view.c
b/src/widgets/modest-attachment-view.c
index
f77cbc5
..
2e90fb2
100644
(file)
--- a/
src/widgets/modest-attachment-view.c
+++ b/
src/widgets/modest-attachment-view.c
@@
-282,13
+282,31
@@
modest_attachment_view_set_part_default (TnyMimePartView *self, TnyMimePart *mim
g_object_unref (header);
}
} else {
g_object_unref (header);
}
} else {
+ gboolean is_other_body = FALSE;
filename = g_strdup (tny_mime_part_get_filename (mime_part));
filename = g_strdup (tny_mime_part_get_filename (mime_part));
+ if (filename == NULL) {
+ gchar *description;
+ description = modest_tny_mime_part_get_header_value (mime_part, "Content-Description");
+ if (description) {
+ g_strstrip (description);
+ filename = description;
+ }
+ if (!filename || filename[0] == '\0') {
+ g_free (filename);
+ filename = g_strdup (_("mail_va_no_subject"));
+ }
+ is_other_body = TRUE;
+ }
if (priv->is_purged) {
file_icon_name = modest_platform_get_file_icon_name (NULL, NULL, NULL);
} else {
if (priv->is_purged) {
file_icon_name = modest_platform_get_file_icon_name (NULL, NULL, NULL);
} else {
- file_icon_name = modest_platform_get_file_icon_name (
- filename, modest_tny_mime_part_get_content_type (mime_part), NULL);
- show_size = TRUE;
+ if (is_other_body) {
+ file_icon_name = modest_platform_get_file_icon_name (NULL, "message/rfc822", NULL);
+ } else {
+ file_icon_name = modest_platform_get_file_icon_name (
+ filename, modest_tny_mime_part_get_content_type (mime_part), NULL);
+ show_size = TRUE;
+ }
}
}
}
}