summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Lohrke <carlo@gentoo.org>2006-04-22 11:19:15 +0000
committerCarsten Lohrke <carlo@gentoo.org>2006-04-22 11:19:15 +0000
commitddbdbfc18d95e59c2d01153a20117ebb8cb54e2e (patch)
tree57982ff91e575afbeb0e4fce9f09b1c1cf415600 /kde-base/kmail
parentMissing dependency, bug #120258. (diff)
downloadgentoo-2-ddbdbfc18d95e59c2d01153a20117ebb8cb54e2e.tar.gz
gentoo-2-ddbdbfc18d95e59c2d01153a20117ebb8cb54e2e.tar.bz2
gentoo-2-ddbdbfc18d95e59c2d01153a20117ebb8cb54e2e.zip
Imap, config, attachment handling and other fixes.
(Portage version: 2.0.54)
Diffstat (limited to 'kde-base/kmail')
-rw-r--r--kde-base/kmail/ChangeLog9
-rw-r--r--kde-base/kmail/Manifest49
-rw-r--r--kde-base/kmail/files/digest-kmail-3.5.2-r11
-rw-r--r--kde-base/kmail/files/kmail-3.5-ham_spam_icons.diff66
-rw-r--r--kde-base/kmail/files/kmail-3.5.2-imap-fixes.diff291
-rw-r--r--kde-base/kmail/files/kmail-3.5.2-misc-fixes.diff273
-rw-r--r--kde-base/kmail/kmail-3.5.2-r1.ebuild59
7 files changed, 704 insertions, 44 deletions
diff --git a/kde-base/kmail/ChangeLog b/kde-base/kmail/ChangeLog
index c9234e905380..14b4a7f063fa 100644
--- a/kde-base/kmail/ChangeLog
+++ b/kde-base/kmail/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for kde-base/kmail
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kmail/ChangeLog,v 1.54 2006/04/06 02:05:45 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kmail/ChangeLog,v 1.55 2006/04/22 11:19:15 carlo Exp $
+
+*kmail-3.5.2-r1 (22 Apr 2006)
+
+ 22 Apr 2006; Carsten Lohrke <carlo@gentoo.org>
+ +files/kmail-3.5.2-imap-fixes.diff, +files/kmail-3.5.2-misc-fixes.diff,
+ +files/kmail-3.5-ham_spam_icons.diff, +kmail-3.5.2-r1.ebuild:
+ Imap, config, attachment handling and other fixes.
05 Apr 2006; Diego Pettenò <flameeyes@gentoo.org>
-files/kmail-qt-3.3.5.patch, -files/kdepim-3.5.0-kmail-branch.patch,
diff --git a/kde-base/kmail/Manifest b/kde-base/kmail/Manifest
index 64c05a4debf1..1c7dca3dcade 100644
--- a/kde-base/kmail/Manifest
+++ b/kde-base/kmail/Manifest
@@ -1,58 +1,21 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 807d21f22825c33e64d965edc438245a ChangeLog 7262
-RMD160 58552ed2592253367f073fc4e26baa90e5ab900c ChangeLog 7262
-SHA256 f54d83377d353bb91c214a3c087f880dbdac50d1a2ba620dd1b87cff65afe162 ChangeLog 7262
+MD5 c1af3470b577c17d7b9018a98d159bd6 ChangeLog 7534
MD5 e8e3fc943d40a2fa3260a042e8f0dcf6 files/digest-kmail-3.4.1 208
-RMD160 a6185d391139f96c8706b8459f811267aa8254f4 files/digest-kmail-3.4.1 208
-SHA256 13d734567761359795df4277f8e107a116627d38aca0531bfb91f1a0f4bf6e2f files/digest-kmail-3.4.1 208
MD5 e8e3fc943d40a2fa3260a042e8f0dcf6 files/digest-kmail-3.4.1-r1 208
-RMD160 a6185d391139f96c8706b8459f811267aa8254f4 files/digest-kmail-3.4.1-r1 208
-SHA256 13d734567761359795df4277f8e107a116627d38aca0531bfb91f1a0f4bf6e2f files/digest-kmail-3.4.1-r1 208
MD5 ed5f8c08265b32641a4cc480b7414fce files/digest-kmail-3.4.2 282
-RMD160 6c21b8a8578c49208c6a35e538dce0577c45e1b9 files/digest-kmail-3.4.2 282
-SHA256 68f1cbf0899c203a29e8a535da6e3df2f97811b7e967b76cabc15200470b270b files/digest-kmail-3.4.2 282
MD5 ed5f8c08265b32641a4cc480b7414fce files/digest-kmail-3.4.2-r1 282
-RMD160 6c21b8a8578c49208c6a35e538dce0577c45e1b9 files/digest-kmail-3.4.2-r1 282
-SHA256 68f1cbf0899c203a29e8a535da6e3df2f97811b7e967b76cabc15200470b270b files/digest-kmail-3.4.2-r1 282
MD5 1abd06c61033b13feaa26798ccacf032 files/digest-kmail-3.4.3 67
-RMD160 2b704341b9b6cd49f646304700670dd2324e4ee3 files/digest-kmail-3.4.3 67
-SHA256 53a597b89fa83f7e953fd6c3565b00cbbceb08c07211f1ba11d1e24883cd82fe files/digest-kmail-3.4.3 67
MD5 4b77483fe398773d23a75714c3dd6223 files/digest-kmail-3.5.2 247
-RMD160 6593013cc2b82f2b51819d483733f409262d7d91 files/digest-kmail-3.5.2 247
-SHA256 316a6c56abca376dcc823a955f36bb4a04daf20009db56ff7cd3f6f38f150c5e files/digest-kmail-3.5.2 247
+MD5 342529061ff068b5002fa430c5c6b20c files/digest-kmail-3.5.2-r1 67
MD5 0dc20eebce2c8cb4475f065683ae24ff files/kdepim-3.4.2-partnode.patch 756
-RMD160 c935bb7e350b7e52287c069724b84969a15a1af1 files/kdepim-3.4.2-partnode.patch 756
-SHA256 e3681f4ff94ae2b0f82e953c73f82ed09de684a35a49a622bc1848e3e979c888 files/kdepim-3.4.2-partnode.patch 756
MD5 465fb4ad98b38e7c5328429eaabb1000 files/kmail-3.4.1-shift+click-crash.diff 516
-RMD160 408c39b32458061c0634ea577538e708d5db6282 files/kmail-3.4.1-shift+click-crash.diff 516
-SHA256 a3edde6599f93c2f018ffec1747d43f2a096edb11ad67702e3cdf69c9d32cac7 files/kmail-3.4.1-shift+click-crash.diff 516
+MD5 eba73836fe71e337b9f5626f7cd85952 files/kmail-3.5-ham_spam_icons.diff 2557
+MD5 483c5af80c9c3a1588203a44e55e9570 files/kmail-3.5.2-imap-fixes.diff 10354
+MD5 bd9633fbc0739b499ce331936cca5d47 files/kmail-3.5.2-misc-fixes.diff 10293
MD5 b9964e02eff2a443f6299bb15de581b4 kmail-3.4.1-r1.ebuild 1674
-RMD160 24e44a0303ae710c101f0550a5601aa230773cc2 kmail-3.4.1-r1.ebuild 1674
-SHA256 ed1535e7ea141f381975e429e7885f02be01d80f754995fccedc8832936b29c1 kmail-3.4.1-r1.ebuild 1674
MD5 aa82a9cf16faab980f09bd8763b742d1 kmail-3.4.1.ebuild 1610
-RMD160 daabc3c1484f9c90636b32abc8f0e019e474f2cd kmail-3.4.1.ebuild 1610
-SHA256 c7fc2e3296980cdb321425a5173f30c41591bbb510191ed33f89cdb9092310c7 kmail-3.4.1.ebuild 1610
MD5 393bf626aee24f4dd500ca341e1d314c kmail-3.4.2-r1.ebuild 1856
-RMD160 048aec541c7e607d081a56ae14373ec5e4d1b354 kmail-3.4.2-r1.ebuild 1856
-SHA256 642208939d5eae55efc1f7068f9efe59acb437d1dfe45d748af22a66df3b5868 kmail-3.4.2-r1.ebuild 1856
MD5 0517daa346612e50e60119680a33a3da kmail-3.4.2.ebuild 1629
-RMD160 466956d29672e3a680cf0f6bdc3d8e66bb4ff46e kmail-3.4.2.ebuild 1629
-SHA256 97b344712285cf83f6c7d4b0ab34d5154b5150d05eb674fe12295551bf7a6e06 kmail-3.4.2.ebuild 1629
MD5 d2de8d9c7a4a872edd470b81a9ae45b7 kmail-3.4.3.ebuild 1733
-RMD160 8cefbbd378bed5597821c77dbbddcccc7de4c2e1 kmail-3.4.3.ebuild 1733
-SHA256 05ba066c21b4b99f47a5b026af7227c103277df7fc4781f31521edff79168263 kmail-3.4.3.ebuild 1733
+MD5 701ebe64eaeef828a9df63cd3ce6a3a8 kmail-3.5.2-r1.ebuild 1935
MD5 5b7f453dddb33b4a363f7d52587de763 kmail-3.5.2.ebuild 1748
-RMD160 ff3e0f39831c10a4eddd456fdce8900d3b743193 kmail-3.5.2.ebuild 1748
-SHA256 fa12dd2e2e13c6571838489c8abe893ee1e2af534f379f67ee1cf4c489b32e99 kmail-3.5.2.ebuild 1748
MD5 acc03a4b12bb0433a57e95bd253b9501 metadata.xml 156
-RMD160 ecce3b981f150c45ae1e84e2d208e678d6124259 metadata.xml 156
-SHA256 2f4da28506b9d4185f320f67a6191d30c7a921217ed4447ed46ea0bc4aefc79a metadata.xml 156
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.2.2 (GNU/Linux)
-
-iD8DBQFENHcZAiZjviIA2XgRAnF6AKDnEqPIWfRoe1Wh1ER61wIAPDR+DgCfWf+7
-Tm4a57cZEg50JwWXbKmpCWE=
-=1Jto
------END PGP SIGNATURE-----
diff --git a/kde-base/kmail/files/digest-kmail-3.5.2-r1 b/kde-base/kmail/files/digest-kmail-3.5.2-r1
new file mode 100644
index 000000000000..9ee81dd048d6
--- /dev/null
+++ b/kde-base/kmail/files/digest-kmail-3.5.2-r1
@@ -0,0 +1 @@
+MD5 ac6b3b503e27a65a7b883c1e0a57262e kdepim-3.5.2.tar.bz2 12887336
diff --git a/kde-base/kmail/files/kmail-3.5-ham_spam_icons.diff b/kde-base/kmail/files/kmail-3.5-ham_spam_icons.diff
new file mode 100644
index 000000000000..c85eb013a795
--- /dev/null
+++ b/kde-base/kmail/files/kmail-3.5-ham_spam_icons.diff
@@ -0,0 +1,66 @@
+diff -urN kdepim-3.5.0.old/kmail/kmail-3.5-filter-icons.pl kdepim-3.5.0/kmail/kmail-3.5-filter-icons.pl
+--- kdepim-3.5.0.old/kmail/kmail-3.5-filter-icons.pl 1970-01-01 01:00:00.000000000 +0100
++++ kdepim-3.5.0/kmail/kmail-3.5-filter-icons.pl 2005-12-19 21:47:43.000000000 +0100
+@@ -0,0 +1,22 @@
++#!/usr/bin/perl -w
++
++use strict;
++
++# This script updates some configuration keys
++
++# read the whole config file
++my $currentGroup = "";
++my %configFile;
++while ( <> ) {
++ chomp; # eat the trailing '\n'
++ next if ( /^$/ ); # skip empty lines
++ next if ( /^\#/ ); # skip comments
++ if ( /^\[/ ) { # group begin
++ $currentGroup = $_;
++ next;
++ } elsif ( $currentGroup =~ /^\[Filter #[0-9]+\]$/ && /^Icon=/ ) {
++ my ($key,$value) = split /=/;
++ print "# DELETE $currentGroup$key\n${currentGroup}\nIcon=mail_spam\n" if $value eq "mark_as_spam";
++ print "# DELETE $currentGroup$key\n${currentGroup}\nIcon=mail_ham\n" if $value eq "mark_as_ham";
++ }
++}
+diff -urN kdepim-3.5.0.old/kmail/kmail.upd kdepim-3.5.0/kmail/kmail.upd
+--- kdepim-3.5.0.old/kmail/kmail.upd 2005-09-10 10:24:01.000000000 +0200
++++ kdepim-3.5.0/kmail/kmail.upd 2005-12-19 21:31:18.000000000 +0100
+@@ -158,6 +158,10 @@
+ Id=3.4.1
+ File=kmailrc
+ Script=kmail-3.4.1-update-status-filters.pl,perl
++# Update icon names for spam/ham filters
++Id=3.5-filter-icons
++File=kmailrc
++Script=kmail-3.5-filter-icons.pl,perl
+ #
+ # Important notice:
+ # If you add updates here, keep this text below them.
+diff -urN kdepim-3.5.0.old/kmail/kmstartup.cpp kdepim-3.5.0/kmail/kmstartup.cpp
+--- kdepim-3.5.0.old/kmail/kmstartup.cpp 2005-11-08 23:33:29.000000000 +0100
++++ kdepim-3.5.0/kmail/kmstartup.cpp 2005-12-19 21:21:00.000000000 +0100
+@@ -113,7 +113,8 @@
+ "3.4-misc",
+ "3.4a",
+ "3.4b",
+- "3.4.1"
++ "3.4.1",
++ "3.5-filter-icons"
+ };
+ static const int numUpdates = sizeof updates / sizeof *updates;
+ // Warning: do not remove entries in the above array, or the update-level check below will break
+diff -urN kdepim-3.5.0.old/kmail/Makefile.am kdepim-3.5.0/kmail/Makefile.am
+--- kdepim-3.5.0.old/kmail/Makefile.am 2005-12-19 21:04:14.000000000 +0100
++++ kdepim-3.5.0/kmail/Makefile.am 2005-12-19 21:54:08.000000000 +0100
+@@ -175,7 +175,8 @@
+ kmail-3.3-misc.pl \
+ kmail-3.3b1-misc.pl \
+ kmail-3.4-misc.pl \
+- kmail-3.4.1-update-status-filters.pl
++ kmail-3.4.1-update-status-filters.pl \
++ kmail-3.5-filter-icons.pl
+
+ confdir = $(kde_confdir)
+ conf_DATA = kmail.antispamrc kmail.antivirusrc
diff --git a/kde-base/kmail/files/kmail-3.5.2-imap-fixes.diff b/kde-base/kmail/files/kmail-3.5.2-imap-fixes.diff
new file mode 100644
index 000000000000..0987d2692626
--- /dev/null
+++ b/kde-base/kmail/files/kmail-3.5.2-imap-fixes.diff
@@ -0,0 +1,291 @@
+--- kdepim/kmail/kmheaders.cpp 2006/03/02 12:26:51 515022
++++ kdepim/kmail/kmheaders.cpp 2006/04/22 08:13:05 532593
+@@ -1841,7 +1841,7 @@
+ bool foundUnreadMessage = false;
+
+ if (!mFolder) return -1;
+- if (!(mFolder->count()) > 0) return -1;
++ if (mFolder->count() <= 0) return -1;
+
+ if ((aStartAt >= 0) && (aStartAt < (int)mItems.size()))
+ item = mItems[aStartAt];
+@@ -2041,7 +2041,7 @@
+
+ int idx = item->msgId();
+ KMMessage *msg = mFolder->getMsg(idx);
+- if (!msg->transferInProgress())
++ if (msg && !msg->transferInProgress())
+ {
+ emit activated(mFolder->getMsg(idx));
+ }
+@@ -3280,7 +3280,8 @@
+ unlink(QFile::encodeName(sortFile));
+ kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on device?)" << endl;
+ kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl;
+- //kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on device?)").arg( sortFile ));
++
++ return true;
+ }
+ if(sortStream)
+ fclose(sortStream);
+--- kdepim/kmail/imapaccountbase.cpp 2006/02/23 14:32:38 512746
++++ kdepim/kmail/imapaccountbase.cpp 2006/04/15 13:05:11 530119
+@@ -1098,10 +1098,10 @@
+ {
+ DwBodyPart* newparent = dwpart;
+ const DwMessage* newmsg = dwmsg;
+- if ( part->originalContentTypeStr() == "MESSAGE/RFC822" &&
++ if ( part->originalContentTypeStr() == "MESSAGE/RFC822" && dwpart &&
+ dwpart->Body().Message() )
+ {
+- // set the encapsulated message as new parent message
++ // set the encapsulated message as the new message
+ newparent = 0;
+ newmsg = dwpart->Body().Message();
+ }
+@@ -1281,7 +1281,8 @@
+ if ( delim.isEmpty() ) {
+ delim = "/";
+ }
+- if ( !newName.endsWith( delim ) && !folderName.startsWith( delim ) ) {
++ if ( !newName.isEmpty() &&
++ !newName.endsWith( delim ) && !folderName.startsWith( delim ) ) {
+ newName = newName + delim;
+ }
+ newName = newName + folderName;
+--- kdepim/kmail/imapjob.cpp 2005/08/12 17:17:32 446148
++++ kdepim/kmail/imapjob.cpp 2006/04/15 09:06:10 530060
+@@ -97,11 +97,12 @@
+ // imap folder, use its account for keeping track of the job. Otherwise,
+ // this is a get job and the src folder is an imap one. Use its account
+ // then.
+- KMAcctImap *account;
++ KMAcctImap *account = 0;
+ if (folder) {
+ account = folder->account();
+ } else {
+- account = static_cast<KMFolderImap*>(msg_parent->storage())->account();
++ if ( msg_parent && msg_parent->storage() )
++ account = static_cast<KMFolderImap*>(msg_parent->storage())->account();
+ }
+ if ( !account ||
+ account->makeConnection() == ImapAccountBase::Error ) {
+@@ -223,21 +224,23 @@
+ if ( mDestFolder )
+ {
+ KMAcctImap *account = static_cast<KMFolderImap*>(mDestFolder->storage())->account();
+- if ( account && mJob ) {
+- ImapAccountBase::JobIterator it = account->findJob( mJob );
+- if ( it != account->jobsEnd() ) {
+- if( (*it).progressItem ) {
+- (*it).progressItem->setComplete();
+- (*it).progressItem = 0;
+- }
+- if ( !(*it).msgList.isEmpty() ) {
+- for ( QPtrListIterator<KMMessage> mit( (*it).msgList ); mit.current(); ++mit )
+- mit.current()->setTransferInProgress( false );
++ if ( account ) {
++ if ( mJob ) {
++ ImapAccountBase::JobIterator it = account->findJob( mJob );
++ if ( it != account->jobsEnd() ) {
++ if( (*it).progressItem ) {
++ (*it).progressItem->setComplete();
++ (*it).progressItem = 0;
++ }
++ if ( !(*it).msgList.isEmpty() ) {
++ for ( QPtrListIterator<KMMessage> mit( (*it).msgList ); mit.current(); ++mit )
++ mit.current()->setTransferInProgress( false );
++ }
+ }
++ account->removeJob( mJob );
+ }
+- account->removeJob( mJob );
++ account->mJobList.remove( this );
+ }
+- account->mJobList.remove( this );
+ mDestFolder->close();
+ }
+
+@@ -245,21 +248,23 @@
+ if (!mDestFolder || mDestFolder != mSrcFolder) {
+ if (! (mSrcFolder->folderType() == KMFolderTypeImap) ) return;
+ KMAcctImap *account = static_cast<KMFolderImap*>(mSrcFolder->storage())->account();
+- if ( account && mJob ) {
+- ImapAccountBase::JobIterator it = account->findJob( mJob );
+- if ( it != account->jobsEnd() ) {
+- if( (*it).progressItem ) {
+- (*it).progressItem->setComplete();
+- (*it).progressItem = 0;
+- }
+- if ( !(*it).msgList.isEmpty() ) {
+- for ( QPtrListIterator<KMMessage> mit( (*it).msgList ); mit.current(); ++mit )
+- mit.current()->setTransferInProgress( false );
++ if ( account ) {
++ if ( mJob ) {
++ ImapAccountBase::JobIterator it = account->findJob( mJob );
++ if ( it != account->jobsEnd() ) {
++ if( (*it).progressItem ) {
++ (*it).progressItem->setComplete();
++ (*it).progressItem = 0;
++ }
++ if ( !(*it).msgList.isEmpty() ) {
++ for ( QPtrListIterator<KMMessage> mit( (*it).msgList ); mit.current(); ++mit )
++ mit.current()->setTransferInProgress( false );
++ }
+ }
++ account->removeJob( mJob ); // remove the associated kio job
+ }
+- account->removeJob( mJob ); // remove the associated kio job
++ account->mJobList.remove( this ); // remove the folderjob
+ }
+- account->mJobList.remove( this ); // remove the folderjob
+ }
+ mSrcFolder->close();
+ }
+--- kdepim/kmail/kmfoldercachedimap.cpp 2006/02/11 22:39:04 508499
++++ kdepim/kmail/kmfoldercachedimap.cpp 2006/04/15 10:05:41 530074
+@@ -539,8 +539,11 @@
+ mRecurse = recurse;
+ assert( account() );
+
+- mAccount->mailCheckProgressItem()->reset();
+- mAccount->mailCheckProgressItem()->setTotalItems( 100 );
++ ProgressItem *progressItem = mAccount->mailCheckProgressItem();
++ if ( progressItem ) {
++ progressItem->reset();
++ progressItem->setTotalItems( 100 );
++ }
+ mProgress = 0;
+
+ #if 0
+@@ -1746,11 +1749,14 @@
+ f = static_cast<KMFolderCachedImap*>(newFolder->storage());
+ }
+ }
+- f->setAccount( mAccount );
+- f->setImapPath( "/INBOX/" );
+- f->folder()->setLabel( i18n("inbox") );
++ if ( f ) {
++ f->setAccount( mAccount );
++ f->setImapPath( "/INBOX/" );
++ f->folder()->setLabel( i18n("inbox") );
++ }
+ if (!node) {
+- f->close();
++ if ( f )
++ f->close();
+ kmkernel->dimapFolderMgr()->contentsChanged();
+ }
+ // so we have an INBOX
+--- kdepim/kmail/kmfolderimap.cpp 2006/03/15 14:19:26 518857
++++ kdepim/kmail/kmfolderimap.cpp 2006/04/15 13:05:11 530119
+@@ -110,6 +110,11 @@
+ if (mOpenCount <= 0 ) return;
+ if (mOpenCount > 0) mOpenCount--;
+ if (mOpenCount > 0 && !aForced) return;
++ if (isSelected() && !aForced) {
++ kdWarning(5006) << "Trying to close the selected folder " << label() <<
++ " - ignoring!" << endl;
++ return;
++ }
+ // FIXME is this still needed?
+ if (mAccount)
+ mAccount->ignoreJobsForFolder( folder() );
+@@ -873,8 +878,10 @@
+ }
+ kmkernel->imapFolderMgr()->contentsChanged();
+ }
+- f->initializeFrom( this, "/INBOX/", "message/directory" );
+- f->setChildrenState( QString::null );
++ if ( f ) {
++ f->initializeFrom( this, "/INBOX/", "message/directory" );
++ f->setChildrenState( QString::null );
++ }
+ // so we have an INBOX
+ mAccount->setHasInbox( true );
+ }
+@@ -1086,17 +1093,20 @@
+ int a = cstr.find("X-uidValidity: ");
+ int b = cstr.find("\r\n", a);
+ QString uidv;
+- if ( (b - a - 15) >= 0 ) uidv = cstr.mid(a + 15, b - a - 15);
++ if ( (b - a - 15) >= 0 )
++ uidv = cstr.mid(a + 15, b - a - 15);
+ a = cstr.find("X-Access: ");
+ b = cstr.find("\r\n", a);
+ QString access;
+- if ( (b - a - 10) >= 0 ) access = cstr.mid(a + 10, b - a - 10);
++ if ( (b - a - 10) >= 0 )
++ access = cstr.mid(a + 10, b - a - 10);
+ mReadOnly = access == "Read only";
+ a = cstr.find("X-Count: ");
+ b = cstr.find("\r\n", a);
+ int exists = -1;
+- bool ok;
+- if ( (b - a - 9) >= 0 ) exists = cstr.mid(a + 9, b - a - 9).toInt(&ok);
++ bool ok = false;
++ if ( (b - a - 9) >= 0 )
++ exists = cstr.mid(a + 9, b - a - 9).toInt(&ok);
+ if ( !ok ) exists = -1;
+ QString startUid;
+ if (uidValidity() != uidv)
+--- kdepim/kmail/kmfoldertree.cpp 2006/02/13 20:29:00 509156
++++ kdepim/kmail/kmfoldertree.cpp 2006/04/15 10:05:41 530074
+@@ -139,7 +139,7 @@
+ KIconLoader * il = KGlobal::instance()->iconLoader();
+ QPixmap pm = il->loadIcon( icon, KIcon::Small, size,
+ KIcon::DefaultState, 0, true );
+- if ( pm.isNull() ) {
++ if ( mFolder && pm.isNull() ) {
+ pm = il->loadIcon( mFolder->normalIconPath(), KIcon::Small, size,
+ KIcon::DefaultState, 0, true );
+ }
+@@ -157,7 +157,7 @@
+ pm = normalIcon( size );
+
+ KIconLoader * il = KGlobal::instance()->iconLoader();
+- if ( mFolder->useCustomIcons() ) {
++ if ( mFolder && mFolder->useCustomIcons() ) {
+ pm = il->loadIcon( mFolder->unreadIconPath(), KIcon::Small, size,
+ KIcon::DefaultState, 0, true );
+ if ( pm.isNull() )
+@@ -1020,10 +1020,10 @@
+ mMainWidget->action("compact")->plug(folderMenu);
+
+ folderMenu->insertSeparator();
+- if ( !fti->folder()->isSystemFolder() )
++ if ( !fti->folder()->isSystemFolder() ) {
+ mMainWidget->action("delete_folder")->plug(folderMenu);
+-
+- folderMenu->insertSeparator();
++ folderMenu->insertSeparator();
++ }
+ mMainWidget->action("empty")->plug(folderMenu);
+ folderMenu->insertSeparator();
+ }
+@@ -1477,7 +1477,8 @@
+
+ QString fldName, oldFldName;
+
+- oldFldName = fti->name(0);
++ if ( fti )
++ oldFldName = fti->name(0);
+
+ if (!text.isEmpty())
+ fldName = text;
+@@ -1546,10 +1547,12 @@
+
+ // get the unread count
+ int count = 0;
+- if (folder->noContent()) // always empty
++ if (folder && folder->noContent()) // always empty
+ count = -1;
+- else
+- count = fti->folder()->countUnread();
++ else {
++ if ( fti->folder() )
++ count = fti->folder()->countUnread();
++ }
+
+ // set it
+ bool repaint = false; \ No newline at end of file
diff --git a/kde-base/kmail/files/kmail-3.5.2-misc-fixes.diff b/kde-base/kmail/files/kmail-3.5.2-misc-fixes.diff
new file mode 100644
index 000000000000..001a0487d338
--- /dev/null
+++ b/kde-base/kmail/files/kmail-3.5.2-misc-fixes.diff
@@ -0,0 +1,273 @@
+--- kdepim/kmail/attachmentlistview.cpp 2005/07/26 18:54:59 438982
++++ kdepim/kmail/attachmentlistview.cpp 2006/04/15 06:51:13 530022
+@@ -92,7 +92,7 @@
+ QBuffer serNumBuffer( serNums );
+ serNumBuffer.open( IO_ReadOnly );
+ QDataStream serNumStream( &serNumBuffer );
+- unsigned long serNum;
++ Q_UINT32 serNum;
+ KMFolder *folder = 0;
+ int idx;
+ QPtrList<KMMsgBase> messageList;
+--- kdepim/kmail/configuredialog.cpp 2006/01/21 12:34:03 500799
++++ kdepim/kmail/configuredialog.cpp 2006/04/01 23:19:36 525407
+@@ -3348,15 +3348,12 @@
+ mAttachWordsListEditor, SLOT(setEnabled(bool)) );
+ }
+
+-void ComposerPage::AttachmentsTab::doLoadOther() {
+- KConfigGroup composer( KMKernel::config(), "Composer" );
+-
++void ComposerPage::AttachmentsTab::doLoadFromGlobalSettings() {
+ mOutlookCompatibleCheck->setChecked(
+- composer.readBoolEntry( "outlook-compatible-attachments", false ) );
++ GlobalSettings::self()->outlookCompatibleAttachments() );
+ mMissingAttachmentDetectionCheck->setChecked(
+- composer.readBoolEntry( "showForgottenAttachmentWarning", true ) );
+- QStringList attachWordsList =
+- composer.readListEntry( "attachment-keywords" );
++ GlobalSettings::self()->showForgottenAttachmentWarning() );
++ QStringList attachWordsList = GlobalSettings::self()->attachmentKeywords();
+ if ( attachWordsList.isEmpty() ) {
+ // default value
+ attachWordsList << QString::fromLatin1("attachment")
+@@ -3371,13 +3368,12 @@
+ }
+
+ void ComposerPage::AttachmentsTab::save() {
+- KConfigGroup composer( KMKernel::config(), "Composer" );
+- composer.writeEntry( "outlook-compatible-attachments",
+- mOutlookCompatibleCheck->isChecked() );
+- composer.writeEntry( "showForgottenAttachmentWarning",
+- mMissingAttachmentDetectionCheck->isChecked() );
+- composer.writeEntry( "attachment-keywords",
+- mAttachWordsListEditor->stringList() );
++ GlobalSettings::self()->setOutlookCompatibleAttachments(
++ mOutlookCompatibleCheck->isChecked() );
++ GlobalSettings::self()->setShowForgottenAttachmentWarning(
++ mMissingAttachmentDetectionCheck->isChecked() );
++ GlobalSettings::self()->setAttachmentKeywords(
++ mAttachWordsListEditor->stringList() );
+ }
+
+ void ComposerPageAttachmentsTab::slotOutlookCompatibleClicked()
+--- kdepim/kmail/kmedit.cpp 2006/02/20 11:40:20 511574
++++ kdepim/kmail/kmedit.cpp 2006/04/15 06:51:13 530022
+@@ -144,7 +144,7 @@
+ QBuffer serNumBuffer(serNums);
+ serNumBuffer.open(IO_ReadOnly);
+ QDataStream serNumStream(&serNumBuffer);
+- unsigned long serNum;
++ Q_UINT32 serNum;
+ KMFolder *folder = 0;
+ int idx;
+ QPtrList<KMMsgBase> messageList;
+--- kdepim/kmail/kmkernel.cpp 2006/04/09 09:53:18 527760
++++ kdepim/kmail/kmkernel.cpp 2006/04/09 09:53:52 527761
+@@ -1463,6 +1463,9 @@
+
+ void KMKernel::readConfig()
+ {
++ //Needed here, since this function is also called when the configuration
++ //changes, and the static variables should be updated then - IOF
++ KMMessage::readConfig();
+ }
+
+ void KMKernel::cleanupImapFolders()
+--- kdepim/kmail/kmmsgbase.cpp 2006/01/11 14:34:42 496941
++++ kdepim/kmail/kmmsgbase.cpp 2006/04/15 13:05:11 530119
+@@ -870,7 +870,7 @@
+
+ char *l;
+ for ( l = latin.data(); *l; ++l ) {
+- if ( ( *l & 0xE0 == 0 ) || ( *l & 0x80 ) )
++ if ( ( ( *l & 0xE0 ) == 0 ) || ( *l & 0x80 ) )
+ // *l is control character or 8-bit char
+ break;
+ }
+--- kdepim/kmail/kmmsgdict.cpp 2005/07/26 18:54:59 438982
++++ kdepim/kmail/kmmsgdict.cpp 2006/04/15 13:05:11 530119
+@@ -205,7 +205,16 @@
+ }
+
+ KMFolderIndex* folder = static_cast<KMFolderIndex*>( msg->storage() );
+- if (folder && index == -1)
++ if ( !folder ) {
++ kdDebug(5006) << "KMMsgDict::insert: Cannot insert the message, "
++ << "null pointer to storage. Requested serial: " << msgSerNum
++ << endl;
++ kdDebug(5006) << " Message info: Subject: " << msg->subject() << ", To: "
++ << msg->toStrip() << ", Date: " << msg->dateStr() << endl;
++ return 0;
++ }
++
++ if (index == -1)
+ index = folder->find(msg);
+
+ // Should not happen, indicates id file corruption
+@@ -241,7 +250,16 @@
+ const KMMsgBase *msg, int index)
+ {
+ KMFolderIndex* folder = static_cast<KMFolderIndex*>( msg->storage() );
+- if ( folder && index == -1 )
++ if ( !folder ) {
++ kdDebug(5006) << "KMMsgDict::replace: Cannot replace the message serial "
++ << "number, null pointer to storage. Requested serial: " << msgSerNum
++ << endl;
++ kdDebug(5006) << " Message info: Subject: " << msg->subject() << ", To: "
++ << msg->toStrip() << ", Date: " << msg->dateStr() << endl;
++ return;
++ }
++
++ if ( index == -1 )
+ index = folder->find( msg );
+
+ remove( msgSerNum );
+--- kdepim/kmail/kmsender.cpp 2006/03/20 17:51:08 520754
++++ kdepim/kmail/kmsender.cpp 2006/04/15 13:05:11 530119
+@@ -373,8 +373,10 @@
+ KMessageBox::information(0, i18n("Critical error: "
+ "Unable to process sent mail (out of space?)"
+ "Moving failing message to \"sent-mail\" folder."));
+- sentFolder->moveMsg(mCurrentMsg);
+- sentFolder->close();
++ if ( sentFolder ) {
++ sentFolder->moveMsg(mCurrentMsg);
++ sentFolder->close();
++ }
+ cleanup();
+ return;
+ case 1:
+--- kdepim/kmail/objecttreeparser.cpp 2005/12/16 16:18:58 488973
++++ kdepim/kmail/objecttreeparser.cpp 2006/04/02 13:18:14 525563
+@@ -92,6 +92,7 @@
+ #include <qbuffer.h>
+ #include <qpixmap.h>
+ #include <qpainter.h>
++#include <qregexp.h>
+
+ // other headers
+ #include <memory>
+@@ -765,30 +766,21 @@
+ //static
+ bool ObjectTreeParser::containsExternalReferences( const QCString & str )
+ {
+- int httpPos = str.find( "\"http:", 0, true );
+- int httpsPos = str.find( "\"https:", 0, true );
++ QRegExp httpRegExp("(\\\"|\\\'|url\\s*\\(\\s*)http[s]?:");
++ int httpPos = str.find( httpRegExp, 0 );
+
+- while ( httpPos >= 0 || httpsPos >= 0 ) {
+- // pos = index of next occurrence of "http: or "https: whichever comes first
+- int pos = ( httpPos < httpsPos )
+- ? ( ( httpPos >= 0 ) ? httpPos : httpsPos )
+- : ( ( httpsPos >= 0 ) ? httpsPos : httpPos );
++ while ( httpPos >= 0 ) {
+ // look backwards for "href"
+- if ( pos > 5 ) {
+- int hrefPos = str.findRev( "href", pos - 5, true );
++ if ( httpPos > 5 ) {
++ int hrefPos = str.findRev( "href", httpPos - 5, true );
+ // if no 'href' is found or the distance between 'href' and '"http[s]:'
+ // is larger than 7 (7 is the distance in 'href = "http[s]:') then
+ // we assume that we have found an external reference
+- if ( ( hrefPos == -1 ) || ( pos - hrefPos > 7 ) )
++ if ( ( hrefPos == -1 ) || ( httpPos - hrefPos > 7 ) )
+ return true;
+ }
+ // find next occurrence of "http: or "https:
+- if ( pos == httpPos ) {
+- httpPos = str.find( "\"http:", httpPos + 6, true );
+- }
+- else {
+- httpsPos = str.find( "\"https:", httpsPos + 7, true );
+- }
++ httpPos = str.find( httpRegExp, httpPos + 6 );
+ }
+ return false;
+ }
+--- kdepim/kmail/renamejob.cpp 2005/12/10 04:41:02 487311
++++ kdepim/kmail/renamejob.cpp 2006/04/15 13:05:11 530119
+@@ -59,11 +59,13 @@
+ mNewName( newName ), mNewFolder( 0 )
+ {
+ mStorageTempOpened = 0;
+- mOldName = storage->name();
+- if ( storage->folderType() == KMFolderTypeImap ) {
+- mOldImapPath = static_cast<KMFolderImap*>(storage)->imapPath();
+- } else if ( storage->folderType() == KMFolderTypeCachedImap ) {
+- mOldImapPath = static_cast<KMFolderCachedImap*>(storage)->imapPath();
++ if ( storage ) {
++ mOldName = storage->name();
++ if ( storage->folderType() == KMFolderTypeImap ) {
++ mOldImapPath = static_cast<KMFolderImap*>(storage)->imapPath();
++ } else if ( storage->folderType() == KMFolderTypeCachedImap ) {
++ mOldImapPath = static_cast<KMFolderCachedImap*>(storage)->imapPath();
++ }
+ }
+ }
+
+--- kdepim/kmail/configuredialog_p.h 2005/08/19 15:04:44 450950
++++ kdepim/kmail/configuredialog_p.h 2006/04/01 23:19:36 525407
+@@ -715,8 +715,7 @@
+ void slotOutlookCompatibleClicked();
+
+ private:
+- //virtual void doLoadFromGlobalSettings();
+- virtual void doLoadOther();
++ virtual void doLoadFromGlobalSettings();
+ //FIXME virtual void doResetToDefaultsOther();
+
+ private:
+--- kdepim/kmail/replyphrases.kcfg 2006/04/09 09:53:18 527760
++++ kdepim/kmail/replyphrases.kcfg 2006/04/09 09:53:52 527761
+@@ -20,17 +20,14 @@
+ <entry name="PhraseForward" type="String" key="phrase-forward">
+ <label></label>
+ <whatsthis></whatsthis>
+- <default>Forwarded Message</default>
+ </entry>
+ <entry name="PhraseReplySender" type="String" key="phrase-reply">
+ <label></label>
+ <whatsthis></whatsthis>
+- <default>On %D, you wrote:</default>
+ </entry>
+ <entry name="PhraseReplyAll" type="String" key="phrase-reply-all">
+ <label></label>
+ <whatsthis></whatsthis>
+- <default>On %D, %F wrote:</default>
+ </entry>
+
+ </group>
+--- kdepim/kmail/kmfolder.cpp 2005/12/06 21:29:44 486141
++++ kdepim/kmail/kmfolder.cpp 2006/04/18 20:41:15 531267
+@@ -84,12 +84,6 @@
+ }
+ }
+
+- // trigger from here, since it needs a fully constructed FolderStorage
+- if ( mExportsSernums )
+- mStorage->registerWithMessageDict();
+- if ( !mHasIndex )
+- mStorage->setAutoCreateIndex( false );
+-
+ if ( aParent ) {
+ connect( mStorage, SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ),
+ aParent->manager(), SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ) );
+@@ -133,8 +127,16 @@
+ this, SLOT( slotContentsTypeChanged( KMail::FolderContentsType ) ) );
+
+ //FIXME: Centralize all the readConfig calls somehow - Zack
++ // Meanwhile, readConfig must be done before registerWithMessageDict, since
++ // that one can call writeConfig in some circumstances - David
+ mStorage->readConfig();
+
++ // trigger from here, since it needs a fully constructed FolderStorage
++ if ( mExportsSernums )
++ mStorage->registerWithMessageDict();
++ if ( !mHasIndex )
++ mStorage->setAutoCreateIndex( false );
++
+ if ( mId == 0 && aParent )
+ mId = aParent->manager()->createId();
+ }
diff --git a/kde-base/kmail/kmail-3.5.2-r1.ebuild b/kde-base/kmail/kmail-3.5.2-r1.ebuild
new file mode 100644
index 000000000000..2d71f6a975be
--- /dev/null
+++ b/kde-base/kmail/kmail-3.5.2-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kmail/kmail-3.5.2-r1.ebuild,v 1.1 2006/04/22 11:19:15 carlo Exp $
+
+KMNAME=kdepim
+MAXKDEVER=$PV
+KM_DEPRANGE="$PV $MAXKDEVER"
+inherit kde-meta eutils
+
+DESCRIPTION="KDE mail client"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+DEPEND="$(deprange 3.5.0-r3 $MAXKDEVER kde-base/libkdenetwork)
+ $(deprange $PV $MAXKDEVER kde-base/libkdepim)
+ $(deprange $PV $MAXKDEVER kde-base/libkpimidentities)
+ $(deprange 3.5.1 $MAXKDEVER kde-base/mimelib)
+ $(deprange 3.5.0-r3 $MAXKDEVER kde-base/libksieve)
+ $(deprange $PV $MAXKDEVER kde-base/certmanager)
+ $(deprange $PV $MAXKDEVER kde-base/libkcal)
+ $(deprange $PV $MAXKDEVER kde-base/kontact)"
+RDEPEND="${DEPEND}
+ crypt? ( !ppc64? ( app-crypt/pinentry ) )
+ $(deprange $PV $MAXKDEVER kde-base/kdepim-kioslaves)
+ $(deprange 3.5.1 $MAXKDEVER kde-base/kmailcvt)
+ $(deprange-dual $PV $MAXKDEVER kde-base/kdebase-kioslaves)
+ $(deprange-dual $PV $MAXKDEVER kde-base/kcontrol)" # for the "looknfeel" icon, and probably others.
+
+KMCOPYLIB="
+ libkdepim libkdepim/
+ libkpimidentities libkpimidentities/
+ libmimelib mimelib/
+ libksieve libksieve/
+ libkleopatra certmanager/lib/
+ libkcal libkcal
+ libkpinterfaces kontact/interfaces/
+ libkmime libkmime
+ libkpgp libkpgp"
+KMEXTRACTONLY="
+ libkdenetwork/
+ libkdepim/
+ libkpimidentities/
+ libksieve/
+ libkcal/
+ mimelib/
+ certmanager/
+ korganizer/korganizeriface.h
+ kontact/interfaces/
+ libkmime/
+ libkpgp
+ dcopidlng"
+KMCOMPILEONLY="libemailfunctions"
+# the kmail plugins are installed with kmail
+KMEXTRA="
+ plugins/kmail/
+ kontact/plugins/kmail/" # We add here the kontact's plugin instead of compiling it with kontact because it needs a lot of this programs deps.
+
+PATCHES="${FILESDIR}/kmail-3.5.2-imap-fixes.diff
+ ${FILESDIR}/kmail-3.5.2-misc-fixes.diff
+ ${FILESDIR}/kmail-3.5-ham_spam_icons.diff" \ No newline at end of file