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/headerstyle.cpp | 98 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 59 insertions(+), 39 deletions(-) (limited to 'kmail/headerstyle.cpp') diff --git a/kmail/headerstyle.cpp b/kmail/headerstyle.cpp index 9e6e63156..29046112a 100644 --- a/kmail/headerstyle.cpp +++ b/kmail/headerstyle.cpp @@ -118,6 +118,7 @@ namespace KMail { TQString BriefHeaderStyle::format( const KMMessage * message, const HeaderStrategy * strategy, const TQString & vCardName, bool printing, bool topLevel ) const { + Q_UNUSED( topLevel ); if ( !message ) return TQString::null; if ( !strategy ) strategy = HeaderStrategy::brief(); @@ -216,6 +217,7 @@ namespace KMail { TQString PlainHeaderStyle::format( const KMMessage * message, const HeaderStrategy * strategy, const TQString & vCardName, bool printing, bool topLevel ) const { + Q_UNUSED( topLevel ); if ( !message ) return TQString::null; if ( !strategy ) strategy = HeaderStrategy::rich(); @@ -416,6 +418,7 @@ namespace KMail { TQString FancyHeaderStyle::format( const KMMessage * message, const HeaderStrategy * strategy, const TQString & vCardName, bool printing, bool topLevel ) const { + Q_UNUSED( topLevel ); if ( !message ) return TQString::null; if ( !strategy ) strategy = HeaderStrategy::rich(); @@ -785,23 +788,10 @@ namespace KMail { // reverse colors for encapsulated if( !topLevel ){ activeColorDark = activeColor.dark(50); - fontColor = qApp->palette().active().text(); - linkColor = ""; + fontColor = TQColor(TQt::black); + linkColor = "class =\"black\""; } - TQStringList headerParts; - if( strategy->showHeader( "to" ) ) - headerParts << KMMessage::emailAddrAsAnchor( message->to(), false, linkColor ); - - if ( strategy->showHeader( "cc" ) && !message->cc().isEmpty() ) - headerParts << i18n("CC: ") + KMMessage::emailAddrAsAnchor( message->cc(), true, linkColor ); - - if ( strategy->showHeader( "bcc" ) && !message->bcc().isEmpty() ) - headerParts << i18n("BCC: ") + KMMessage::emailAddrAsAnchor( message->bcc(), true, linkColor ); - - // remove all empty (modulo whitespace) entries and joins them via ", \n" - TQString headerPart = " " + headerParts.grep( TQRegExp( "\\S" ) ).join( ", " ); - // Prepare the date string (when printing always use the localized date) TQString dateString; if( printing ) { @@ -822,12 +812,12 @@ namespace KMail { if(topLevel) headerStr += "
 
" + "width: 10px; min-height: 100%;\"> " "
 
"; + "width: 10px; min-height: 100%;\"> "; headerStr += "" - "
"+dateString+"
" + "
"+dateString+"
" // #0057ae " \n" " \n" @@ -836,8 +826,15 @@ namespace KMail { " \n" " \n" " \n" - "
\n" - " \n"; + "
\n"; + + headerStr += + "
\n" + " \n" + "
\n"; + + headerStr += + " \n"; // subject //strToHtml( message->subject() ) @@ -845,7 +842,7 @@ namespace KMail { headerStr += " \n" " \n" - " \n" + " \n" " \n"; } @@ -858,7 +855,7 @@ namespace KMail { TQString fromPart = KMMessage::emailAddrAsAnchor( fromStr, true, linkColor ); if ( !vCardName.isEmpty() ) fromPart += "  " + i18n("[vCard]") + ""; - //TDDO strategy date + //TODO strategy date //if ( strategy->showHeader( "date" ) ) headerStr += " \n" @@ -867,14 +864,35 @@ namespace KMail { " "; } - // to, cc, bcc - headerStr += + // to line + if( strategy->showHeader( "to" ) ) + headerStr += + " " + " " + " " + " \n"; + + // cc line, if any + if ( strategy->showHeader( "cc" ) && !message->cc().isEmpty() ) + headerStr += " " - " " - " " + " " - " "; + " \n"; + + // bcc line, if any + if ( strategy->showHeader( "bcc" ) && !message->bcc().isEmpty() ) + headerStr += + " " + " " + " " + " \n"; // header-bottom headerStr += @@ -893,25 +911,27 @@ namespace KMail { // kmail icon if(topLevel) { - headerStr += - "
\n" - "\n" - "
\n"; // attachments headerStr += - "
" + "
" "
" "
\n"; } - headerStr += "
"; + if ( printing ) { + //provide a bit more left padding when printing + //kolab/issue3254 (printed mail cut at the left side) + headerStr += "
"; + } else { + headerStr += "
"; + } - // TODO - // spam status - // ### iterate over the rest of strategy->headerToDisplay() (or - // ### all headers if DefaultPolicy == Display) (elsewhere, too) - return headerStr; + // TODO + // spam status + // ### iterate over the rest of strategy->headerToDisplay() (or + // ### all headers if DefaultPolicy == Display) (elsewhere, too) + return headerStr; } // ##################### -- cgit v1.2.1
"+message->subject()+""+message->subject()+"
" + i18n("To: ") + "" + + KMMessage::emailAddrAsAnchor( message->to(), false, linkColor ) + + "
"+i18n("To: ")+"" - +headerPart+ + " " + i18n("CC: ") + "" + + KMMessage::emailAddrAsAnchor( message->cc(), false, linkColor ) + "
" + i18n("BCC: ") + "" + + KMMessage::emailAddrAsAnchor( message->bcc(), false, linkColor ) + + "