summaryrefslogtreecommitdiffstats
path: root/kmail/headeritem.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-01 00:37:02 +0000
commitcc29364f06178f8f6b457384f2ec37a042bd9d43 (patch)
tree7c77a3184c698bbf9d98cef09fb1ba8124daceba /kmail/headeritem.cpp
parent4f6c584bacc8c3c694228f36ada3de77a76614a6 (diff)
downloadtdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.tar.gz
tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.zip
* Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch
* Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed * Added journal read support to the CalDAV resource * Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/headeritem.cpp')
-rw-r--r--kmail/headeritem.cpp38
1 files changed, 37 insertions, 1 deletions
diff --git a/kmail/headeritem.cpp b/kmail/headeritem.cpp
index f950d35c7..188e05324 100644
--- a/kmail/headeritem.cpp
+++ b/kmail/headeritem.cpp
@@ -115,6 +115,28 @@ int HeaderItem::msgId() const
return mMsgId;
}
+TQString HeaderItem::to() const
+{
+ KMHeaders * const headers = static_cast<KMHeaders*>( listView() );
+ KMMsgBase * const msgBase = headers->folder()->getMsgBase( mMsgId );
+ if ( msgBase ) {
+ return msgBase->to();
+ } else {
+ return TQString();
+ }
+}
+
+TQString HeaderItem::from() const
+{
+ KMHeaders * const headers = static_cast<KMHeaders*>( listView() );
+ KMMsgBase * const msgBase = headers->folder()->getMsgBase( mMsgId );
+ if ( msgBase ) {
+ return msgBase->from();
+ } else {
+ return TQString();
+ }
+}
+
// Return the serial number
Q_UINT32 HeaderItem::msgSerNum() const
{
@@ -295,9 +317,14 @@ const TQPixmap *HeaderItem::pixmap(int col) const
// Only merge the attachment icon in if that is configured.
if ( headers->paintInfo()->showAttachmentIcon &&
!headers->paintInfo()->showAttachment &&
- msgBase->attachmentState() == KMMsgHasAttachment )
+ msgBase->attachmentState() == KMMsgHasAttachment )
pixmaps << *KMHeaders::pixAttachment;
+ // Only merge the invitation icon in if that is configured.
+ if ( headers->paintInfo()->showInvitationIcon &&
+ msgBase->invitationState() == KMMsgHasInvitation )
+ pixmaps << *KMHeaders::pixInvitation;
+
// Only merge the crypto icons in if that is configured.
if ( headers->paintInfo()->showCryptoIcons ) {
const TQPixmap *pix;
@@ -326,6 +353,10 @@ const TQPixmap *HeaderItem::pixmap(int col) const
if ( msgBase->attachmentState() == KMMsgHasAttachment )
return KMHeaders::pixAttachment;
}
+ else if ( col == headers->paintInfo()->invitationCol ) {
+ if ( msgBase->invitationState() == KMMsgHasInvitation )
+ return KMHeaders::pixInvitation;
+ }
else if ( col == headers->paintInfo()->importantCol ) {
if ( msgBase->isImportant() )
return KMHeaders::pixFlag;
@@ -485,6 +516,10 @@ TQString HeaderItem::generate_key( KMHeaders *headers,
TQString s(msg->attachmentState() == KMMsgHasAttachment ? "1" : "0");
return ret + s + sortArrival;
}
+ else if (column == paintInfo->invitationCol) {
+ TQString s(msg->invitationState() == KMMsgHasInvitation ? "1" : "0");
+ return ret + s + sortArrival;
+ }
else if (column == paintInfo->importantCol) {
TQString s(msg->isImportant() ? "1" : "0");
return ret + s + sortArrival;
@@ -558,6 +593,7 @@ int HeaderItem::compare( TQListViewItem *i, int col, bool ascending ) const
if ( ( col == headers->paintInfo()->statusCol ) ||
( col == headers->paintInfo()->sizeCol ) ||
( col == headers->paintInfo()->attachmentCol ) ||
+ ( col == headers->paintInfo()->invitationCol ) ||
( col == headers->paintInfo()->importantCol ) ||
( col == headers->paintInfo()->todoCol ) ||
( col == headers->paintInfo()->spamHamCol ) ||