mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +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,
|
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();
|
let key_init = keys.lock().unwrap().is_initialized().unwrap();
|
||||||
if !key_init {
|
if !key_init {
|
||||||
menuitems.push(MenuItem {
|
menuitems.push(MenuItem {
|
||||||
|
|
@ -92,22 +100,6 @@ pub fn create_main_menu(keys: Arc<Mutex<RootKeys>>, menu_management_sid: xous::S
|
||||||
close_on_select: true,
|
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 {
|
if key_init {
|
||||||
menuitems.push(MenuItem {
|
menuitems.push(MenuItem {
|
||||||
name: String::from_str(t!("mainmenu.prep_backup", xous::LANG)),
|
name: String::from_str(t!("mainmenu.prep_backup", xous::LANG)),
|
||||||
|
|
@ -117,6 +109,15 @@ pub fn create_main_menu(keys: Arc<Mutex<RootKeys>>, menu_management_sid: xous::S
|
||||||
close_on_select: true,
|
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 {
|
menuitems.push(MenuItem {
|
||||||
name: String::from_str(t!("mainmenu.battery_disconnect", xous::LANG)),
|
name: String::from_str(t!("mainmenu.battery_disconnect", xous::LANG)),
|
||||||
action_conn: Some(status_conn),
|
action_conn: Some(status_conn),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue