Bug 80193 - MIME type of attachment in Tree not shown but in property dialog it is
Summary: MIME type of attachment in Tree not shown but in property dialog it is
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: mime (show other bugs)
Version: 1.6.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-23 13:36 UTC by Martin Koller
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Koller 2004-04-23 13:36:59 UTC
Version:           1.6.1 (using KDE 3.2.1, compiled sources)
Compiler:          gcc version 3.2.3
OS:          Linux (i686) release 2.4.22

I have a mail, which has a MS-word document attached.
In the MIME Tree the column for its Type is empty, but when I right-click on the attachment and open the property editor, I see here the Type to be "application/msword".

headers of the mail contain:
From: "XX XXX" <XX@XX.com>
To: <XX@XX.com>
Subject: SNMP-Doku
Date: Mon, 19 Apr 2004 10:06:38 +0200
Organization: XXX
Message-ID: <000001c425e5$3e1887b0$1c96a8c0@XX.com>
MIME-Version: 1.0
Content-Type: multipart/mixed;
  boundary="----=_NextPart_000_0001_01C425F6.01A3A1A0"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.6626
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Importance: Normal
X-Spam: no; 0.00; 
X-Attachments: type="application/msword" name="SNMP.doc" name="SNMP.doc" 
X-UID: 
Status: RO
X-Status: R
X-KMail-EncryptionState: N
X-KMail-SignatureState: N
X-KMail-MDN-Sent:  

This is a multi-part message in MIME format.

------=_NextPart_000_0001_01C425F6.01A3A1A0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hallo Martin!

<snip>

------=_NextPart_000_0001_01C425F6.01A3A1A0
Content-Type: application/msword;
	name="SNMP.doc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="SNMP.doc"

<snip>
Comment 1 Martin Koller 2004-07-25 15:15:29 UTC
I found this due to the MIME-Type not having a description.
Following patch solves this:

Index: kmmimeparttree.cpp
===================================================================
RCS file: /home/kde/kdepim/kmail/kmmimeparttree.cpp,v
retrieving revision 1.54
diff -u -3 -p -r1.54 kmmimeparttree.cpp
--- kmmimeparttree.cpp  5 Jun 2004 17:04:41 -0000       1.54
+++ kmmimeparttree.cpp  25 Jul 2004 13:12:55 -0000
@@ -250,7 +250,7 @@ void KMMimePartTreeItem::setIconAndTextF
     setPixmap( 0, SmallIcon("unknown") );
   } else {
     KMimeType::Ptr mtp = KMimeType::mimeType( mimetype );
-    setText( 1, mtp ? mtp->comment() : mimetype );
+    setText( 1, (mtp && !mtp->comment().isEmpty()) ? mtp->comment() : mimetype );
     setPixmap( 0, mtp ? mtp->pixmap( KIcon::Small) : SmallIcon("unknown") );
   }
 }
Comment 2 Martin Koller 2004-07-25 15:19:27 UTC
committed into CVS 3.3 HEAD