This introduces an HTML-based model to hold structured document
data inside of the Engine and present it in a cogent way to the
client, which can use its structure to present it properly in
whatever fashion it needs to.
This patch solves the following memory/resource leak problems:
(a) Gee.TreeSet doesn't drop references when destroyed. Fixed by
using a subclass that clears the set when destroyed (exactly same
as patch made to Gee, however that won't be in distribution for
awhile.)
(b) Imap.ClientSession was holding refs to CommandResponses after
they'd been completed. They're now dropped.
(c) Imap.ClientSessionManager now has an open/close_async() (called
by Imap.Account.open/close_async()) that drops all ClientSessions.
(d) All classes in Engine (and some in the client) use Geary.BaseObject,
which uses a static map to track outstanding held references to
it. The table is dumped when Geary exits. Must be enabled with a
./configure flag.
Two outstanding memory leaks persist (one for Imap.ResponseCodes and
another when messages are selected/deselected), so this doesn't close
the ticket, but testing and use has shown these changes to make a huge
improvement on memory usage and reducing crashes.
Testing at home showed prior commit still left a lot of locking
problems on a slow machine with a fragmented database. This locking
mechanism is a little better, counting down rather than up, giving a
lot of time initially for a write to commit, but the more the locked
transaction waits, the sooner it retries to get in ahead of later
transactions.
I noticed earlier that when an account was first created the
prefetcher didn't swing into action. It turned out that one of the
prefetcher fixes (for Gmail's STATUS/SELECT messages bug) reported
to the prefetcher than a folder was empty when first created. This
solves that problem, and ensures that the prefetcher (and all Engine
users) get an accurate total count when the Engine first starts.
Database locking can occur in SQLite far more often than the documentation
suggests, especially when under heavy load. This patch does three things:
(a) it uses a new retry scheme to handle BUSY errors, (b) key calls in
Db. module use this retry scheme, and (c) ImapDB.Folder calls that could
potentially take a long time (creating/merging lists of emails, listing
batches of email) are broken up into smaller transactions that don't
hold the transaction lock for so long and give SQLite a chance to
free internal buffers, which can cause BUSY errors.
Background prefetcher introduced open/close counts to allow the
same Folders to be opened and closed by multiple users. However,
open_count shouldn't be respected when forcing a Folder closed due
to remote error.
This was causing a bug where the connection would die but the Folder
would not close, leaving the program in a bad state.
This introduces a background account synchronizer into Geary that
prefetches email folder-by-folder to a user-configurable epoch. The
current default is 15 days.
Additional work to make this user-visible is coming, in particular with
The primary purpose for this feature is to allow "full" conversations
(#4293), which needs more of the mailbox stored locally to do searching.
Previously, we were taking folder names as they came off the wire.
Turns out IMAP specifies that folder names with 8 bit code points are
encoded in a crazy scheme unique to IMAP. Now, we properly decode that
scheme to the correct UTF-8 folder names to be displayed to the user.
There's also now a database upgrade path that converts all existing
mailboxes to the decoded version, so your existing database should just
keep working.
This doesn't solve #6205, as other unknown responses can cause this
problem as well, but it does fix this for the most-commonly reported
cause of this issue, MYRIGHTS.
We were presenting the main window with an erroneous timestamp, which
was causing composer windows to be created with an incorrect z order.
This presents the window without a timestamp, so there's no room for
error.
In some window managers, windows that display dialogs aren't
automatically presented. This manually presents the window before it
pops up the dialog, to keep behavior consistent.
* "Reply To" now labelled "Reply"
* Toolbar overflow menu labels no longer say "translated"
* .desktop file contains keywords
* For generic servers, "Remember password" now says "Remember passwords"
Ticket #6227 looks like a single problem, but in fact Tiago identified
it as two. Before this patch, the ComposerWindow assumed all prefilled
messages were either replies or forwards and prepended whitespace to
separate the user's message from the replied-to/forwarded one. This
is not the case with mailto: body's, which should be entered as-is to
a newly composed message.
There still exists #6227's issue with newlines not being inserted from
a mailto: link. That's enough of a side case we're committing this
now, as it's more common.
There's now a list of inboxes at the top of the sidebar if you have more
than one account. It gets the default selection if possible, so you
never have to see all the folders of your accounts if you work entirely
out of your inbox.