integrate complete page
This commit is contained in:
parent
1eebe372d8
commit
3cf259db80
@ -203,5 +203,7 @@ pub fn build_ui(app: &adw::Application) {
|
|||||||
|
|
||||||
installation_progress_page::installation_progress_page(&carousel, &language_changed_action, installation_log_loop_receiver);
|
installation_progress_page::installation_progress_page(&carousel, &language_changed_action, installation_log_loop_receiver);
|
||||||
|
|
||||||
|
installation_complete_page::installation_complete_page(&carousel, &window, &language_changed_action, installation_log_status_loop_receiver);
|
||||||
|
|
||||||
window.present()
|
window.present()
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use crate::{build_ui::PikaKeymap, installer_stack_page};
|
use crate::{build_ui::PikaKeymap, config::LOG_FILE_PATH, installer_stack_page};
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use glib::{clone, closure_local};
|
use glib::{clone, closure_local};
|
||||||
use gnome_desktop::XkbInfoExt;
|
use gnome_desktop::XkbInfoExt;
|
||||||
@ -7,6 +7,7 @@ use std::{cell::RefCell, fs, path::Path, process::Command, rc::Rc};
|
|||||||
|
|
||||||
pub fn installation_complete_page(
|
pub fn installation_complete_page(
|
||||||
main_carousel: &adw::Carousel,
|
main_carousel: &adw::Carousel,
|
||||||
|
window: &adw::ApplicationWindow,
|
||||||
language_changed_action: &gio::SimpleAction,
|
language_changed_action: &gio::SimpleAction,
|
||||||
installation_log_status_loop_receiver: async_channel::Receiver<bool>,
|
installation_log_status_loop_receiver: async_channel::Receiver<bool>,
|
||||||
) {
|
) {
|
||||||
@ -92,6 +93,33 @@ pub fn installation_complete_page(
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
installation_complete_exit_button.connect_clicked(clone!(
|
||||||
|
#[strong]
|
||||||
|
window,
|
||||||
|
move |_|
|
||||||
|
{
|
||||||
|
window.close()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
installation_complete_reboot_button.connect_clicked(move |_| {
|
||||||
|
Command::new("reboot")
|
||||||
|
.spawn()
|
||||||
|
.expect("reboot failed to start");
|
||||||
|
});
|
||||||
|
|
||||||
|
installation_complete_view_logs_button.connect_clicked(move |_| {
|
||||||
|
Command::new("xdg-open")
|
||||||
|
.arg(LOG_FILE_PATH)
|
||||||
|
.spawn()
|
||||||
|
.expect("xdg-open failed to start");
|
||||||
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
installation_complete_page.set_child_widget(&content_box);
|
installation_complete_page.set_child_widget(&content_box);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -55,5 +55,8 @@ fn main() {
|
|||||||
app.connect_activate(build_ui);
|
app.connect_activate(build_ui);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let instance = SingleInstance::new(APP_ID).unwrap();
|
||||||
|
assert!(instance.is_single());
|
||||||
|
|
||||||
application.run();
|
application.run();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user