summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a462ac9)
* Now we use the custom modest method to know if a mime
part is an attached message (as it was failing for "file as
message" attachments).
* src/widgets/modest-attachment-view.c:
* Now we show the filename of the attachment even if it's
a TnyMsg. This makes "file as message" attachments show
the proper name (fixes NB#81527).
pmo-trunk-r4253
#include "modest-debug.h"
#include "modest-tny-folder.h"
#include "modest-tny-account.h"
#include "modest-debug.h"
#include "modest-tny-folder.h"
#include "modest-tny-account.h"
+#include "modest-tny-mime-part.h"
#include "modest-text-utils.h"
#include <widgets/modest-attachments-view.h>
#include <modest-runtime.h>
#include "modest-text-utils.h"
#include <widgets/modest-attachments-view.h>
#include <modest-runtime.h>
while (!tny_iterator_is_done (iter) && !result) {
TnyMimePart *mime_part = TNY_MIME_PART (tny_iterator_get_current (iter));
TnyList *nested_list = tny_simple_list_new ();
while (!tny_iterator_is_done (iter) && !result) {
TnyMimePart *mime_part = TNY_MIME_PART (tny_iterator_get_current (iter));
TnyList *nested_list = tny_simple_list_new ();
- if (!for_remove && TNY_IS_MSG (mime_part)) {
+ if (!for_remove && modest_tny_mime_part_is_msg (mime_part)) {
selected_messages = TRUE;
result = TRUE;
}
selected_messages = TRUE;
result = TRUE;
}
if (TNY_IS_MSG (mime_part)) {
TnyHeader *header = tny_msg_get_header (TNY_MSG (mime_part));
if (TNY_IS_HEADER (header)) {
if (TNY_IS_MSG (mime_part)) {
TnyHeader *header = tny_msg_get_header (TNY_MSG (mime_part));
if (TNY_IS_HEADER (header)) {
- filename = g_strdup (tny_header_get_subject (header));
+ filename = g_strdup (tny_mime_part_get_filename (mime_part));
+ if (!filename)
+ filename = g_strdup (tny_header_get_subject (header));
if (filename == NULL || filename[0] == '\0')
filename = g_strdup (_("mail_va_no_subject"));
if (priv->is_purged)
if (filename == NULL || filename[0] == '\0')
filename = g_strdup (_("mail_va_no_subject"));
if (priv->is_purged)