13062e801a
Many new features and refinements. Notable changes include: * Konqueror is the second web browser to pass the Acid2 CSS test, ahead of Firefox and Internet Explorer * Konqueror can also now free web pages from adverts with its ad-block feature * SuperKaramba is included in KDE, providing well-integrated and easy-to-install widgets for the user's desktop * Kopete has support for MSN and Yahoo! webcams * The edutainment module has three new applications (KGeography, Kanagram and blinKen), and has seen huge improvements in Kalzium
35 lines
1.4 KiB
Text
35 lines
1.4 KiB
Text
$NetBSD: patch-af,v 1.3 2005/12/11 11:40:02 markd Exp $
|
|
|
|
--- kmail/kmfilteraction.cpp.orig 2005-09-10 20:24:02.000000000 +1200
|
|
+++ kmail/kmfilteraction.cpp
|
|
@@ -1617,6 +1617,9 @@ class PipeJob : public KPIM::ThreadWeave
|
|
FILE *p;
|
|
QByteArray ba;
|
|
|
|
+ // backup the serial number in case the header gets lost
|
|
+ QString origSerNum = mMsg->headerField( "X-KMail-Filtered" );
|
|
+
|
|
p = popen(QFile::encodeName(mCmd), "r");
|
|
int len =100;
|
|
char buffer[100];
|
|
@@ -1630,7 +1633,20 @@ class PipeJob : public KPIM::ThreadWeave
|
|
pclose(p);
|
|
if ( !ba.isEmpty() ) {
|
|
KPIM::ThreadWeaver::debug (1, "PipeJob::run: %s", QString(ba).latin1() );
|
|
+ KMFolder *filterFolder = mMsg->parent();
|
|
+ ActionScheduler *handler = MessageProperty::filterHandler( mMsg->getMsgSerNum() );
|
|
+
|
|
mMsg->fromByteArray( ba );
|
|
+ if ( !origSerNum.isEmpty() )
|
|
+ mMsg->setHeaderField( "X-KMail-Filtered", origSerNum );
|
|
+ if ( filterFolder && handler ) {
|
|
+ bool oldStatus = handler->ignoreChanges( true );
|
|
+ filterFolder->take( filterFolder->find( mMsg ) );
|
|
+ filterFolder->addMsg( mMsg );
|
|
+ handler->ignoreChanges( oldStatus );
|
|
+ } else {
|
|
+ kdDebug(5006) << "Warning: Cannot refresh the message from the external filter." << endl;
|
|
+ }
|
|
}
|
|
|
|
KPIM::ThreadWeaver::debug (1, "PipeJob::run: done.\n" );
|