Discovered a few binding problems while working on another issue,
in particular gmime_parser_construct_message()'s return object
not being freed, which can hold an entire message (attachments and
all) in memory.
Autocomplete now uses a properly-quoted RFC822 string when an address
is selected from the drop-down list. This resolves the most egregious
case of the composer not accepting an email address formatted
[Last, First <mailbox@host>], as autocomplete is heavily relied-upon
and Geary is presenting an address that can't be used, which is
confusing.
It's still possible for the user to manually enter such an address w/o
quotes (either typing or pasting it in). However, this seems like a
far less problematic use case. The ticket remains open due to this,
however.
Finally, some comments have been added to clarify the difference
between RFC822.MailboxAddress.get_full_address() and
to_rfc822_string(). I've also done a code-review to check that both
methods are being used correctly elsewhere in the code.
Make two sets of the buttons, one for the start and one for the end of
the HeaderBar, and show one or the other based on the the theme. Watch
the style context for changes in the theme and update accordingly. Once
the composer is detached, the default close button is used, so hide both
and stop watching for style updates. This assumes we never re-attach a
composer.
We also add a bit of space between the separator and the detach button.
https://bugzilla.gnome.org/show_bug.cgi?id=733372
This patch solves two issues: (a) sometimes messages stick around in
conversations too long because Geary hasn't synchronized with Trash
(therefore realizing they should be blacklisted), and (b) All Mail can
take a long time to synchronize because of its bulk size.
This patch moves Trash (and Sent Mail) higher up in priority and moves
All Mail and Archive down to reflect these issues.
Move the buttons from the bottom of the composer into the header. The
draft save text is moved into the composer toolbar, for lack of a better
location. When it's inline, we insert our own close button, so we can
control what it does. When it's detached (and not using Unity), we
enable to default close button.
https://bugzilla.gnome.org/show_bug.cgi?id=731537
Move operation could lose emails if the copy destination doesn't
exist (or quota reached, etc.) This de-pipelines the move operation
into a copy and a delete, guaranteeing the delete only occurs if the
copy succeeds.
Geary can now be configured to notify of new mail at startup. When
the user logs in, Geary will autostart with a hidden window and
notify of new mail as usual. When Geary is formally executed by
the user the Geary window simply appears.
In this mode, if the user closes the window Geary will return to its
hidden state. Quit must be used to close the process.
Although not completely solved, this reduces database pauses
(along with prior commit improving parallelization of database) by
how ImapDB.Folder accesses the database. In particular, one code
path required an INNER JOIN that simply took too long (~8s) on large
databases, locking the entire db in the process. Tests and hacking
showed that, annoyingly, manually performing the INNER JOIN by
intersecting the results of two SQL transactions was more efficient.
In addition, creating/merging emails into the database is done in
chunks with a small pause between each chunk to allow other tasks
the opportunity to get to the database. Create/merge is one of the
most expensive operations on the database.
Folder now checks the open_count (as well as other details) to
determine if it should retry a closed connection; this prevents
certain race conditions where the Folder will continue to be reopened
even though it was legitimately closed by the caller.
Occassionally the EmailPrefetcher would not signal its work was
completed, causing the AccountSynchronizer to deadlock (it waits
until the EmailPrefetcher completes before closing the Folder and
moving on to the next one). The problem was due to the
EmailPrefetcher not clearing a timeout id, making other code think
other work was outstanding when it was in fact completed.
This doesn't completely solve bug #714450 but it does display a reply
or forwarded message more quickly in a conversation (rather than wait
for the Account object to signal that a Folder's contents has changed,
which is polled and may take minutes to notice).
This also slightly rearranges the priority order for background
synchronization, recognizing that some Folders (Drafts, Sent Mail) are
as active as All Mail but quicker to synchronize with (i.e. don't wait
for All Mail to complete synchronization before checking those).
Prior attempts to use multiple threads to access the SQLite database
failed due to locking reasons. This re-attempt fixes this, alloc'ing
four threads per database and slightly changing the locking strategy
for read-write transactions.
Part of the prior issues may have been an attempt to use a connection
pool (this patch simply opens a new connection for each transaction,
which for our purposes seems fine). The read-write strategy of
deferring locking until the write portion of the transaction was also
too optimistic, causing transactions to stall in the middle of their
operations.