Use listbox for device-specific advanced menu items

This patch allows items to have more than one action surrounded
by the <actions> 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
This commit is contained in:
Ethan Yonker
2018-07-25 09:52:17 -05:00
parent 908442dfb5
commit 64e0a6525f
8 changed files with 171 additions and 124 deletions
+7
View File
@@ -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);