Rework Geary.Engine lifecycle managment

Now that its singleton is gone, and since it's ::open_asyc and
::close_async methods don't do anything async, just merge the former
with the class's ctor and make the latter non-async.

Explicitly construct an instance in Application.Client and ensure it
is closed there as well instead of in the controller, for consistency.
This commit is contained in:
Michael Gratton 2019-11-19 00:49:15 +11:00 committed by Michael James Gratton
parent 2e00e9b7f7
commit dccb81fcb1
4 changed files with 28 additions and 61 deletions

View file

@ -44,13 +44,7 @@ class Geary.EngineTest : TestCase {
this.res = this.tmp.get_child("res");
this.res.make_directory();
this.engine = new Engine();
this.engine.open_async.begin(
res, null,
(obj, res) => {
async_complete(res);
});
this.engine.open_async.end(async_result());
this.engine = new Engine(res);
this.account = new AccountInformation(
"test",