view::{Nameable, Resizable, ViewWrapper},
views::{
Button, Checkbox, Dialog, DummyView, EditView, LinearLayout, PaddedView, Panel,
- ProgressBar, ResizedView, ScrollView, SelectView, TextContent, TextView,
+ ProgressBar, ResizedView, ScrollView, SelectView, TextContent, TextView, ViewRef,
},
Cursive, CursiveRunnable, ScreenId, View,
};
timezone: TimezoneOptions::default(),
password: PasswordOptions::default(),
network: NetworkOptions::default(),
+ reboot: false,
},
available_disks,
setup_info,
.child(Button::new("Previous", switch_to_prev_screen))
.child(DummyView)
.child(Button::new("Install", |siv| {
+ let reboot = siv
+ .find_name("reboot-after-install")
+ .map(|v: ViewRef<Checkbox>| v.is_checked())
+ .unwrap_or_default();
+
+ siv.with_user_data(|state: &mut InstallerState| {
+ state.options.reboot = reboot;
+ });
+
switch_to_next_screen(siv, InstallerStep::Install, &install_progress_dialog);
})),
));