mirror of
https://github.com/ALEZ-DEV/Babylonia-terminal.git
synced 2025-12-16 09:28:53 +00:00
some refactor and cleaning
This commit is contained in:
parent
0a60f79daa
commit
f793b18b2c
@ -145,6 +145,7 @@ impl Worker for HandleComponentInstallation {
|
||||
|
||||
if let Err(error) = GameManager::install_wine(game_dir.clone(), proton_release, Some(progress_bar.clone())).await {
|
||||
sender.output(download_components::DownloadComponentsMsg::ShowError(format!("Failed to install proton : {}", error))).unwrap();
|
||||
return;
|
||||
}
|
||||
|
||||
let _ = sender
|
||||
@ -156,6 +157,7 @@ impl Worker for HandleComponentInstallation {
|
||||
|
||||
if let Err(error) = GameManager::install_dxvk(&get_proton().await, game_dir, dxvk_release, Some(progress_bar.clone())).await {
|
||||
sender.output(download_components::DownloadComponentsMsg::ShowError(format!("Failed to install DXVK : {}", error))).unwrap();
|
||||
return;
|
||||
}
|
||||
|
||||
let _ = sender
|
||||
@ -167,6 +169,7 @@ impl Worker for HandleComponentInstallation {
|
||||
|
||||
if let Err(error) = GameManager::install_font(&get_proton().await, Some(progress_bar.clone())).await {
|
||||
sender.output(download_components::DownloadComponentsMsg::ShowError(format!("Failed to install fonts : {}", error))).unwrap();
|
||||
return;
|
||||
}
|
||||
|
||||
let _ = sender
|
||||
@ -178,7 +181,7 @@ impl Worker for HandleComponentInstallation {
|
||||
|
||||
if let Err(error) = GameManager::install_dependencies(&get_proton().await).await {
|
||||
sender.output(download_components::DownloadComponentsMsg::ShowError(format!("Failed to install dependencies : {}", error))).unwrap();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
debug!("Finished to installing the components!");
|
||||
|
||||
@ -141,16 +141,6 @@ impl SimpleAsyncComponent for DownloadComponentsPage {
|
||||
|
||||
connect_clicked => DownloadComponentsMsg::UpdateCurrentlyInstalling(CurrentlyInstalling::Proton),
|
||||
},
|
||||
|
||||
gtk::Button {
|
||||
set_css_classes: &["suggested-action", "pill"],
|
||||
|
||||
set_label: "Test dialog",
|
||||
set_hexpand: false,
|
||||
set_width_request: 200,
|
||||
|
||||
connect_clicked => DownloadComponentsMsg::ShowError(String::from("Test dialog")),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -283,12 +273,7 @@ impl SimpleAsyncComponent for DownloadComponentsPage {
|
||||
let model = DownloadComponentsPage {
|
||||
proton_combo: adw::ComboRow::new(),
|
||||
dxvk_combo: adw::ComboRow::new(),
|
||||
//error_dialog: CopyDialog::builder()
|
||||
// .transient_for(&root)
|
||||
// .launch(())
|
||||
// .forward(sender.input_sender(), move |msg| match msg {
|
||||
// DialogOutput::Close => DownloadComponentsMsg::Quit,
|
||||
// }),
|
||||
|
||||
proton_versions: proton_releases,
|
||||
dxvk_versions: dxvk_releases,
|
||||
selected_proton_version: None,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user