Re: Startup strangeness



As Alice said: Curiouser and curiouser.

On 2009.09.22 09:00, Peter Bloomfield wrote:
On 09/21/2009 06:23:26 PM Mon, Jack Ostroff wrote:
This is a follow-up/revision of my previous response to this. I was going to response instead to your post with the original patch, since there were comments that explained some of the behavior better - but that was to me and balsa-maint, not the group.

First, now I understand that the order of tabs for the other open mailboxes is effectively random. As a future enhancement, it would be nice if Balsa actually remembered the order - otherwise what is the point of being able to drag tabs to change the order?
Yes, it would; as it stands, it's just for the current session. That's still worth something: if you have many mailboxes open and some scroll out of the window, you can drag the most interesting ones to the left and see all their tabs. But remembering the order would let you establish a favorite order and be sure of seeing it.

The problem now is that it still does not seem to remember the last open mailbox. I see "CurrentMailboxURL=" in the config file, but never with any value.
I'm puzzled by "CurrentMailboxURL=". I get that only if I manually close all mailboxes before quitting. Perhaps Balsa is closing them all before saving the info to the config file--but I don't know how that would happen!
I don't think it's closing them, because it's correctly remembering that they were open. However, I have not yet seen any value for this string, and I've tried with various numbers of mailboxes left open.

If the Inbox is open, that is what is displayed, whether or not the "open inbox on startup" is checked or not. It is also displayed even if it was not open, if "open inbox on startup" IS checked. If Inbox is not open, and not opened on startup, I can't tell how it chooses which mailbox to display.

As it stands, "open inbox on startup" trumps the current mailbox code. It runs after the task for "remember open mailboxes", and forces a switch-page to the inbox. That was an oversight--but I guess it might also be the preferred action for a use who sets both options.
Perhaps if "open inbox on startup" but not if that is not set and the Inbox just happens to be open.

I'm not sure why Inbox is always the visible mailbox. Perhaps it's always the first mailbox in the list of open mailboxes--that's the one that's shown by the "remember open mailboxes" code; when CurrentMailboxURL is set to something non-NULL, it gets forced to the front of the list and hence is (supposed to be) shown.
I have yet to figure out how it chooses which mailbox to display. It is NOT consistantly the first or last mailbox marked as open in the config file. (I am assuming that is done by the "Open=true' in the viewByUrl-file section for that mailbox, since the OpenMailboxes= seems to list the URL for every mailbox, not just the open ones.

However - only the one mailbox is displayed. The other open mailboxes are opened without being displayed - so the startup appears much smoother, without the flickering.
Good--that's how it's supposed to work!

Is there anything else I can test to help track down the problem?
Keep watching CurrentMailboxURL in your config file--at some point it should start being non-NULL, and then you should see the correct mailbox at start-up.
I have not yet seen it non-NULL, which does seem strange. Am I the only one having this problem?

BTW: the -o option requires a full mailbox URL, not just a name--is that the issue?
I finally figured that out, while trying various -o options. That was getting the "couldn't find" messages. I don't think it's part of the main issue here.

I'm also still curious about something I mentioned in an email off-list: in main-window.c, in the function bw_notebook_switch_page_cb, the last two lines are
   g_free(balsa_app.current_mailbox_url);
   balsa_app.current_mailbox_url = g_strdup(mailbox->url);
Am I missing someting, or is it strange to set a value right after you have freed it?

I wonder if I would find anything by running balsa under a debugger, and putting a trace on balsa_app.current_mailbox_url.

Jack


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