Some fixes

This commit is contained in:
Ward from fusion-voyager-3 2024-01-25 18:18:52 +03:00
parent 1cde6ad6f9
commit cba0e00264
5 changed files with 28 additions and 3 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
pika-installer-gtk4 (1.0.0-100pika3) pikauwu; urgency=low pika-installer-gtk4 (1.0.0-100pika4) pikauwu; urgency=low
* First release * First release

View File

@ -129,7 +129,7 @@ pub fn eula_page(content_stack: &gtk::Stack) {
- password: - password:
MEANING: JUST PRESS ENTER") MEANING: JUST PRESS ENTER")
.build(); .build();
let eula_selection_text_view = gtk::TextView::builder() let eula_selection_text_view = gtk::TextView::builder()
.hexpand(true) .hexpand(true)
.vexpand(true) .vexpand(true)
@ -141,6 +141,11 @@ pub fn eula_page(content_stack: &gtk::Stack) {
.buffer(&eula_buffer) .buffer(&eula_buffer)
.build(); .build();
let eula_selection_text_scroll = gtk::ScrolledWindow::builder()
.height_request(350)
.child(&eula_selection_text_view)
.build();
let eula_accept_checkbutton = gtk::CheckButton::builder() let eula_accept_checkbutton = gtk::CheckButton::builder()
.label("I Agree and Accept the User license Agreement") .label("I Agree and Accept the User license Agreement")
.margin_top(15) .margin_top(15)
@ -152,7 +157,7 @@ pub fn eula_page(content_stack: &gtk::Stack) {
// / eula_selection_box appends // / eula_selection_box appends
//// add text and and entry to eula page selections //// add text and and entry to eula page selections
eula_selection_box.append(&eula_selection_text); eula_selection_box.append(&eula_selection_text);
eula_selection_box.append(&eula_selection_text_view); eula_selection_box.append(&eula_selection_text_scroll);
eula_selection_box.append(&eula_accept_checkbutton); eula_selection_box.append(&eula_accept_checkbutton);
// / eula_header_box appends // / eula_header_box appends

View File

@ -198,6 +198,11 @@ pub fn keyboard_page(content_stack: &gtk::Stack) {
keyboard_selection_expander_row.set_title(&keyboard_layout); keyboard_selection_expander_row.set_title(&keyboard_layout);
bottom_next_button.set_sensitive(true); bottom_next_button.set_sensitive(true);
keyboard_data_buffer.set_text(&keyboard_layout); keyboard_data_buffer.set_text(&keyboard_layout);
Command::new("setxkbmap")
.arg("-layout")
.arg(keyboard_layout.clone())
.spawn()
.expect("keyboard failed to start");
} }
})); }));
if current_keyboard.contains(&(keyboard_layout_clone)) { if current_keyboard.contains(&(keyboard_layout_clone)) {
@ -221,6 +226,9 @@ pub fn keyboard_page(content_stack: &gtk::Stack) {
//// Add the keyboard selection/page content box to keyboard main box //// Add the keyboard selection/page content box to keyboard main box
keyboard_main_box.append(&keyboard_selection_box); keyboard_main_box.append(&keyboard_selection_box);
//// Add the keyboard selection/page content box to keyboard main box
keyboard_main_box.append(&gtk::Entry::builder().hexpand(true).valign(Align::End).vexpand(false).margin_bottom(15).margin_top(15).margin_end(15).margin_start(15).build());
keyboard_main_box.append(&bottom_box); keyboard_main_box.append(&bottom_box);
// / Content stack appends // / Content stack appends

View File

@ -229,6 +229,12 @@ pub fn language_page(content_stack: &gtk::Stack) {
fs::remove_file("/tmp/pika-installer-gtk4-lang.txt").expect("Bad permissions on /tmp/pika-installer-gtk4-lang.txt"); fs::remove_file("/tmp/pika-installer-gtk4-lang.txt").expect("Bad permissions on /tmp/pika-installer-gtk4-lang.txt");
} }
fs::write("/tmp/pika-installer-gtk4-lang.txt", lang_data_buffer_clone.text(&lang_data_buffer_clone.bounds().0, &lang_data_buffer_clone.bounds().1, true).to_string()).expect("Unable to write file"); fs::write("/tmp/pika-installer-gtk4-lang.txt", lang_data_buffer_clone.text(&lang_data_buffer_clone.bounds().0, &lang_data_buffer_clone.bounds().1, true).to_string()).expect("Unable to write file");
Command::new("sudo")
.arg("localectl")
.arg("set-locale")
.arg("LANG=".to_owned() + &lang_data_buffer_clone.text(&lang_data_buffer_clone.bounds().0, &lang_data_buffer_clone.bounds().1, true).to_string())
.spawn()
.expect("locale failed to start");
content_stack.set_visible_child_name("eula_page") content_stack.set_visible_child_name("eula_page")
})); }));
bottom_back_button.connect_clicked(clone!(@weak content_stack => move |_| { bottom_back_button.connect_clicked(clone!(@weak content_stack => move |_| {

View File

@ -224,6 +224,12 @@ pub fn timezone_page(content_stack: &gtk::Stack) {
fs::remove_file("/tmp/pika-installer-gtk4-timezone.txt").expect("Bad permissions on /tmp/pika-installer-gtk4-timezone.txt"); fs::remove_file("/tmp/pika-installer-gtk4-timezone.txt").expect("Bad permissions on /tmp/pika-installer-gtk4-timezone.txt");
} }
fs::write("/tmp/pika-installer-gtk4-timezone.txt", timezone_data_buffer_clone.text(&timezone_data_buffer_clone.bounds().0, &timezone_data_buffer_clone.bounds().1, true).to_string()).expect("Unable to write file"); fs::write("/tmp/pika-installer-gtk4-timezone.txt", timezone_data_buffer_clone.text(&timezone_data_buffer_clone.bounds().0, &timezone_data_buffer_clone.bounds().1, true).to_string()).expect("Unable to write file");
Command::new("sudo")
.arg("timedatectl")
.arg("set-timezone")
.arg(&timezone_data_buffer_clone.text(&timezone_data_buffer_clone.bounds().0, &timezone_data_buffer_clone.bounds().1, true).to_string())
.spawn()
.expect("timezone failed to start");
content_stack.set_visible_child_name("keyboard_page") content_stack.set_visible_child_name("keyboard_page")
})); }));
bottom_back_button.connect_clicked(clone!(@weak content_stack => move |_| { bottom_back_button.connect_clicked(clone!(@weak content_stack => move |_| {