[Kde-pim] solving right-click changing folder problem

Ingo Klöcker kloecker at kde.org
Mon Jun 1 10:42:39 BST 2009


On Sunday 31 May 2009, Thomas McGuire wrote:
> Hi,
>
> On Sunday 31 May 2009 16:20:47 Frank Thieme wrote:
> > On Sunday 31 May 2009 15:35:11 Ingo Klöcker wrote:
> > > Just a warning: Most if not all of the code assumes that the
> > > folder the action selected from the context menu should be
> > > performed on is the current folder.
> >
> > Yeah I know, but most of them is easily rewritten to operate on a
> > specific folder or on the folder the right-click was on. The only
> > thing, as far as I see it, what could be a bit difficult is
> > "empty".
>
> Please separate all actions that work on folders out into a separate
> class and file, to make things cleaner. This really shouldn't be in
> kmmainwidget. Maybe "FolderActions"?
> Some of the actions need to be asynchronous, as the "move all
> messages to trash" example you mentioned.

Those actions should trigger an appropriate FolderJob (what they 
probably already do).


> Please note that you need to open the folder in order to do anything
> to it. Currently, a folder is always open when selected, to display
> the messages in the message list. Opening a folder means reading the
> index file to get the list of messages in memory. When the action is
> complete, the folder needs to be closed again. These are the
> KMFolder::open() and close() methods.

I suggest having a look at ExpireJob which does work on non-open 
folders.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20090601/52d80925/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list