[geary/mjog/data-location-migration: 2/9] Application.Controller: Clean up config/data vars in ctor
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/data-location-migration: 2/9] Application.Controller: Clean up config/data vars in ctor
- Date: Tue, 13 Oct 2020 14:02:46 +0000 (UTC)
commit 215eda07e76bed70efc4af02d06df39bda634f4a
Author: Michael Gratton <mike vee net>
Date: Tue Oct 13 23:32:46 2020 +1100
Application.Controller: Clean up config/data vars in ctor
src/client/application/application-controller.vala | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/client/application/application-controller.vala
b/src/client/application/application-controller.vala
index ce7fdda64..9d33a7ec4 100644
--- a/src/client/application/application-controller.vala
+++ b/src/client/application/application-controller.vala
@@ -125,6 +125,9 @@ internal class Application.Controller :
this.application = application;
this.controller_open = cancellable;
+ GLib.File config_dir = application.get_user_config_directory();
+ GLib.File data_dir = application.get_user_data_directory();
+
// This initializes the IconFactory, important to do before
// the actions are created (as they refer to some of Geary's
// custom icons)
@@ -140,9 +143,7 @@ internal class Application.Controller :
this.application.get_user_cache_directory().get_child("web-resources")
);
- ClientWebView.load_resources(
- this.application.get_user_config_directory()
- );
+ ClientWebView.load_resources(config_dir);
Composer.WebView.load_resources();
ConversationWebView.load_resources();
Accounts.SignatureWebView.load_resources();
@@ -180,7 +181,7 @@ internal class Application.Controller :
// Hook up cert, accounts and credentials machinery
this.certificate_manager = yield new Application.CertificateManager(
- this.application.get_user_data_directory().get_child("pinned-certs"),
+ config_dir.get_child("pinned-certs"),
cancellable
);
@@ -190,8 +191,8 @@ internal class Application.Controller :
this.account_manager = new Accounts.Manager(
libsecret,
- this.application.get_user_config_directory(),
- this.application.get_user_data_directory()
+ config_dir,
+ data_dir
);
this.account_manager.account_added.connect(
on_account_added
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]