From 8057fedac15f0fb175cdc4b81e2f9ca6da53c012 Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Sat, 19 Aug 2023 10:57:50 +0200 Subject: [PATCH] revert(ui): returned back patch-related settings in first run window --- src/ui/first_run/default_paths.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ui/first_run/default_paths.rs b/src/ui/first_run/default_paths.rs index f1136e7..dab3129 100644 --- a/src/ui/first_run/default_paths.rs +++ b/src/ui/first_run/default_paths.rs @@ -24,6 +24,7 @@ pub struct DefaultPathsApp { game_global: PathBuf, game_china: PathBuf, components: PathBuf, + patch: PathBuf, temp: PathBuf } @@ -36,6 +37,7 @@ pub enum Folders { GameGlobal, GameChina, Components, + Patch, Temp } @@ -179,6 +181,17 @@ impl SimpleAsyncComponent for DefaultPathsApp { connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Components) }, + adw::ActionRow { + set_title: &tr!("patch-folder"), + set_icon_name: Some("folder-symbolic"), + set_activatable: true, + + #[watch] + set_subtitle: model.patch.to_str().unwrap(), + + connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Patch) + }, + adw::ActionRow { set_title: &tr!("temp-folder"), set_icon_name: Some("folder-symbolic"), @@ -275,6 +288,7 @@ impl SimpleAsyncComponent for DefaultPathsApp { game_global: CONFIG.game.path.global.clone(), game_china: CONFIG.game.path.china.clone(), components: CONFIG.components.path.clone(), + patch: CONFIG.patch.path.clone(), #[allow(clippy::or_fun_call)] temp: CONFIG.launcher.temp.clone().unwrap_or(std::env::temp_dir()) @@ -405,6 +419,7 @@ impl DefaultPathsApp { config.game.path.global = self.game_global.clone(); config.game.path.china = self.game_china.clone(); config.components.path = self.components.clone(); + config.patch.path = self.patch.clone(); config.launcher.temp = Some(self.temp.clone()); Config::update_raw(config)