by using the primary user ID from the key corresponding to the key id (because the signatureUserId() depends on the locale encoding).
And while I'm touching the file, I'll untabify it.
svn path=/trunk/kdepim/; revision=282251
Small cleanup. Get rid of partNode::CryptoType, which wasn't used for anything. Determine the CryptPlug to use for mp/signed by looking at the protocol parameter instead of searching for app/{pgp,pkcs7}-signature children.
(without the CryptPlugFactory)
--and--
candidate_for_3_2_1: Don't interpret application/pkcs7-mime; smime-type=certs-only as a signed message, but show an icon instead (until we have integrated enough of gpgme to be able to show a nice summary of the import as inline HTML).
svn path=/trunk/kdepim/; revision=281273
So make sure that the code is only called when the file is not empty and load this attachment types
by default as the processing code is called anyway.
svn path=/trunk/kdepim/; revision=277110
Don't try to decrypt anything while a popup menu is shown.
The real fix is making the decryption non-blocking. But that'll have to wait till after KDE 3.2.
CCMAIL: 56693-fixed@bugs.kde.org
svn path=/trunk/kdepim/; revision=270269
1. Work around bug in gpgsm or gpgme or cryptplug that leads to the email
addresses being returned as angle-addr's instead of addr-specs for
S/MIME: <mutz@kde.org> instead of mutz@kde.org.
For OpenPGP, this was correct.
2. Don't re-add the angle brackets in case no userid and no name is
returned (which seems to be the case for all OpenPGP-Signatures)
3. Don't try to make an email address out of a DN. The code resulted
in each DN segment being make a (senseless) maito: link that was
nested in the Real Thing, constructed two lines later.
CCMAIL: khz@kde.org
CCMAIL: wk@gnupg.org
svn path=/trunk/kdepim/; revision=260941
- Only return true in ObjectTreeParser::processApplicationMsTnefSubtype if the attachment could really be processed.
svn path=/trunk/kdepim/; revision=256294
- Check for reader window beforehand.
- Move variables to the scope where they belong. Use for instead of while.
- Only return true if the vCal was really processed.
- Remove trailing whitespace.
svn path=/trunk/kdepim/; revision=256287
bodypartformatter.cpp:
- Add classes and factory code for multipart subtypes
objecttreeparser.{h,cpp}:
- Refactor common child handling (normal mp/mixed semantics w/o the
kroupware message hack) into stdChildHandling().
- Make sure the above is used as fallback in every
processMultiPartFooSubtype(), then remove it from
processMultiPartType(), so the latter has the same structure as all
the other processFooType()s had.
- Refactor processMailmanMessage() and isMailmanMessage() from
processTextPlainSubtype().
- in parseObjectTree():
o Get rid of the old switch with all the kdFatal()s in it.
o Use AttachmentStrategy::defaultDisplay()
- remove processMultiPartType()
- simplyfy some processMutliPartFooSubtype() methods by:
o using stdChildHandling()
o introducing guard clauses
svn path=/trunk/kdepim/; revision=255329
not trivial) to BodyPartFormatter, calling back at
ObjectTreeParser::processFooBarSubtype() methods, as for app/* and
text/* before.
o add some triple-hashed comments about suspicious code
o in ObjectTreeParser::parseObjectTree(),
- replace repeated if(node)'s with a guard clause
- replace an occurrence of
if ( a || b ) {
if ( a ) foo; else bar;
}
with (hopefully equivalent :-)
if ( a ) foo; else if ( b ) bar;
- remove unneeded temp. var curNode and s/curNode/node/g;
- use new AttachmentStrategy::defaultDisplay() to get rid of an
else-if-cascade
o kill now unused ObjectTreeParser::processFooType() methods.
o In bodypartformatter.cpp, add the new BodyPartFormatter subclasses
and prepare for a table-driven (as opposed to switch'ing factory
methods.)
svn path=/trunk/kdepim/; revision=252732
#define kernel KMKernel::self()
to
#define kmkernel KMKernel::self()
because 'kernel' was a much to general term. We really shouldn't repeat the mistakes of the X developers.
I noticed this problem when I played around with KImageEffects. kimageeffects.h contains 'kernel' as parameter of some methods and so the compilation had to fail. We won't need KImageEffects in the near future, but at least we are now prepared and a clash with another 'kernel' can't happen anymore.
svn path=/trunk/kdepim/; revision=252621
BodyPartFormatter, intended to encapsulate the various
ObjectTreeParser::processFooBarSubtype() methods in per-mimetype
fashion. Currently, text/* and app/* are available, but they just call
back the ObjectTreeParser methods, which therefore are made public
until removed later.
svn path=/trunk/kdepim/; revision=251468
I doubt the user can sense the difference between "Bad" and "BAD" or "Good" and "GOOD".
Yet, bad should be emphasized. Doing so.
svn path=/trunk/kdepim/; revision=245755
Actually this fixes all handling of application/octet-stream attachments that are not part of multipart/encrypted
svn path=/trunk/kdepim/; revision=244943
has redraw problems with smart MTV mode in separate reader, though)
- Extract config profile loading from the Appearance page into a new
dialog: Better user experience and less special code in appearance
page to make sure ProfileTab::apply() is called first...
- Merge the groupware and folder config pages into a misc page
(the folder tag should probably be split into "folder" and
"behaviour")
- various small cleanups:
o s/QString()/QString::null/
o unused #includes in .h files
o added const'ness to tmps
o removed some tmps
o etc
svn path=/trunk/kdepim/; revision=242473
That's actually caused by a bug in the KHTML part. Remove some of the '\n' that Marc made KMail add to the HTML output to workaround this bug.
svn path=/trunk/kdepim/; revision=240749
This patch mostly concerns itself with the following two things:
1. Move code out from kmreaderwin (see new class CSSHelper, whose files
have already been committed).
Into this category fall the simplification and readability
enhancements of the HTML code (adding some newlines, simplifying the
HTML in favour of complicating the CSS a bit, using @media print)
2. Change the semantics of the mCodec member of KMMessage and
KMReaderWin.
To make it short: mCodec is not mOverrideCodec and only ever set to a
non-NULL value iff the codec is forced by the user selecting an
encoding from the Message menu. In all other cases, it's now
calculated from the message(parts). For that, the codec() and
setBodyFromUnicode() and bodyToUnicode() methods have been duplicated
in KMMessage from KMMsgPart (don't you just hate that?).
Walkthrough of the patch:
kmreaderwin.{h,cpp}
- Replace all c* and m*Font members by a single CSSHelper instance.
- readColorConfig(), parts of readConfg(), quoteFontTag() and htmlHead()
were moved from here to CSSHelper
- rename codec()/setCodec() to overrideCodec()/setOverrideCodec()
and provide an autoDetectEncoding() convenience method.
- Remove the QTextCodec parameter from setMsgPart. It now uses
overrideCodec() or the msgPart's own codec.
- s/isfixedFont/isFixedFont/
- split parseMsg( KMMessage*, bool ) into one for
onlyProcessHeaders=false (called again parseMsg(KMMessage*)) and one
for oPH=true (called parseMsgHeader()). The latter then reduces to
writeMsgHeader(), provided one accepts the minor regression that the
[vPart] link is not shown _for *nested*_ messages. This can be readded
later, once KMReaderWin is void of formatting code and OTP is
independent of a KMReaderWin parent. I've left the commented
parseMsgHeader in the momnt of it's death in commented out, so you can
see what I how I came to kill it off for an explicit writeMsgHeader().
- In the old new parseMsg(KMMessage*), there also happened significant
code simplification, mostly by realizing that the the colorbar and tmp
file handling belongs into parseMsg(void) and by removing the oPH=true
case. There's also an instance of simplifying code by using
bodyToUnicode(). At last, the <div id="header"></div> around
writeMsgHeader is superfluous (and wrong, since there is and never was
a div#header CSS selector), since the HeaderStyle's add that already.
- Apply "Inline Method" to writeHTMLStr()
- remove the QTextCodec param from showVCard(). This method is now a
nice one and uses bodyToUnicode()
- rename all fooCodec to fooOverrideCodec
- currently, mCSSHelper is destroyed and re-created whenever it the
config changes. I intend to make CSSHelper a fully functional
ConfigManager later.
- setOverrideCodec now calls update(true) only if the codec was actually
changed.
- In setMsgPart, there's code that "forgets" to strip off <head>, <body>
and <html> tags from HTML parts. I didn't do anything about that yet,
only added a triple-hash.
- Simplify slotAtmSave() by using more guard clauses and esp. by using
QString::section() and QString::replace(QChar,QChar) instead of
rolling our owns.
objecttreeparser.{h,cpp}:
- Use CSShelper
- Create a new CSS class "htmlWarn" for the HTML warning frame to get
rid of the embedded style information.
- simplify quotedHTML() by using new nonQuotedFontTag().
headerstyle.cpp:
- We begin by inserting some newlines to ease the reading of the
resultant HTML code.
- In the fancy header department, we remove almost all class attributes
from the HTML tags. Instead (see csshelper.cpp), we use CSS Selectors
to address the inner tags of the enclosing <div class="fancy header">
Note how that tag matches both the div.header (setting the margin) and
div.fancy.header selectors in csshelper.cpp
- We end with removing the workaround for the apparently long-standing
khtml bug that makes it ignore "padding" on <table>, viz. another
<div></div> pair around the table.
kmfldsearch.cpp:
- Reap fruits of (2).
kmmainwin.cpp:
- Consequence of setCodec -> setOverrideCodec() renaming
- move an #include up to the top
kmmessage.{h,cpp}:
- Copy setBodyFromUnicode(), bodyToUnicode() and rename fooCodec to
fooOverrideCodec.
- Note how the double housekeeping (mAutoDetectEncoding) goes away with
this.
- In html2source(), don't emit <br />, but <br> (we're using HTML 4.01,
not XHTML) and quote ' with ' (well, that's more XHTML-like)
kmreadermainwin.{h,cpp}:
- Since the QTextCodec* parameter was removed from
KMReaderWin::setMsgPart(), use now the explicit setOverrideCodec()
method to set the user-defined codec.
- Remove unused mCodec member
svn path=/trunk/kdepim/; revision=236540
- Fix FIXME added by me in the separate reader window when viewing
text/plain attachments.
- Comment out mShowCompleteMessage from reader win. The only usage of
it is in the ObjectTreeParser, and I don't see any regressions with
simply assuming it to always be true. It certainly doesn't break the
claimed usage of this hack.
- group fonts/color member variables together.
- Refactor HTML head composition from parseMsg() into htmlHead()
- Use new htmlHead() to fix#60688
CCMAIL:60688-done@bugs.kde.org
ObjectTreeParser:
- Moved mIsFirstTextPart member variable from readerwin to here
- Removed the hack that maps app/pgp to text/plain. Instead, just call
the t/p method from the app/pgp case.
- At the end of parseObjectTree(), change the last
htmlWriter()->write() to htmlWriter()->queue(), since everything
that is called in between uses queue(), too (see below)
KHtmlHtmlWriter:
- Keep state to be able to warn about incorrect usage patterns
- Move html view init/finish to begin() and end() from kmreaderwin
and objecttreeparser
svn path=/trunk/kdepim/; revision=235256
- Use HtmlStatusBar instead of home-brewn QLabel.
- Remove strToHtml (uses the equivalent LinkLocator method now).
object tree parser:
- Extract Method on processFooType to get processFooBarSubtype
methods.
- Use AttachmentStrategy::inlineNestedMessages()
- Created a new CryptPlugWrapperSaver that implements
reasource-allocation-is-initialization" for (re)setting the
cryptplug in some ObjectTreeParser methods.
both:
- Move writeBodyStr(), writePartIcon(), quotedHTML(),
sigStatusToString(), writeSigstat{Header,Footer}
from KMReaderWin to ObjectTreeParser.
There is one known regression (documented with a FIXME)
(see last hunk of kmreaderwin.cpp):
I had to #if 0 a call to writeBodyStr. This code needs to be ported to
use ObjectTreeParser first. The code is about the "view attachment"
feature.
Other than that, the changes should be behaviour-preserving (except
for the smart attachment mode now showing nested messages inline).
The patch is large, but consists almost purely of moving around code.
svn path=/trunk/kdepim/; revision=230897
o Fix display of t/p parts when using the smart attachment strategy:
They're now also shown inline if they have no filename associated with them.
Together, they fix display of multi-part text messages, such as Simon Josefsson's nice example mail, which has a tradition of having it's display being broken in KMail ;-)
svn path=/trunk/kdepim/; revision=223610