[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Patch for X-Mailer/User-Agent support in Fancy headerstyle
From: Robert Zwerus <arzie () dds ! nl>
Date: 2003-06-03 8:46:40
[Download RAW message or body]
Hi there,
This patch adds two parts to the Fancy headerstyle, one for the X-Mailer
header and one for the User-Agent header. I think only one of them is used in
a message, so it just checks both sequentially.
It's a patch for the KDE 3.1.2 version of kmreaderwin.cpp, which is in the
kdenetwork package under /kmail/. It can be applied by issuing the following
command in the abovementioned directory:
# patch kmreaderwin.cpp xmaileruseragent.patch
As you can see I added the X-Mailer/User-Agent part and the '// date'-comment.
I hope it will be incorporated in the official KMail source.
--
A Dieu,
Robert Zwerus - e-mail: arzie@dds.nl
ICQ UIN: 3943443 - MSN: robert_zwerus@hotmail.com
["xmaileruseragent.patch" (text/x-diff)]
--- kmreaderwin.cpp 2003-05-03 23:14:37.000000000 +0200
+++ kmreaderwin.cpp.new 2003-06-03 00:53:56.000000000 +0200
@@ -3693,6 +3693,25 @@
\
.arg(KMMessage::emailAddrAsAnchor(aMsg->bcc(),FALSE))); }
+ // sender's mailer, if any
+ if (!aMsg->headerField("X-Mailer").isEmpty())
+ {
+ headerStr += QString( "<tr><th class=\"fancyHeaderDtls\">%1</th>"
+ "<td class=\"fancyHeaderDtls\">%2</td></tr>")
+ .arg(i18n("Mailer: "))
+ .arg(strToHtml(aMsg->headerField("X-Mailer")));
+ }
+
+ // sender's user-agent, if any
+ if (!aMsg->headerField("User-Agent").isEmpty())
+ {
+ headerStr += QString( "<tr><th class=\"fancyHeaderDtls\">%1</th>"
+ "<td class=\"fancyHeaderDtls\">%2</td></tr>")
+ .arg(i18n("User-Agent: "))
+ .arg(strToHtml(aMsg->headerField("User-Agent")));
+ }
+
+ // date
headerStr.append(QString("<tr><th class=\"fancyHeaderDtls\">%1</th><td \
dir=\"%2\" class=\"fancyHeaderDtls\">%3</td></tr>")
.arg(i18n("Date: "))
.arg(aMsg->dateStr().isRightToLeft() ? "rtl" : "ltr")
_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic