Message window goes blank

Double-click on a message in the mailbox index, and it's opened in a 
new message window. Close the mailbox using the notebook tab or the 
menu item, and the message window goes blank. That's good, because the 
message, while still readable, is essentially inaccessible with the 
mailbox closed. In particular, the LibBalsaMessage object representing 
the message is destroyed.

However, the message window's controls (menu items and toolbar buttons) 
remain sensitive, and if you activate one you get an instant crash, 
basically because of the destruction of the LibBalsaMessage object. 
That's bad. Here are some alternatives:

1. Desensitize the controls.
2. A window with no content and broken (or insensitive)
    controls is useless: destroy it.
3. The LibBalsaMailbox object representing the mailbox,
    and the LibBalsaMessage objects representing its messages,
    don't have to be closed just because you `closed' the
    mailbox using the notebook tab or the menu item.
    The message window could keep the mailbox open and the message
    it's showing valid, by ref'ing them (and opening
    the mailbox itself).

Personally, I don't use the message window often--the preview pane does 
it for me. So my preference, which is for Alternative 3, doesn't mean a 
lot. How do you feel about them? And does anyone know of a reason* why 
Alternative 3 wouldn't work?


* Well, I know of one: if the part of the mailbox tree containing the 
current mailbox is rescanned while the message window is holding the 
mailbox open, we would wind up with two LibBalsaMailbox objects 
representing the same real mailbox, which sounds *really* bad for your 
health. But that's already an issue when composing a reply, as the 
compose window holds on to the mailbox containing the message to which 
you're replying, so it can mark the message as replied-to. We need to 
fix that anyway, perhaps by adding a 
"close-this-mailbox-now-or-I'll-kick-your-*ss" signal to the mailbox 

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