[Kde-pim] feature request: Show unread mails on top

Thomas McGuire mcguire at kde.org
Thu Apr 29 17:03:25 BST 2010


Hi,

On Thursday 29 April 2010 17:27:57 Roland Tapken wrote:
> > It is possible to add an additionial sort flag that orders _unread_ mails
> > always an top (or bottom), ignorting the sort criteriums? What I mean is:
> > All mails should be ordered by the defined criteriums (date and time, for
> > example), but unread mails should *always* appear on the top of the list.
> 
> I've tried to hack around a little. The attached patch (for kdepim-4.4.2,
> but I think it should be portable to trunk without any problems) modifies
> messagelist/core/model.cpp to add a new "always-on-top"-group containing
> all new and unread messages.
>
> But (beside a missing configuration flag) I have a few problems and do not
> know how to handle them. First of all a message will "jump" as soon as it's
> state changes to "unread" - this is very anyoing. Secondly it seems that
> this will not work for threaded messages. I assume that the problem is in
> ModelPrivate::viewItemJobStepInternalForJobPass2/3.

The attached patch is a start, but I fear things might get a bit more 
complicated than that.
What you do is to create a new group for new/unread mails. That will only work 
if mails are grouped by date, and not work for other groupings, especially 
when grouping is disabled.
IMHO mixing a state (new/unread) grouping with date grouping is strange.

Instead, I think it should be possible to _sort_ by new/unread state, i.e. 
creating a new sort order that first sorts by new/unread state and then sorts 
by date.
Actually, looking at sortorder.h, I see SortMessagesByNewUnreadStatus, which 
does exactly this. Is it not what you want? That sort option is also in the 
GUI.

> Maybe another solution for this problem would be some kind of "dynamical
> filter" over all imap folders? For example a view defining a list of
> folders and the message flag "unread" to be true, and if this view is
> selected the matching mails will be shown. I think Opera's M2 has
> something like this, or am I wrong?

You can create virtual search folders in KMail, and add a search folder for 
all unread mails. In KMail 1, that will be horribly slow, but it should be 
more practical in KMail 2.

Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100429/c291a2c9/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