From cc29364f06178f8f6b457384f2ec37a042bd9d43 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 1 Sep 2010 00:37:02 +0000 Subject: * 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 --- kmail/headeritem.cpp | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'kmail/headeritem.cpp') 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( 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( 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 ) || -- cgit v1.2.1