The GitLab migration happened and all the modules
that previously were pointed to git.gnome.org now
should point to gitlab.gnome.org.
This fixes the Flatpak nightly build.
* src/engine/api/geary-engine.vala (Engine): Move account_added and
account_removed signals to AccountRemoved since the engine isn't
tracking this any more. Remove bool param from add_account for the same
reason and update call sites.
* src/client/accounts/account-manager.vala (AccountManager): Add signals
to track when SSO accounts are updated or removed. Listen to the GOA
service for account changes and do the right thing when they occur.
* src/client/application/geary-controller.vala (GearyController): Listen
for AccountManager SSO signals and handle accordingly.
ConfigFile is a GLib.KeyFile-like class (and is backed by a KeyFile) that
nonetheless provides convenient a high-level API for getting and setting
grouped config values and asynchronous loading and saving.
* src/engine/util/util-config-file.vala: New ConfigFile class.
* src/engine/api/geary-service-information.vala (ServiceInformation):
Require ConfigFile groups rather than KeyFile instances for loading and
saving. Update subclasses and unit tests.
* src/client/accounts/account-manager.vala (AccountManager): Move generic
account key consts here from Config. Instead of using KeyFile directly,
use ConfigFile groups for loading and saving settings. Rename load and
save methods to be a bit more consistent with the class's role, and
make save_account() throw its errors so they can be reported to the
user. Update call sites.
* src/client/accounts/local-service-information.vala
(LocalServiceInformation): Move service-specific config key consts
here, use new ConfigFile groups for loading and saving.
* src/engine/api/geary-config.vala: Removed, all config consts have been
moved to the classes using them and KeyFile convenience methods
subsumed by ConfigFile.
* src/engine/api/geary-engine.vala (Engine): Require a ServiceInformation
object for IMAP and SMTP when creating orphan info objects. Update call
sites.
* src/client/accounts/account-manager.vala (AccountManager): provide
factory methods for constructing local service info objects. Use these
when re-constituting accounts. Use a singleton SecretMediator object
instance as a bonus.
* src/client/accounts/add-edit-page.vala (AddEditPage): Get
ServiceInformation objects from the account manager, pass an instance
of GearyApplication through so it has access to the manager. Update
call chains back to GearyController to pass the app instance through.
* src/engine/api/geary-service-information.vala (ServiceInformation):
Make KeyFile arg mandator for load and save methods, since it will
always need to be provided. Update subclasses.
* src/client/accounts/local-service-information.vala
(LocalServiceInformation): Remove from Geary package since it's not an
engine class. Update call sites.
Instead of passing in user config and data base dirs to the Engine from
the app, then pulling them out from the engine again from the app, just
store them in AccountManager, since that's where they are needed.
* src/client/accounts/account-manager.vala (AccountManager): Store user
config and data base dirs directly rather than getting them from the
engine. Split account directory creation out into a separate method so
they aren't re-made every time the config is saved.
* src/engine/api/geary-engine.vala (Engine): Remove user config and data
dir properties and open_async args. Update call sites and unit tests.
* src/client/application/geary-controller.vala (GearyController): Chase
AccountManager and Engine API changes. Ensure account dirs are created
when an new account is added.
* src/engine/api/geary-account-information.vala (AccountInformation):
Explicitly track copies rather relying on account dirs being
null. Don't require dirs be set in the default ctor, since they won't
be known, provide a method for updating them later on instead.
* src/client/accounts/account-manager.vala (AccountManager): Don't try
creating any directories when loading accounts, deal with config dir
not being present gracefully, streamline IO when loading a tiny bit by
loading file info in batches.
* src/client/application/geary-controller.vala (GearyController): Save
account info when special folders change.
* src/client/accounts/account-manager.vala (AccountManager): Ensure
saving info is serialised so that multiple writes cannot be attempted
simultaneously.
* src/engine/api/geary-account-information.vala (AccountInformation): Add
a save lock to use when serialising saving info instances.
* src/client/accounts/account-manager.vala (AccountManager): Just warn
when encountering a bogus account, don't stop loading.
* src/client/application/geary-controller.vala (GearyController): Just
warn when encountering an error when loading accounts, don't error
since that will quit the application.
This lets us convert the static methods to instance methods, pass an
instance of the Engine in so it doesn't need to use the global singleton
to access it, and in the future will provide a place to keep the GOA
service needed to be notified of accounts being added, changed and
removed there.
* src/client/accounts/account-manager.vala (AccountManager): Add an
Engine instance field, set it in the ctor, and use that rather than the
global singleton instance. Make static methods non-static.
* src/client/application/geary-controller.vala (GearyController): Add an
account manager property, populate it when opening the controller. Use
that for creating/saving accounts.
* src/client/accounts/account-dialog.vala (AccountDialog),
src/client/accounts/account-dialog-account-list-pane.vala
(AccountDialogAccountListPane): Add GearyApplication as a private field
so it can access an AccountManager instance for managing accounts. Pass
an instance in to the ctor and update call sites. Use that instance to
access the controller, engine, etc throughout instead of the global
singleton accessors.
This reverts commit 43341cd3e3, reversing
changes made to ffb4befdd8.
This is causing segfault in Geary.JS.to_string_released() when running
client tests, so reverting until a solution is found.
Commit 43341cd3 basically means we require vala 0.38, which excludes
Debian 9 (stretch), Ubuntu 16.04 (artful) and Fedora 26. Hence bump
minimum versions (and tidy up the list of deps) to reflect this.
This became necessary sooner rather than later since WebKitGTK 2.21
with the upstream valac bindings are now incompatible with the custom
in-source bindings.