Settings/keymap backup path next to files + update notification messages (#24517)
Before:  After:  Release Notes: - N/A
This commit is contained in:
parent
cf74d653bd
commit
1a133ab9d8
5 changed files with 116 additions and 62 deletions
|
@ -145,12 +145,24 @@ pub fn settings_file() -> &'static PathBuf {
|
|||
SETTINGS_FILE.get_or_init(|| config_dir().join("settings.json"))
|
||||
}
|
||||
|
||||
/// Returns the path to the `settings_backup.json` file.
|
||||
pub fn settings_backup_file() -> &'static PathBuf {
|
||||
static SETTINGS_FILE: OnceLock<PathBuf> = OnceLock::new();
|
||||
SETTINGS_FILE.get_or_init(|| config_dir().join("settings_backup.json"))
|
||||
}
|
||||
|
||||
/// Returns the path to the `keymap.json` file.
|
||||
pub fn keymap_file() -> &'static PathBuf {
|
||||
static KEYMAP_FILE: OnceLock<PathBuf> = OnceLock::new();
|
||||
KEYMAP_FILE.get_or_init(|| config_dir().join("keymap.json"))
|
||||
}
|
||||
|
||||
/// Returns the path to the `keymap_backup.json` file.
|
||||
pub fn keymap_backup_file() -> &'static PathBuf {
|
||||
static KEYMAP_FILE: OnceLock<PathBuf> = OnceLock::new();
|
||||
KEYMAP_FILE.get_or_init(|| config_dir().join("keymap_backup.json"))
|
||||
}
|
||||
|
||||
/// Returns the path to the `tasks.json` file.
|
||||
pub fn tasks_file() -> &'static PathBuf {
|
||||
static TASKS_FILE: OnceLock<PathBuf> = OnceLock::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue