* src/engine/imap-engine/imap-engine-email-prefetcher.vala
(EmailPrefetcher): Connect to email_locally_{appended,inserted} rather
than email_{appended,inserted}.
* src/engine/imap-engine/replay-ops/imap-engine-list-email-by-id.vala
(AbstractListEmail): Throw an error if asking for a specific message,
asking for it to be included in the results, but the message not
actually appearing in the results.
Previously when appending new messages to a local folder we were ignoring
messages in the same folder with the same internal date and RFC822
size. This changes the ImapDB::Folder's behaviour in this case to use the
same message object but re-associate it with the folder, meaning on
re-sync, we don't find a hole in the message sequence again and go
searching for it over and over.
* src/engine/imap-db/imap-db-folder.vala
(Folder::do_search_for_duplicates): Break out UID check to simplify
call semantics and fast-path finding obvious duplicates. Look for
duplicate messages, but simply return them and let caller determine
policy.
(Folder::do_create_or_merge_email): Do UID duplicate check up front
before searching for dupe messages, if duplicate message is found,
append to the folder anyway and merge. Rework to be explicit about
param prerequisites up front and throw and error rather than asserting
if not met. Unify common calls in both create and merge cases.
* src/engine/imap-engine/imap-engine-account-synchronizer.vala
(AccountSynchronizer::sync_folder_async): For the last-ditch sync,
ensure we list newest-to-oldest and for int.MAX count to make sure the
folder is fully expanded.
* src/engine/imap-engine/replay-ops/imap-engine-abstract-list-email.vala
(AbstractListEmail): Update doc comments,
(AbstractListEmail::expand_vector_async): Document, re-work to simplify
the implementation and make it a bit more obvious how and why the lower
and higher bounds are calculated, and make sure they conform to the API
docs and use by existing call sites.
* src/engine/imap/api/imap-folder.vala (Account::uid_to_position_async):
Make caller's life easier by throwing an error if the results from the
server are obviously bogus and never return null.
* src/engine/imap-engine/imap-engine-account-synchronizer.vala
(AccountSynchronizer::process_folder_async): Since the folder might
not have opened yet, the counts may be wrong, so don't rely on them.
* src/engine/imap-engine/imap-engine-account-synchronizer.vala
(AccountSynchronizer): Log periodic aspects of the account synchroniser
as PERIODIC.
* src/engine/imap-engine/imap-engine-minimal-folder.vala
(MinimalFolder::find_earliest_email_async): Remove two debug calls that
were getting triggered for every sync pass. These should be in the
synchroniser instead.
* src/engine/imap-engine/imap-engine-generic-account.vala
(GenericAccount): When closing, wait for each folder to close before
shutting down the local and remote connections.
* src/client/application/geary-controller.vala
(GearyController::close_async): Close both inboxes and accounts in
parallel. Don't wait for conversation monitor or inboxes to close
before closing the account now that the accound does so. The account
needs to start closing so that the background synchroniser stops, and
that needs to stop before any open folder will close. Otherwise if the
background synchroniser is currently synchronising an inbox or any open
folder, then the account will not close until the synchroniser
finishes, which could block for a long time.
* src/engine/api/geary-abstract-local-folder.vala (Folder),
src/engine/imap-engine/imap-engine-minimal-folder.vala (MinimalFolder):
Notify the close semaphore in the classes' ctors so that if they are
never opened, calling wait_for_close_async() does not block.
* src/engine/imap-engine/imap-engine-account-synchronizer.vala
(AccountSynchronizer): Don't try to disconnect from account signals in
dtor, the instance may already be gone.
* src/engine/imap/api/imap-account.vala (Account): Replace camel case
methods names with underscores per style guide, fix sense of
is_no_select test in fetch_folder_cached_async() to account for the
double nagative, and clean up the resulting if/else clause a bit.
Thanks to Torben for bug report and inital patch.
* src/engine/imap/transport/imap-client-session.vala
(ImapClientSession::get_delimiter_for_path): If the folder root does
not exist as a namespace, look for an empty namespace, then default to
the personal namespace.
This adds a dependcy on libunwind for generating the back trace.
* src/CMakeLists.txt: Require libunwind-generic package and libunwind
VAPI. Update docs and debian/control with new dependencies.
* src/engine/api/geary-problem-report.vala (ProblemReport): Generate a
stack trace in the default constructor if an error is specified.
* src/client/components/main-window-info-bar.vala
(MainWindowInfoBar::format_details): Include stack trafe from problem
report in output if present.
* ui/main-window-info-bar.ui: Add a ScrolledWindow around the TextView
since the details could now be quite large.
* bindings/vapi/libunwind.vapi: Add bindings for libunwind courtesy
Guillaume Poirier-Morency, add Error enum.
* src/engine/util/util-connectivity-manager.vala: Add both a next-check
time and a delayed check timer so that if we are already connected and
a check ran recently, re can avoid running one again for a little while.
* src/engine/rfc822/rfc822-utils.vala (quote_body): Smart escape quoted
part, preserving whitespace if source message is plain text. Throw
exceptions rather that catching them to clean the code paths up a
bit. Update call sites.
* src/client/composer/composer-widget.vala (ComposerWidget::set_focus):
Ensure we grab the web view's focus only after its content has finished
loading.
* src/client/components/client-web-view.vala (ClientWebView): Add
is_content_loaded property and content_loaded signal, update and fire
when getting a contentLoaded message from the WebProcess.
* ui/client-web-view.js: Fire the contentLoaded message when loading is
complete. Add ClientPageStateTest test case to ensure it is working
fine.
* test/client/components/client-web-view-test-case.vala
(ClientWebViewTestCase::load_body_fixture): Use is_content_loaded
rather than is_loading as the test for loading having finished, since
we're actually interested in when the JS has finished loaded, not the
resources.
Fixes a failing unit test with WebKitGTK 2.18.
* ui/composer-web-view.js (EditContext::init): Check for and strip both "
and ' from start and end of font-family string.