[Commits] [SCM] claws branch, master, updated. 3.17.4-75-gd2a8e9238

paul at claws-mail.org paul at claws-mail.org
Sun Dec 1 13:52:48 CET 2019


The branch, master has been updated
       via  d2a8e92380b80937b5b52b70696dacc47c929558 (commit)
      from  5f1063a0c8ee9b782504cf93c967c4541355cd1e (commit)

Summary of changes:
 src/image_viewer.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit d2a8e92380b80937b5b52b70696dacc47c929558
Author: Paul <paul at claws-mail.org>
Date:   Sun Dec 1 12:52:43 2019 +0000

    if image attachment doesn't have a "name", show "filename" instead

diff --git a/src/image_viewer.c b/src/image_viewer.c
index c37fd2232..6a0ce40f4 100644
--- a/src/image_viewer.c
+++ b/src/image_viewer.c
@@ -177,7 +177,9 @@ static void image_viewer_show_mimepart(MimeViewer *_mimeviewer, const gchar *fil
 	imageviewer->mimeinfo = mimeinfo;
 
 	gtk_label_set_text(GTK_LABEL(imageviewer->filename),
-			   procmime_mimeinfo_get_parameter(mimeinfo, "name"));
+			   (procmime_mimeinfo_get_parameter(mimeinfo, "name") != NULL)?
+			   procmime_mimeinfo_get_parameter(mimeinfo, "name") :
+			   procmime_mimeinfo_get_parameter(mimeinfo, "filename"));
 	gtk_label_set_text(GTK_LABEL(imageviewer->filesize), to_human_readable((goffset)mimeinfo->length));
 	gtk_label_set_text(GTK_LABEL(imageviewer->content_type), mimeinfo->subtype);
 	gtk_label_set_text(GTK_LABEL(imageviewer->error_lbl), "");

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list