summaryrefslogtreecommitdiffstats
path: root/kmail/headeritem.cpp
diff options
context:
space:
mode:
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 ) ||