[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 56102] empty trash does not work
From: Carsten Burghardt <cb () magic-shop ! de>
Date: 2004-03-21 17:00:37
Message-ID: 20040321170037.19843.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=56102
cb magic-shop de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From cb magic-shop de 2004-03-21 18:00 -------
CVS commit by burghard:
Fix Empty Trash. It works also with imap.
CCMAIL: 56102-done bugs kde org
M +11 -0 kmfolderimap.cpp 1.183
M +6 -1 kmfolderimap.h 1.64
M +1 -1 kmheaders.cpp 1.627
M +6 -2 kmkernel.cpp 1.255
M +1 -1 kmmainwidget.cpp 1.174
--- kdepim/kmail/kmfolderimap.h #1.63:1.64
@ -321,5 +321,8 @ protected:
void getMessagesResult(KIO::Job * job, bool lastSet);
- QString mUidValidity;
+ /** Called by KMFolder::expunge() to delete the actual contents.
+ At the time of the call the folder has already been closed, and
+ the various index files deleted. Returns 0 on success. */
+ virtual int expungeContents();
protected slots:
@ -387,4 +390,6 @ protected:
QGuardedPtr<KMAcctImap> mAccount;
QIntDict<ulong> uidmap;
+ QString mUidValidity;
+
private:
bool mCheckingValidity;
--- kdepim/kmail/kmfolderimap.cpp #1.182:1.183
@ -1563,3 +1563,14 @ QValueList<ulong> KMFolderImap::splitSet
}
+//-----------------------------------------------------------------------------
+int KMFolderImap::expungeContents()
+{
+ int rc = KMFolderMbox::expungeContents();
+ if (autoExpunge())
+ expungeFolder(this, true);
+ getFolder();
+
+ return rc;
+}
+
#include "kmfolderimap.moc"
--- kdepim/kmail/kmheaders.cpp #1.626:1.627
@ -3375,5 +3375,5 @ bool KMHeaders::readSortOrder(bool set_s
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 )); + //kmkernel->emergencyExit( i18n("Failure \
modifying %1\n(No space left on device?)").arg( sortFile )); }
if(sortStream)
--- kdepim/kmail/kmkernel.cpp #1.254:1.255
@ -1684,10 +1684,10 @ KMainWindow* KMKernel::mainWin()
/**
- * Emptyies al the trash folders
+ * Empties all trash folders
*/
void KMKernel::slotEmptyTrash()
{
QString title = i18n("Empty Trash");
- QString text = i18n("Are you sure you want to empty the trash?");
+ QString text = i18n("Are you sure you want to empty the trash folders of all \
accounts?"); if (KMessageBox::warningContinueCancel(0, text, title,
KStdGuiItem::cont(), "confirm_empty_trash")
@ -1700,4 +1700,8 @ void KMKernel::slotEmptyTrash()
{
KMFolder* trash = folderMgr()->findIdString(acct->trash());
+ if (!trash)
+ trash = imapFolderMgr()->findIdString(acct->trash());
+ if (!trash)
+ trash = dimapFolderMgr()->findIdString(acct->trash());
if (trash)
{
--- kdepim/kmail/kmmainwidget.cpp #1.173:1.174
@ -2129,5 +2129,5 @ void KMMainWidget::setupActions()
actionCollection(), "file_invalidate_imap_cache" );
- (void) new KAction( i18n("Empty &Trash"), 0,
+ (void) new KAction( i18n("Empty All &Trash Folders"), 0,
KMKernel::self(), SLOT(slotEmptyTrash()),
actionCollection(), "empty_trash" );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic