[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: [Bug 35836] Try getting MIME type from filename for better attachment
From: Jonathan Marten <jjm () keelhaul ! me ! uk>
Date: 2006-11-28 14:15:06
Message-ID: 20061128141506.7957.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=35836
------- Additional Comments From jjm keelhaul me uk 2006-11-28 15:15 -------
SVN commit 608814 by marten:
Forward port 603223+603260 from branches/work/kdepim-3.5.5+:
Get attachment icon from file name if not available from Content-Type
CCBUG: 35836
M +12 -1 kmmsgpart.cpp
M +1 -0 objecttreeparser.cpp
--- trunk/KDE/kdepim/kmail/kmmsgpart.cpp #608813:608814
@ -388,7 +388,18 @
Q3CString mimeType( mType + '/' + mSubtype );
kAsciiToLower( mimeType.data() );
QString fileName =
- KMimeType::mimeType( mimeType )->iconName( QString() );
+ KMimeType::mimeType( mimeType )->iconName();
+
+ if ( fileName.isEmpty() )
+ {
+ fileName = this->fileName();
+ if ( fileName.isEmpty() ) fileName = this->name();
+ if ( !fileName.isEmpty() )
+ {
+ fileName = KMimeType::findByPath( "/tmp/"+fileName, 0, true )->iconName();
+ }
+ }
+
fileName =
KGlobal::instance()->iconLoader()->iconPath( fileName, K3Icon::Desktop );
return fileName;
--- trunk/KDE/kdepim/kmail/objecttreeparser.cpp #608813:608814
@ -1744,6 +1744,7 @
QString comment = msgPart->contentDescription();
comment = KMMessage::quoteHtmlChars( comment, true );
+ if ( label == comment ) comment = QString::null;
QString fileName = mReader->writeMessagePartToTempFile( msgPart, partNum );
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic