Re: RFC mailbox interface



Em Qui, 22 Nov 2001 10:23:57 M . Thielker escreveu:
> On 2001.11.22 10:39 Kenneth Haley wrote:

> 
> Far too complicated. Imagine this:
> 
> The message is already displayed in an index. Therefore, a _Message 
> structure is in memory already. The headers have been loaded ans parsed, 
> but there is no associated message data. The _Message is a memeber of one 
> or more VFolders, in addition to the main folder it's in. If you want to 
> copy it to memory before deleting it from disk, all you need to do is

copy to mem = copy to cache right ?

> delete it from it's source mailbox. At that point the lib will see that the 
> message's last on-disk copy is about to be deleted , but the message is

last on-disk ? can the same message be in several mailboxes and still be the
*same* message ?

> references by other folders. So it would load the message, then delete it 
> from disk.
> This would be all that has to be done for copy on delete.
> 

This doesn't look very sound from the UI point of view. How does the user
know where the message *is* ? Will it go away if he exits balsa ? Will it
go away when he purges the cache ?

> 
> void delete_from_views(_Message *message)
> {
> 	GList *current;
> 
> 	current=_Message->folder_list;
> 
> 	if(current)
> 	{
> 		do
> 		{
> 			if((_Folder*)(current->data)->type == FOLDER_VIRTUAL)
> 				delete_from_folder((_Folder 
> *)(current->data), message);

and at this point you walk the folder right ?

> 		} while ((current=g_list_next(current)) != NULL);
> 	}
> }
> 
> void delete_message(_Folder *folder, _Message *message)
> {
> 	GList *current;
> 
> 	if(config.vfolders_are_views)
> 		delete_from_views(message);
> 
> 	delete_from_folder(folder, message);
> }
> 

-- 
Carlos Morgado - chbm(at)chbm(dot)nu - http://chbm.nu/ -- gpgkey: 0x1FC57F0A 
http://wwwkeys.pgp.net/ FP:0A27 35D3 C448 3641 0573 6876 2A37 4BB2 1FC5 7F0A
Never settle with words what you can accomplish with a flame thrower.



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