From bfc06e6858204db1b40948dc352038ae6bf448f4 Mon Sep 17 00:00:00 2001 From: Andreas Gungl Date: Sun, 27 Nov 2005 08:27:20 +0000 Subject: [PATCH] more feedback when filtering svn path=/trunk/KDE/kdepim/; revision=483599 --- kmcommands.cpp | 1 + kmcommands.h | 5 +++++ kmheaders.cpp | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/kmcommands.cpp b/kmcommands.cpp index d3f82b449..83e76f201 100644 --- a/kmcommands.cpp +++ b/kmcommands.cpp @@ -1475,6 +1475,7 @@ KMCommand::Result KMFilterActionCommand::execute() QString statusMsg = i18n("Filtering message %1 of %2"); statusMsg = statusMsg.arg( ++msgCount ).arg( msgList.count() ); KPIM::BroadcastStatus::instance()->setStatusMsg( statusMsg ); + KApplication::kApplication()->processEvents( QEventLoop::ExcludeUserInputEvents, 50 ); msg->setTransferInProgress(false); int filterResult = kmkernel->filterMgr()->process(msg, mFilter); diff --git a/kmcommands.h b/kmcommands.h index 8baf4450e..7d1f298f4 100644 --- a/kmcommands.h +++ b/kmcommands.h @@ -547,6 +547,9 @@ private: bool mToggle; }; + +/* This command is used to create a filter based on the user'S + decision, e.g. filter by From header */ class KDE_EXPORT KMFilterCommand : public KMCommand { Q_OBJECT @@ -562,6 +565,8 @@ private: }; +/* This command is used to apply a single filter (AKA ad-hoc filter) + to a set of messages */ class KDE_EXPORT KMFilterActionCommand : public KMCommand { Q_OBJECT diff --git a/kmheaders.cpp b/kmheaders.cpp index 4270bde07..c4b831f8f 100644 --- a/kmheaders.cpp +++ b/kmheaders.cpp @@ -1340,7 +1340,12 @@ void KMHeaders::applyFiltersOnMsg() CREATE_TIMER(filter); START_TIMER(filter); + int msgCount = 0; for (KMMsgBase* msgBase=msgList->first(); msgBase; msgBase=msgList->next()) { + QString statusMsg = i18n("Filtering message %1 of %2"); + statusMsg = statusMsg.arg( ++msgCount ).arg( msgList->count() ); + KPIM::BroadcastStatus::instance()->setStatusMsg( statusMsg ); + KApplication::kApplication()->processEvents( QEventLoop::ExcludeUserInputEvents, 50 ); int idx = msgBase->parent()->find(msgBase); assert(idx != -1); KMMessage * msg = msgBase->parent()->getMsg(idx);