mirror of
https://github.com/R0m1k3/TodoFlow.git
synced 2026-10-11 17:28:17 +02:00
Fix winreg predef and tauri systemTray config to enable system-tray Cargo feature
This commit is contained in:
1 parent
c8fd2346b4
commit
df5e562ea6
2 files changed
+7
-2
No files matched your search
@@ -28,7 +28,7 @@ fn set_autostart(enabled: bool) -> Result<(), String> {
|
||||
// Permet d'activer ou de désactiver le lancement automatique au démarrage de Windows.
|
||||
// On écrit directement dans le registre Windows (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run)
|
||||
// ce qui évite d'avoir à gérer un installateur complexe ou des plugins externes lourds.
|
||||
let hkcu = RegKey::predefined(HKEY_CURRENT_USER);
|
||||
let hkcu = RegKey::predef(HKEY_CURRENT_USER);
|
||||
let run_key = hkcu
|
||||
.open_subkey_with_flags(
|
||||
r"Software\Microsoft\Windows\CurrentVersion\Run",
|
||||
@@ -55,7 +55,7 @@ fn set_autostart(enabled: bool) -> Result<(), String> {
|
||||
#[tauri::command]
|
||||
fn get_autostart() -> Result<bool, String> {
|
||||
// Lit le registre Windows pour vérifier si l'application est configurée pour démarrer automatiquement.
|
||||
let hkcu = RegKey::predefined(HKEY_CURRENT_USER);
|
||||
let hkcu = RegKey::predef(HKEY_CURRENT_USER);
|
||||
let run_key = hkcu
|
||||
.open_subkey_with_flags(
|
||||
r"Software\Microsoft\Windows\CurrentVersion\Run",
|
||||
|
||||
@@ -48,6 +48,11 @@
|
||||
"security": {
|
||||
"csp": null
|
||||
},
|
||||
"systemTray": {
|
||||
"iconPath": "icons/icon.ico",
|
||||
"iconAsTemplate": false,
|
||||
"menuOnLeftClick": false
|
||||
},
|
||||
"windows": [
|
||||
{
|
||||
"fullscreen": false,
|
||||
|
||||
Reference in new issue
Block a user