Deleting Messages/Notebook changes



Ok,

I was concerned about putting out a release with the bug in the message
transfer / delete code, so I committed a solution which is less than
perfect, but I'll sit down and figure out how to do it the 'right way' in
January.

For now (or at least until someone figures out what's going on), any
function that moves messages from one mailbox to another should 'reset'
the page if it's visible in the notebook.  (see below).  If it doesn't,
the user will be able to crash balsa (or, the messages will seem to have
disappeared, which is another, and in my option, less desirable hack).

I added the following functions to balsa-index-page.c

balsa_index_page_reset( BalsaIndexPage *page);
	will reset the contents of a page by closing the mailbox,
	destroying and re-creating the page.  It returns
	'focus' to the page that was active (not necessarily
	the page it received the pointer to).
gint balsa_find_notebook_page_num(Mailbox *mailbox);
	convenience function to find the notebook page number
	of the mailbox.  returns -1 if not available. (It's
	therefore useful to check to see if a mailbox
	is visible in the notebook).
BalsaIndexPage* balsa_find_notebook_page(Mailbox *mailbox);
	returns a pointer to the page the shows the index
	containing the mailbox, or NULL if not available.
	(also can be used to see if mailbox is visible.)

I've gone through to replace some of the existing code that does this w/
these calls.



Delete in most folders now moves the message from the current folder to
Trash.  If Trash is open in the notebook, it calls balsa_index_page_reset.
In the Trash folder, it actually deletes the message.

'Transfer' in the context menu now also calls balsa_index_page_reset if
the the destination folder is open.

The Mailbox menu now contains an Empty _Trash option.


After the release, unless there are objections, I'd like re-work the
notebook so that the whole business of managing the mailboxes that are
'open' or 'closed' is transparent to the user -- eliminating the tabs.
We've talked about this before, but it would 'look' more like Outlook or
Outlook express -- navigation would be done with the mblist.

Periodically, balsa would check to see which mailboxes hadn't been active
(ie, hadn't been brought to foreground, or pushed into the background in
the last 10 minutes), and would 'close' these automatically.

David



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