[Kde-pim] messagelist folder switching

laurent Montel montel at kde.org
Tue May 14 07:14:51 BST 2013


Le mardi 14 mai 2013 00:46:54 David Faure a écrit :
> One issue that has been bothering me forever in kmail2 is that it doesn't
> pre- select the last "current email" in a given folder, when switching back
> to it.
> 
> The code for it is there, in Model::setStorageModel, which was apparently
> intended to be called on each folder switch, but it's not (anymore?). It's
> only called once, and after that the magic selectionproxymodel fills the
> messagelist based on the folder(s) selected in the tree. So it's all
> "removing rows and inserting rows", the Model class lost the concept of
> "now I'm jumping to another folder altogether".
> 
> (There's also code for it in Model::activateMessageAfterLoading, but it's
> never called, at all.)
> 
> My question is:
> 
> do we really need the feature where the user can select multiple folders in
> the foldertree, and see in the messagelist, the messages from all these
> folders combined?
> Does anyone really use this?

You can remove it. I wanted to remove it too, because it creates too many 
bugs, some menus doesn’t work when we have multi folder etc.
So remove it is a good idea.

> 
> I'm sure it was a nifty way of overusing proxies at the time, but when it
> comes to speed and polish (such as re-selecting the last message), it seems
> to get in the way (too much indirection in the code, and also, if multiple
> folders are selected, which "last message" should we jump to?).

“last message” with multiple folder... Good question :)

> 
> Any objection against getting rid of the Akonadi::SelectionProxyModel in
> storagemodel.cpp?
> I'm not sure what the next step is, though. How to switch
> to another folder in the messagelist. SetRootIndex()?



-- 
Laurent Montel | laurent.montel at kdab.com | KDE/Qt Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, Sweden (HQ) +46-563-540090


_______________________________________________
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