GNOME Bugzilla – Bug 107199
Mailbox and message URLs
Last modified: 2009-08-15 18:40:50 UTC
The following rather rambling patch addresses a number of problems that Balsa has in keeping track of mailboxes and messages: - the `most recently used mailboxes' widget used for finding various targets (moving messages, fcc-box, filtering) can't include IMAP mailboxes that haven't been found because of deferred scanning; - the compose window can't `mark as replied' messages in closed mailboxes or in unfound IMAP mailboxes; it also loses track of an original message when the reply is postponed or saved. The basic idea is to introduce message URLs, and to use them and mailbox URLs more systematically to find objects that aren't immediately available. Implementing this and exploiting its benefits has meant messing with several files (details below). Because of the size of the patch, other changes to the mailbox system that are being explored, and the possibility of a forthcoming branch, I'm posting the patch here for discussion and anything else that anyone finds useful about it. I would like to commit this or a related patch to address these issues at an appropriate stage. Specific changes are: * libbalsa/message.[hc]: new exported methods (libbalsa_message_get_url, libbalsa_message_from_url). * libbalsa/mailbox.[hc]: two new signals and some exported methods (libbalsa_mailbox_get_message_info, libbalsa_mailbox_get_message_from_info) for handling message URLs; keep a table of mailboxes, and export methods (libbalsa_mailbox_update_url, libbalsa_mailbox_from_url, libbalsa_mailbox_table_destroy) for using it. * libbalsa/mailbox_{imap,local,maildir,mbox,mh}.c: install object method handlers for new signals; use libbalsa_mailbox_update_url to set URL. * libbalsa/libbalsa-marshal.list: new marshaller needed for new mailbox signals. * libbalsa/server.[hc]: keep a table of servers, and export methods (libbalsa_server_from_url, libbalsa_server_table_destroy) for using it. * libbalsa/filter.[hc], src/balsa-index.c, src/balsa-mblist.c, src/message-window.c: use libbalsa_mailbox_from_url instead of balsa_find_mailbox_by_url. * src/balsa-app.c: call the table_destroy methods on cleanup. * src/main.c: libbalsa_filters_set_url_mapper has gone. * src/sendmsg-window.[hc]: new structure BalsaSendmsgReference for keeping track of messages; try harder to find an original message so that we can mark it as replied. * libbalsa/send.c: save message URLs in draft messages.
Created attachment 14661 [details] [review] Patch against current cvs.
Peter ? :)