Re: [RFC] : Balsa-index API



	Hi all,

I go on with API description and the changes we must do to other objects.

First : changes to other objects. These are very limited to mailboxes ops 
: in fact the aim is to connect all indexes that display part or all 
messages of a mailbox to the delete/new_messages signals of the mailbox so 
that they can refresh their contents accordingly. To do that consistently 
the delete signals must be flagged as GTK_RUN_LAST so that when index 
receive the signals the messages are still valid (ie mailbox has not yet 
performed the deletions). I saw that these signals are GTK_RUN_FIRST now, 
but I don't know if it is used elsewhere in the code? It's pretty much the 
sole change I can think of right now.

Second : API
	- borkages we have now :
		*balsa_index_refresh, balsa_message_forward_quoted, 
balsa_index_reset are declared in balsa-index.h but never defined 
(AFAICS); let's get rid of them;
		 
*balsa_index_set_sort_order,balsa_index_set_first_new_message, 
balsa_index_add, 				balsa_index_select_row,  
balsa_index_get_selected_rows are declared in balsa-index.h but never used 
outside of balsa-index.c; should be static;

	- new API : we keep all old methods. Indeed I want the indexes to 
behave the same. The new methods will only deal with telling the index the 
content (or part of it only) of which mailboxes (yes there could be 
several) it is displaying (so that index can connect to the mailbox 
messages to keep itself up to date) and with the filters to apply before 
displaying messages. OK here are the explanations :
		* because I want to be able to display messages of the 
same mailbox in different indexes, each index must connect himself to 
mailbox ops messages because it can't assume that it is the only way to 
modify the mailbox (as it is almost now).
		* I want ot use index to implement virtual folders : in my 
mind a virtual folder is just a way to display a filtered view of one OR 
SEVERAL mailboxes. EG you want the virtual folders "urgent" do display all 
messages of ALL mailboxes the subject of which contains the strings 
"urgent" "hurry up" ;-) So here the index must have a method to register a 
source : ie a mailbox with a list of filters to apply (possibly empty) on 
its messages. I still don't know if it'd better make a base balsa-index 
class (representing what we have now in fact) and to make a new one that 
inherits from the base and add the possibility of filters. I'm aiming at 
the latter, it looks better.

Comments before I begin coding. Thanks
Bye
Manu



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