Geary.ImapDb.Database/utf8_case_insensitive_collation depends on a well
known UTF-8 collation order, but distros only ship C.UTF-8 by default
and Flatpak doesn't ship that, so support en_US.UTF-8 as a fallback.
See https://gitlab.com/freedesktop-sdk/freedesktop-sdk/issues/812
This allows ImapDB unit tests to avoid running the process when it
really doesn't need to be run. Should fix anther criticial about
ImapDB being null (see previous commit).
This shoud fix Geary.ImapDb.DatabaseTest test failing with a critical:
```
geary-CRITICAL **: 05:02:51.688: geary_db_database_get_is_open:
assertion 'GEARY_DB_IS_DATABASE (self)' failed
```
Doing so constitutes a circular ref, but since it is broken once GC is
complete anyway, it shouldn't be a problem.
Add workaround for autocomplete not showing up if query doesn't finish
fast enough. Add some padding around autocomplete cells. Show an icon
for desktop contacts and favourites. Replace whole model rather than
clearing and re-populating to avoid the entries flashing in the UI.
Remove ContactListStore, replace with Gtk.ListStore updated directly
from within the completion class. Use Application.Contact and store
rather than Geary.Contact objects and store for searching for contacts
for the completion model.
Update Application.Contact to have specific constructors for both
Folks-based and engine-based construction, remove the requirement for
the class to have a Geary.Contact field, and add a set of email
addresses as a property so that things like setting remote resource
loading prefs still works. This allows application contact to be
constructed from a Folks individual directly, without having to also
load an engine contact.
Update Application.ContactStore to cache Geary.Contact instances now
that they are always loaded from the database, rework loading code to
take advantage of the changes above.
Pass an instance of GearyApplication to ComposerWidget instead of just
the config object. This allows removing a number of uses of both the
app and engine singleton properties and will provide a means of
accessing the app's contact store for addresss completion (i.e. Folks).
Move args from open_async to ctor and use these to determine and store
DB file and attachment paths as properties. This allows constructing
the DB instance up front and markig it as non-nullable, simplifies
calling patterns and hence allows removing one use of the deprecated
Engine singleton, and by moving in the local data deletion
implementation from ImapEngine.GenericAccount, also allows removing a
static helper method.
Add a ContactHarvester arg to ImapDB.Folder.create_or_merge_email and
call it on the resulting email. Add and update a new harvester
property to MinimalFolder and pass that in as needed.
Replaces harvesting code in ImapDB code so as to be stand-alone and
reusable. Implement harvesting policy to only harvest from a set of
whitelisted special folder types (so junk and trash is not harvested)
and only harvest valid, non-spoofed, addresses.
Remove contact harvesting from DB version 005 (version 0.1.1), allowing
the implementation of both ContactStoreImpl and ImapDB.Database to be
cleaned up. Remove contact collection from ImapDB.Folder, reducing the
numer of Gee objects created when creating/merging messages. Finally,
remove the MessageAddresses object now that it is unused.
Prepare for doing composer autocomplete via queries by not loading all
contacts at startup in the engine. Update Geary.ContactStore API to that
end, and convert Geary.Account.get_contact_store accessor method to a
property.
When no spell checker langauges are explicitly set, use the set of
preferred languages for spell checking. Make spell-check-languages
setting nullable so we can differenciate between "use default"
and "disable spellchecking".