mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
final re-org of top level menu before casting into CI
This commit is contained in:
parent
b9682c240f
commit
be6f898e63
1 changed files with 17 additions and 16 deletions
|
|
@ -48,6 +48,14 @@ pub fn create_main_menu(keys: Arc<Mutex<RootKeys>>, menu_management_sid: xous::S
|
|||
close_on_select: true,
|
||||
});
|
||||
|
||||
menuitems.push(MenuItem {
|
||||
name: String::from_str(t!("mainmenu.preferences", xous::LANG)),
|
||||
action_conn: Some(status_conn),
|
||||
action_opcode: StatusOpcode::Preferences.to_u32().unwrap(),
|
||||
action_payload: MenuPayload::Scalar([0, 0, 0, 0]),
|
||||
close_on_select: true,
|
||||
});
|
||||
|
||||
let key_init = keys.lock().unwrap().is_initialized().unwrap();
|
||||
if !key_init {
|
||||
menuitems.push(MenuItem {
|
||||
|
|
@ -91,22 +99,6 @@ pub fn create_main_menu(keys: Arc<Mutex<RootKeys>>, menu_management_sid: xous::S
|
|||
action_payload: MenuPayload::Scalar([0, 0, 0, 0]),
|
||||
close_on_select: true,
|
||||
});
|
||||
|
||||
menuitems.push(MenuItem {
|
||||
name: String::from_str(t!("mainmenu.preferences", xous::LANG)),
|
||||
action_conn: Some(status_conn),
|
||||
action_opcode: StatusOpcode::Preferences.to_u32().unwrap(),
|
||||
action_payload: MenuPayload::Scalar([0, 0, 0, 0]),
|
||||
close_on_select: true,
|
||||
});
|
||||
|
||||
menuitems.push(MenuItem {
|
||||
name: String::from_str(t!("mainmenu.lockdevice", xous::LANG)),
|
||||
action_conn: Some(status_conn),
|
||||
action_opcode: StatusOpcode::Reboot.to_u32().unwrap(),
|
||||
action_payload: MenuPayload::Scalar([0, 0, 0, 0]),
|
||||
close_on_select: true,
|
||||
});
|
||||
|
||||
if key_init {
|
||||
menuitems.push(MenuItem {
|
||||
|
|
@ -117,6 +109,15 @@ pub fn create_main_menu(keys: Arc<Mutex<RootKeys>>, menu_management_sid: xous::S
|
|||
close_on_select: true,
|
||||
});
|
||||
}
|
||||
|
||||
menuitems.push(MenuItem {
|
||||
name: String::from_str(t!("mainmenu.lockdevice", xous::LANG)),
|
||||
action_conn: Some(status_conn),
|
||||
action_opcode: StatusOpcode::Reboot.to_u32().unwrap(),
|
||||
action_payload: MenuPayload::Scalar([0, 0, 0, 0]),
|
||||
close_on_select: true,
|
||||
});
|
||||
|
||||
menuitems.push(MenuItem {
|
||||
name: String::from_str(t!("mainmenu.battery_disconnect", xous::LANG)),
|
||||
action_conn: Some(status_conn),
|
||||
|
|
|
|||
Loading…
Reference in a new issue