[RFC] : search window



	Hi all,
here is the ideas I want to discuss on the list to implement the search 
window.
First here are the goals I want to achieve for these windows :
	- you can open different search windows for one mailbox
	- the search window has the same features as the normal index : ie 
user will be able to delete/transfer... messages in it.
	- the search windows must be updated upon mailbox changes 
(deletion of messages, new messages...)

So the biggest problem is synchronization : imagine that you have opened a 
mailbox. You open also a searc window on it. You look into the search 
window and see a Spam mail (that's a rather usual example ;-), you destroy 
it from within the search window. All other "views" (ie the index and also 
other search windows you could have opened on this mailbox) of the mailbox 
and the mailbox itself must be updated.
	 
	So what I propose is just to add a controller object BalsaIndexCtl 
that will do the job of synchronizing model and views (ie mailbox and 
indexes/search windows), and to just implement the search window as a 
window with a BalsaIndex in it. We'll also have to change also a bit the 
BalsaIndex object : strip out all the code that changes the mailbox 
directly, and replace it with a code that tells the controller that the 
user want to change the model. This controller will handle these requests, 
dispatch them to all views so that they update their content, then issue 
the command to the mailbox to keep in sync with views. That should also be 
possible the other way : if new messages are put in a mailbox, the 
controller must be aware of it and tell all views to refresh.

If everybody is OK I'll try to begin to code it ASAP.
Bye
Manu



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]