From 64e0a6525f6f82a67649602de3fe1ad62c837c27 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Wed, 25 Jul 2018 09:52:17 -0500 Subject: Use listbox for device-specific advanced menu items This patch allows items to have more than one action surrounded by the tags like other GUI elements. The patch also adds new twrp command line options that let you reload the theme and switch to a specific page from the command line: adb shell twrp reloadtheme adb shell twrp changepage=advanced Change-Id: I838ea380a508be07b9fa617034d1954e116febd6 --- gui/gui.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gui/gui.cpp') diff --git a/gui/gui.cpp b/gui/gui.cpp index a270e365f..ce8c3e29d 100644 --- a/gui/gui.cpp +++ b/gui/gui.cpp @@ -474,6 +474,13 @@ static void ors_command_read() gui_set_FILE(orsout); PageManager::GetResources()->DumpStrings(); ors_command_done(); + } else if (strlen(command) == 11 && strncmp(command, "reloadtheme", 11) == 0) { + PageManager::RequestReload(); + ors_command_done(); + } else if (strlen(command) > 11 && strncmp(command, "changepage=", 11) == 0) { + char* pg = &command[11]; + gui_changePage(pg); + ors_command_done(); } else { // mirror output messages gui_set_FILE(orsout); -- cgit v1.2.3