Add Desktop shortcut for "Wipe device"

This commit is contained in:
ClaraCrazy
2023-07-24 19:32:10 +02:00
parent 5bee427277
commit 4160fda7f0
2 changed files with 3 additions and 0 deletions

View File

@@ -489,6 +489,8 @@ void desktop_run_keybind(Desktop* instance, InputType _type, InputKey _key) {
view_dispatcher_send_custom_event(instance->view_dispatcher, DesktopMainEventLockKeypad); view_dispatcher_send_custom_event(instance->view_dispatcher, DesktopMainEventLockKeypad);
} else if(!strncmp(keybind, "Lock with PIN", MAX_KEYBIND_LENGTH)) { } else if(!strncmp(keybind, "Lock with PIN", MAX_KEYBIND_LENGTH)) {
view_dispatcher_send_custom_event(instance->view_dispatcher, DesktopMainEventLockWithPin); view_dispatcher_send_custom_event(instance->view_dispatcher, DesktopMainEventLockWithPin);
} else if(!strncmp(keybind, "Wipe Device", MAX_KEYBIND_LENGTH)) {
loader_start_detached_with_gui_error(instance->loader, "Storage", "wipe");
} else { } else {
loader_start_detached_with_gui_error(instance->loader, keybind, NULL); loader_start_detached_with_gui_error(instance->loader, keybind, NULL);
} }

View File

@@ -15,6 +15,7 @@ const char* EXTRA_KEYBINDS[] = {
"Lock Keypad", "Lock Keypad",
"Lock with PIN", "Lock with PIN",
"Passport", "Passport",
"Wipe Device",
}; };
const size_t EXTRA_KEYBINDS_COUNT = COUNT_OF(EXTRA_KEYBINDS); const size_t EXTRA_KEYBINDS_COUNT = COUNT_OF(EXTRA_KEYBINDS);