Hi Jan,

i have implemented the UpdateFlagsOfAllMessagesTask which enable marking all 
messages in a specific mailbox as seen, it send only one imap command storing 
all messages as seen.

And the first lesson learned : know your protocol / library :)

I have send a merge request with the source code on gitorious. If everything is 
all right and the task is closed i will start with a new one  (maybe you have a 
high priority task ?)

Cheers and happy easter,
Yasser.

Am 26.03.2013 um 10:04 schrieb Jan Kundrát <j...@flaska.net>:

> On Monday, 25 March 2013 23:25:26 CEST, Yasser Aziza wrote:
>> i have implemented the feature requested by Patrick, which enable marking 
>> all unread messages in a Folder as read. 
> 
> Hi Yassir, thanks for writing here. Could you please also subscribe to the ML 
> so that the future responses reach you? The instructions are on the website. 
> For the other people on the list, the merge request in question is at [1].
> 
> I would like to have the patch improved in a few ways:
> 
> - The "//: comment" is for providing context to the localization messages 
> (calls to tr()), not as a general comment in the code. I think it can be 
> removed here.
> 
> - Menu items which end with three dots ("Mark folder read...") indicate that 
> a dialog will appear before the action takes place. This is not the case with 
> this particular feature.
> 
> - The code leaves all messages selected in the GUI.
> 
> - The message view supports showing messages in threads (I see you're using 
> GMail which cannot do that). Selecting all items via Ctrl+C selects only all 
> top-level messages (thread roots), not all messages in the mailbox.
> 
> - I'm afraid that the best way to implement this feature is going to be a bit 
> involved; the code in UpdateFlagsTask was designed to work with just some of 
> the messages. Even if we produce a list of QModelIndexes representing all 
> messages in a mailbox (which in itself is rather inefficient when dealing 
> with a lot of messages), the resulting IMAP command would be a bit too long. 
> It looks to me that the best way to proceed is to create a new 
> UpdateFlagsOfAllMessagesTask to eliminate the overhead of walking all 
> messages separately, but this is going to be too much involved for a newcomer 
> :( -- I'm not saying you cannot do that, but due to the amount of work 
> needed, there are high chances of hitting unexpected obstacles on the way.
> 
> With kind regards,
> Jan
> 
> [1] https://gitorious.org/trojita/trojita/merge_requests/18
> 
> -- 
> Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/


Reply via email to