dialog.
Use action scheduler for manual filtering and for online IMAP
filtering when an online IMAP folder is specified as the
target of any filter action.
Set the action scheduler account in KMAcctImap,
so that per account filtering works
with the action scheduler (oops).
In the old filter system, KMFilterMgr explicityly
ignore online IMAP targets.
GUI: Online IMAP folders are now shown in the filter dialog.
GUI: An information dialog is shown when an online IMAP
GUI: folder is specified as the target of a filter action
GUI: in the filter dialog.
svn path=/branches/KDE/3.5/kdepim/; revision=451939
- selection for spam (and unsure) folder takes less room
- replace existing filters when re-running the wizard
- improved summary of changes to be made
- layout changes to allow a smaller window
svn path=/branches/KDE/3.5/kdepim/; revision=439951
duty being the responsible party for their memory, before they have had
a chance to write themselves to the config.
CCMAIL: agungl@kde.org
CCMAIL: staikos@kde.org
svn path=/trunk/KDE/kdepim/; revision=425113
incoming messages from IMAP accounts, that is messages that are delivered
into an IMAP inbox folder.
Sundry details:
I've modified these files:
kmfilterdlg.h kmfilterdlg.cpp
To add the advanced tab that allows per account filters
kmfilter.h kmfilter.cpp
I've added some new functions to KMFilter
setApplicability( AccountType )
AccountType applicability()
setApplyOnAccount( uint id, bool aApply )
bool applyOnAccount( uint id )
and an enum
enum AccountType { All, ButImap, Checked }
kmfiltermgr.h kmfiltermgr.cpp
I modified KMFilterMgr::process
to take two optional parameters
bool account = false
uint accountId = 0
and changed the implementation so that when these
params are set per account filtering is applied.
kmaccount.cpp
Trivially to use the new per account filtering.
kmacctimap.h kmacctimap.cpp
For 3 main reasons
1) In the case (it checks) that a filter applies to this
imap account, then incoming mails headers are
downloaded when mail checking occurs. Rather than waiting
until the folder is selected in the GUI.
Because it's really silly to have to select the inbox
folder to manually force filtering to kick in.
2) To load/save a list of unfiltered messages in the
constructor/destructor respectively.
3) To filter messages (I've sort of duplicated a little code
from kmheaders.cpp for this, my apologies).
kmfolderimap.cpp
1) To tell mAccount to filter new mail as the headers arrive.
This is basically the patch I've sent to bug:50997 several times and
has been available for testing for some time.
I'll now focus on allowing IMAP folders to be the target of the
Move Into Folder filter action, and less blocking filtering
(useful for piping into a spam tool).
CCMAIL:73758-done@bugs.kde.org
svn path=/trunk/kdepim/; revision=408531
changed messages are written backîif at least one filter matched. This
speeds up applying filters to large folders something brutal, since now
only the hits are updated or moved away.
Andreas, does that look ok to you?
CCMAIL: a.gungl@gmx.de
svn path=/trunk/kdepim/; revision=360771
Don't crash when a folder which is a resource folder is deleted, because
the resource is not removed properly from KOrganizer etc since no signals
were emitted in that case. Aggregate the folderRemoved signals of all
folder managers and emit a central folderRemoved(KMFolder*) which stuff
can listen to. Port the filter manager to that.
svn path=/trunk/kdepim/; revision=339422
the resource is not removed properly from KOrganizer etc since no signals
were emitted in that case. Aggregate the folderRemoved signals of all
folder managers and emit a central folderRemoved(KMFolder*) which stuff
can listen to. Port the filter manager to that.
svn path=/branches/KDE_3_3_BRANCH/kdepim/; revision=339421
better formatting of the log output (use QTextEdit::LogText),
avoid output of all headers for <any headers> filter rule
svn path=/trunk/kdepim/; revision=292936
use timestamps in the log;
avoid logging of full messages e.g. for "body" or "message" filter rule;
line wrapping and logging can be switched on/off in the log viewer;
saving of the log into a file is supported now
svn path=/trunk/kdepim/; revision=290493
very technical at the moment, and the possible user interactions are
still very limited. I'm going to improve this soon.
svn path=/trunk/kdepim/; revision=288302
This should fix a bug with ad hoc filters crashing when they move a message
to a different folder.
And also fix the bug/limitation that the move to folder action has to
come last in the list of filter actions for a filter.
This commit doesn't really use the action scheduler, code to use the
action scheduler in kmheaders and kmcommands is commented out.
I've been testing this code for a few weeks now. The changes to the
assignment operators in the kmmessage and kmmsgbase classes are the
changes I'm most concerned about here.
svn path=/trunk/kdepim/; revision=264912
folders tempOpened by filters are closed prematurely. They are now only
closed when there is no more filter using the filter manager.
svn path=/trunk/kdepim/; revision=262221
#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
o Remove unneeded #include from header file.
o Give KMSearchRule copy- and (field,func,contents)-ctor and operator=.
o Protect operator= against self-assignment.
o Remove all publix KMSearchRule::init()'s; port callers to use ctors.
o Make KMSearchRuleWidget::ruleFieldToEnglish() static and return a
QCString instead of QString.
o Plug a few mem leaks resulting from not delete'ing the
mBmHeaderField on init().
o Fix KMSearchRule::setField() not updating mBmHeaderField.
o Fix KMSearchRule::init() constructing a DwBoyerMoore object even for
pseudo headers (<size>, <recipients>, <message>, etc).
o Fix KMSearchPattern::operator=() not clearing it's rule list before
append()ing from the other patterns'.
After DwBoyerMoore::FindIn() has been made const-correct...
o ...replace the mBmEndHeader* KMSearchRule members with static const
versions in ::matches().
o ...make all other DwBoyerMoore objects const or static const.
If BoyerMoore gives any speed increase over QCString::find() for
"\nTo:" and "\nCc:" (which I doubt if I listen to my HD while
searching), it was probably eaten away by the permanent re-creation of
both objects for _every_ matches() call.
svn path=/trunk/kdepim/; revision=224610
o lots of Q(C)String -> Q(C)String & in args.
o #define -> const int.
o KConfig * -> const KConfig * where possible.
o #ifndef NDEBUG around asString() methods (which prompts the changes
to KMFilter*)
o remove virtualism of methods (none of them is ever reimplemented).
o return _const_ reference from operator='s.
o remove unneeded #include from header file.
o replace generic findInStrList() function by specific
configValueToFunc() private member method, as that's the only use.
o Add a _lot_ of const's to local variables, esp. in ::matches( const
DWString&,...).
o Move variable declarations to where they are init'ed (includes
proper use of scoping).
o DwBoyerMoore::FindIn() doesn't return int, but size_t, so use that.
o DwBoyerMoore::FindIn() returns DwString::npos on error, so check for
that instead of -1.
o Use KMMessage::asString() for "<message>" instead of
headerAsString()+bodyDecoded() as the former is already const for
some time now.
o s/TRUE/true/g; s/FALSE/false/g
It's amazing what a piece of crap I've written two years ago ;-)
svn path=/trunk/kdepim/; revision=224299
- Extract bPopFilter clause into internal processPop() method.
- Extract ad-hoc filter application from ::process(). This was really silly. Instead
of writing a short overloaded ::process( KMMessage*, KMFilter* ) method,
it was crammed into the normal ::process() that iterates over the whole
list of filters. This led to two bugs:
1. The filter was only executed if it was in the filter manager's list.
This makes it impossible to write code like
KMFilter * filter = new FooFilter();
// ...
kernel->filterMgr()->process( msg, filter );
delete filter;
2. The filter was only executed if it was marked as
"execute on manual filtering" by the user. But if the user checks the
box that adds the filter to the Message->Apply Filter submenu, she
probably wants to _not_ have the filter executed on manual filtering.
(Example: report as spam action (<exec command> "spamassassin -r"))
svn path=/trunk/kdepim/; revision=223784
This is a set of changes that is well test by myself and others.
The following bug fixes amongst others are included:
Compilation fix: the certificate dialog now compiles
Mjr bugfix: Prevent mail loss when kmail crashes while editing a
drafts message
Mjr bugfix: Fix erratic folder changing when clicking on the folder
tree
Mjr bugfix: Prevent mail loss when applying filters
The follow features have been implemented:
* KMail is now a KPart and can be embedded in the Kontact/Kaplan
container applications along with other KDE PIM applications.
* Remove duplicates function for removing duplicate messages in
a folder.
* Messages can be dragged and dropped on a composer window to
add those messages as attachments.
* Deletion in threaded mode is improved, child messages will no
longer be scattered when a parent is deleted.
* Multiple messages can now be selected in the search dialog.
* New context menu in the search dialog with Move, Copy, Reply
etc. actions for operating on selected messages.
* Search criteria in the search dialog now supports more types
of rules and a variable number of rules.
* Faster searching of large messsages.
* 'Search Folders' which are a KMail folder that stores a search
expression and is dynamically updated (also known as virtual
folders).
* The separate window for reading mail has a context menu with
Reply, Copy etc. actions for operating on the message
displayed.
* The separate window for reading mail has a tool bar.
* Startup of KMail is faster.
* Switching between folders is faster.
* The contents of all composer windows are saved to disk on
composer window creation and then periodically saved to
prevent mail loss in the result of a system crash.
* The state of KMail folders is saved to disk periodically to
prevent status information loss in the result of a system
crash.
Note after start KMail switching to folders for the first time will
slow as the format of the .sorted file has changed.
Enjoy!
svn path=/trunk/kdenetwork/kmail/; revision=195825
- new base class ConfigManager with commit/rollback functionality forced on
subclasses through pure virtuals.
All new managers should inherit this and implement the branching bahaviour
of IdentityManager, so that the configuredialog can work on the branch while
the rest of KMail sees only the "old" configuration.
- new IdentityManager, implementing the ConfigManager for KMIdentity's.
- new Signature class abstracting the signature processing.
- new structure for identities in kmailrc:
o upgrade-signature.pl: Turns the old signature-related config keys into
a sigtype/value scheme.
o kmail-upd-identities.pl: Removes all groups for identities not listed in
[Identity]/IdentityList.
Renames all remaining groups to [Identity #n],
with n starting a 0.
Saves the name of the default identity in
[General]/Default Identity
This adds several new technologies to KMail/KMKernel:
- from the new Signature handling: A service to non-QObjects to collect
StdOut and/or StdErr of KProcess (-derived) classes for them.
- from IdentityManager: A service to ConfigManagers requesting a sync of
kapp->config(). The requests get delayed, so multiple requests can
be serviced with a single kapp->config()->sync().
- from ConfigManager: A service to other ConfigManagers and to GUI elements
that wish to be notified of any change in a particular ConfigManager
implementation: Whenever a commit() changes something, the changed() signal
is emitted.
Included is also a fix for the problem of "no stdin at execute filter"
and the introduction of IdentityCombo.
svn path=/trunk/kdenetwork/kmail/; revision=148825
the new config.
Solves kmailrc growing to 2MB and more (a user reported kmail being sluggish
with 5sec delays when closing the composer. This was the reason ;-)
svn path=/trunk/kdenetwork/kmail/; revision=141711