Stop progress monitor when open has completed: Closes bug #728936
This ensures the progress monitor has stopped when opening has
completed, whether successful or due to error. Because the
remote_open_async() call can be reentered if a connection re-
establishment is attempted, important to stop the monitor before
calling close_internal_async().
GMime documentation suggests its date conversion methods take a
time zone offset in hours, but it appears the number must be base-100
to get the right results (i.e. -7 becomes "-0700").
Prior commit would retry FETCH command for *any* Error, which is
incorrect. It should only retry when RETRY is thrown, otherwise it
should re-throw the Error.
Make Geary compat. with mail.ru and netcourrier.com: Closes bgo#714902
imap.mail.ru and imap.netcourrier.com both do not parse this IMAP
request:
a001 FETCH 1 BODY[HEADER.FIELDS (FIELDS)]
The problem is the space between "HEADER.FIELDS" and "(FIELDS)", which
is valid IMAP.
This patch introduces detection of this problem and falls back to an
IMAP syntax where the space is removed. Since other servers don't
recognize this syntax, it's important to detect this specific case and
use it.
Since multiple servers have reported this problem, this approach
rather than a list of hacks by domain name was adopted. If this
detection algorithm has unintended side-effects, a domain-name listing
may be considered later.
Prevent AccountSynchronizier from deadlocking under certain conditions
The AccountSynchronizer could deadlock waiting for an EmailPrefetcher
to finish under certain conditions, particularly if the folder closed
before the prefetcher was finished. This lead to a state where the
AccountSynchronizer would never synchronize against unopened folders.
If Geary was left open for a long time and the user clicked on All
Mail, rather than the current state of that folder appearing
immediately, it could take a moment for Geary to fetch the envelopes
and headers/bodies.
Fixing this closes bgo#713447, which was also due to other bugs that
have been fixed over time (in particular, the startup speedup work in
0.5) and better spinner management (bgo#713703). It also corrects
a problem where detection of new mail while opening the folder let
to prefetching that mail, which was unnecessary because once the
folder is fully opened all unsynchronized mail is detected and pulled
down.