gjdwebserver-overlay/mail-client/geary/files/0091-Application.Client-Rename-app-user-dirs-to-home-dirs.patch
Gerben Jan Dijkman c00ddb4dce Added Geary
2021-03-23 14:05:24 +01:00

73 lines
3.1 KiB
Diff

From 468ea6df5845b0014396114debc5ace6cbded769 Mon Sep 17 00:00:00 2001
From: Michael Gratton <mike@vee.net>
Date: Tue, 13 Oct 2020 23:40:02 +1100
Subject: [PATCH 091/124] Application.Client: Rename app user dirs to home dirs
---
src/client/application/application-client.vala | 12 ++++++------
src/client/application/application-controller.vala | 8 +++++---
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/src/client/application/application-client.vala b/src/client/application/application-client.vala
index e7f980c0..9bd05c31 100644
--- a/src/client/application/application-client.vala
+++ b/src/client/application/application-client.vala
@@ -759,22 +759,22 @@ public class Application.Client : Gtk.Application {
}
}
- /** Returns the application's base user configuration directory. */
- public GLib.File get_user_config_directory() {
+ /** Returns the application's base home configuration directory. */
+ public GLib.File get_home_config_directory() {
return GLib.File.new_for_path(
Environment.get_user_config_dir()
).get_child("geary");
}
- /** Returns the application's base user cache directory. */
- public GLib.File get_user_cache_directory() {
+ /** Returns the application's base home cache directory. */
+ public GLib.File get_home_cache_directory() {
return GLib.File.new_for_path(
GLib.Environment.get_user_cache_dir()
).get_child("geary");
}
- /** Returns the application's base user data directory. */
- public GLib.File get_user_data_directory() {
+ /** Returns the application's base home data directory. */
+ public GLib.File get_home_data_directory() {
return GLib.File.new_for_path(
GLib.Environment.get_user_data_dir()
).get_child("geary");
diff --git a/src/client/application/application-controller.vala b/src/client/application/application-controller.vala
index 24c244c8..a70b702b 100644
--- a/src/client/application/application-controller.vala
+++ b/src/client/application/application-controller.vala
@@ -125,8 +125,8 @@ 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();
+ GLib.File config_dir = application.get_home_config_directory();
+ GLib.File data_dir = application.get_home_data_directory();
// This initializes the IconFactory, important to do before
// the actions are created (as they refer to some of Geary's
@@ -140,7 +140,9 @@ internal class Application.Controller :
Components.WebView.init_web_context(
this.application.config,
this.application.get_web_extensions_dir(),
- this.application.get_user_cache_directory().get_child("web-resources")
+ this.application.get_home_cache_directory().get_child(
+ "web-resources"
+ )
);
Components.WebView.load_resources(config_dir);
Composer.WebView.load_resources();
--
2.29.2