mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-11-24 05:46:17 +03:00
build: updated development libraries versions
GTK 4.8 -> 4.12 Libadwaita 1.2 -> 1.3 Relm4 0.6.2 -> 0.7.0-beta.2
This commit is contained in:
parent
5e8db5b3a9
commit
e6076ef4a5
25 changed files with 622 additions and 516 deletions
864
Cargo.lock
generated
864
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
10
Cargo.toml
10
Cargo.toml
|
@ -25,11 +25,11 @@ features = ["all", "genshin"]
|
|||
# path = "../anime-launcher-sdk" # ! for dev purposes only
|
||||
|
||||
[dependencies]
|
||||
relm4 = { version = "0.6.0", features = ["macros", "libadwaita"] }
|
||||
gtk = { package = "gtk4", version = "0.6", features = ["v4_8"] }
|
||||
adw = { package = "libadwaita", version = "0.4", features = ["v1_2"] }
|
||||
relm4 = { version = "0.7.0-beta.2", features = ["macros", "libadwaita"] }
|
||||
gtk = { package = "gtk4", version = "0.7.3", features = ["v4_12"] }
|
||||
adw = { package = "libadwaita", version = "0.5.3", features = ["v1_3"] }
|
||||
|
||||
rfd = { version = "0.12.0", features = ["xdg-portal"], default-features = false }
|
||||
rfd = { version = "0.12.1", features = ["xdg-portal"], default-features = false }
|
||||
open = "5.0.0"
|
||||
whatadistro = "0.1.0"
|
||||
|
||||
|
@ -45,4 +45,4 @@ tracing-subscriber = "0.3"
|
|||
fluent-templates = "0.8"
|
||||
unic-langid = "0.9"
|
||||
|
||||
human-panic = "1.2.0"
|
||||
human-panic = "1.2.2"
|
||||
|
|
|
@ -19,14 +19,15 @@ ru-ru = Русский
|
|||
de-de = Deutsch
|
||||
fr-fr = Français
|
||||
es-es = Español
|
||||
tr-tr = Türkçe
|
||||
pt-br = Português
|
||||
it-it = Italiano
|
||||
id-id = Indonesia
|
||||
zh-cn = 简体中文
|
||||
ja-jp = 日本語
|
||||
tr-tr = Türkçe
|
||||
pl-pl = Polski
|
||||
hu-hu = Magyar
|
||||
sv-se = Svenska
|
||||
pt-br = Português
|
||||
pl-pl = Polski
|
||||
vi-vn = Tiếng Việt
|
||||
nl-nl = Nederlands
|
||||
zh-cn = 简体中文
|
||||
ja-jp = 日本語
|
||||
ko-kr = 한국어
|
||||
id-id = Indonesia
|
||||
vi-vn = Tiếng Việt
|
||||
|
|
|
@ -113,7 +113,7 @@ impl SimpleComponent for AboutDialog {
|
|||
connect_close_request[sender] => move |_| {
|
||||
sender.input(AboutDialogMsg::Hide);
|
||||
|
||||
gtk::Inhibit(false)
|
||||
gtk::glib::Propagation::Proceed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use adw::prelude::*;
|
||||
|
||||
use super::ComponentsListMsg;
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use adw::prelude::*;
|
||||
|
||||
use super::ComponentGroupMsg;
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use adw::prelude::*;
|
||||
|
||||
use anime_launcher_sdk::anime_game_core::prelude::*;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use gtk::prelude::*;
|
||||
use adw::prelude::*;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use adw::prelude::*;
|
||||
|
||||
use crate::*;
|
||||
|
@ -79,13 +77,16 @@ impl SimpleAsyncComponent for DefaultPathsApp {
|
|||
|
||||
adw::ActionRow {
|
||||
set_title: &tr!("launcher-folder"),
|
||||
set_icon_name: Some("folder-symbolic"),
|
||||
set_activatable: true,
|
||||
|
||||
#[watch]
|
||||
set_subtitle: model.launcher.to_str().unwrap(),
|
||||
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Launcher)
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Launcher),
|
||||
|
||||
add_prefix = >k::Image {
|
||||
set_icon_name: Some("folder-symbolic")
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -117,90 +118,114 @@ impl SimpleAsyncComponent for DefaultPathsApp {
|
|||
|
||||
adw::ActionRow {
|
||||
set_title: &tr!("runners-folder"),
|
||||
set_icon_name: Some("folder-symbolic"),
|
||||
set_activatable: true,
|
||||
|
||||
#[watch]
|
||||
set_subtitle: model.runners.to_str().unwrap(),
|
||||
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Runners)
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Runners),
|
||||
|
||||
add_prefix = >k::Image {
|
||||
set_icon_name: Some("folder-symbolic")
|
||||
}
|
||||
},
|
||||
|
||||
adw::ActionRow {
|
||||
set_title: &tr!("dxvks-folder"),
|
||||
set_icon_name: Some("folder-symbolic"),
|
||||
set_activatable: true,
|
||||
|
||||
#[watch]
|
||||
set_subtitle: model.dxvks.to_str().unwrap(),
|
||||
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::DXVK)
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::DXVK),
|
||||
|
||||
add_prefix = >k::Image {
|
||||
set_icon_name: Some("folder-symbolic")
|
||||
}
|
||||
},
|
||||
|
||||
adw::ActionRow {
|
||||
set_title: &tr!("wine-prefix-folder"),
|
||||
set_icon_name: Some("folder-symbolic"),
|
||||
set_activatable: true,
|
||||
|
||||
#[watch]
|
||||
set_subtitle: model.prefix.to_str().unwrap(),
|
||||
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Prefix)
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Prefix),
|
||||
|
||||
add_prefix = >k::Image {
|
||||
set_icon_name: Some("folder-symbolic")
|
||||
}
|
||||
},
|
||||
|
||||
adw::ActionRow {
|
||||
set_title: &tr!("global-game-installation-folder"),
|
||||
set_icon_name: Some("folder-symbolic"),
|
||||
set_activatable: true,
|
||||
|
||||
#[watch]
|
||||
set_subtitle: model.game_global.to_str().unwrap(),
|
||||
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::GameGlobal)
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::GameGlobal),
|
||||
|
||||
add_prefix = >k::Image {
|
||||
set_icon_name: Some("folder-symbolic")
|
||||
}
|
||||
},
|
||||
|
||||
adw::ActionRow {
|
||||
set_title: &tr!("chinese-game-installation-folder"),
|
||||
set_icon_name: Some("folder-symbolic"),
|
||||
set_activatable: true,
|
||||
|
||||
#[watch]
|
||||
set_subtitle: model.game_china.to_str().unwrap(),
|
||||
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::GameChina)
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::GameChina),
|
||||
|
||||
add_prefix = >k::Image {
|
||||
set_icon_name: Some("folder-symbolic")
|
||||
}
|
||||
},
|
||||
|
||||
adw::ActionRow {
|
||||
set_title: &tr!("fps-unlocker-folder"),
|
||||
set_icon_name: Some("folder-symbolic"),
|
||||
set_activatable: true,
|
||||
|
||||
#[watch]
|
||||
set_subtitle: model.fps_unlocker.to_str().unwrap(),
|
||||
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::FpsUnlocker)
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::FpsUnlocker),
|
||||
|
||||
add_prefix = >k::Image {
|
||||
set_icon_name: Some("folder-symbolic")
|
||||
}
|
||||
},
|
||||
|
||||
adw::ActionRow {
|
||||
set_title: &tr!("components-index"),
|
||||
set_icon_name: Some("folder-symbolic"),
|
||||
set_activatable: true,
|
||||
|
||||
#[watch]
|
||||
set_subtitle: model.components.to_str().unwrap(),
|
||||
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Components)
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Components),
|
||||
|
||||
add_prefix = >k::Image {
|
||||
set_icon_name: Some("folder-symbolic")
|
||||
}
|
||||
},
|
||||
|
||||
adw::ActionRow {
|
||||
set_title: &tr!("temp-folder"),
|
||||
set_icon_name: Some("folder-symbolic"),
|
||||
set_activatable: true,
|
||||
|
||||
#[watch]
|
||||
set_subtitle: model.temp.to_str().unwrap(),
|
||||
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Temp)
|
||||
connect_activated => DefaultPathsAppMsg::ChoosePath(Folders::Temp),
|
||||
|
||||
add_prefix = >k::Image {
|
||||
set_icon_name: Some("folder-symbolic")
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use adw::prelude::*;
|
||||
|
||||
use anime_launcher_sdk::is_available;
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
use std::path::PathBuf;
|
||||
|
||||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use adw::prelude::*;
|
||||
|
||||
use anime_launcher_sdk::anime_game_core::prelude::*;
|
||||
|
@ -163,11 +161,13 @@ impl SimpleAsyncComponent for DownloadComponentsApp {
|
|||
#[watch]
|
||||
set_subtitle: &model.downloading_wine_version,
|
||||
|
||||
add_prefix = >k::Image {
|
||||
#[watch]
|
||||
set_icon_name: match model.downloading_wine {
|
||||
Some(true) => Some("emblem-ok-symbolic"),
|
||||
Some(false) => None, // Some("process-working"),
|
||||
None => None
|
||||
}
|
||||
},
|
||||
|
||||
add_prefix = >k::Spinner {
|
||||
|
@ -184,11 +184,13 @@ impl SimpleAsyncComponent for DownloadComponentsApp {
|
|||
#[watch]
|
||||
set_subtitle: &model.creating_prefix_path,
|
||||
|
||||
add_prefix = >k::Image {
|
||||
#[watch]
|
||||
set_icon_name: match model.creating_prefix {
|
||||
Some(true) => Some("emblem-ok-symbolic"),
|
||||
Some(false) => None, // Some("process-working"),
|
||||
None => None
|
||||
}
|
||||
},
|
||||
|
||||
add_prefix = >k::Spinner {
|
||||
|
@ -205,11 +207,13 @@ impl SimpleAsyncComponent for DownloadComponentsApp {
|
|||
#[watch]
|
||||
set_subtitle: &model.downloading_dxvk_version,
|
||||
|
||||
add_prefix = >k::Image {
|
||||
#[watch]
|
||||
set_icon_name: match model.downloading_dxvk {
|
||||
Some(true) => Some("emblem-ok-symbolic"),
|
||||
Some(false) => None, // Some("process-working"),
|
||||
None => None
|
||||
}
|
||||
},
|
||||
|
||||
add_prefix = >k::Spinner {
|
||||
|
@ -223,11 +227,13 @@ impl SimpleAsyncComponent for DownloadComponentsApp {
|
|||
adw::ActionRow {
|
||||
set_title: &tr!("apply-dxvk"),
|
||||
|
||||
add_prefix = >k::Image {
|
||||
#[watch]
|
||||
set_icon_name: match model.applying_dxvk {
|
||||
Some(true) => Some("emblem-ok-symbolic"),
|
||||
Some(false) => None, // Some("process-working"),
|
||||
None => None
|
||||
}
|
||||
},
|
||||
|
||||
add_prefix = >k::Spinner {
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use adw::prelude::*;
|
||||
|
||||
use crate::*;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use gtk::prelude::*;
|
||||
use adw::prelude::*;
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use adw::prelude::*;
|
||||
|
||||
use anime_launcher_sdk::config::ConfigExt;
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use adw::prelude::*;
|
||||
|
||||
use anime_launcher_sdk::is_available;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use relm4::{
|
||||
prelude::*,
|
||||
component::*,
|
||||
actions::*,
|
||||
MessageBroker
|
||||
};
|
||||
|
@ -611,7 +610,7 @@ impl SimpleComponent for App {
|
|||
});
|
||||
}
|
||||
|
||||
gtk::Inhibit::default()
|
||||
gtk::glib::Propagation::Proceed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use gtk::prelude::*;
|
||||
|
||||
use crate::tr;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
use relm4::factory::*;
|
||||
|
||||
use adw::prelude::*;
|
||||
|
@ -20,7 +19,6 @@ impl AsyncFactoryComponent for Variable {
|
|||
type Input = EnvironmentPageMsg;
|
||||
type Output = EnvironmentPageMsg;
|
||||
type CommandOutput = ();
|
||||
type ParentInput = EnvironmentPageMsg;
|
||||
type ParentWidget = adw::PreferencesGroup;
|
||||
|
||||
view! {
|
||||
|
@ -34,7 +32,8 @@ impl AsyncFactoryComponent for Variable {
|
|||
set_valign: gtk::Align::Center,
|
||||
|
||||
connect_clicked[sender, index] => move |_| {
|
||||
sender.output(EnvironmentPageMsg::Remove(index.clone()));
|
||||
sender.output(EnvironmentPageMsg::Remove(index.clone()))
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -50,10 +49,6 @@ impl AsyncFactoryComponent for Variable {
|
|||
value: init.1
|
||||
}
|
||||
}
|
||||
|
||||
fn forward_to_parent(output: Self::Output) -> Option<Self::ParentInput> {
|
||||
Some(output)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct EnvironmentPage {
|
||||
|
@ -164,7 +159,9 @@ impl SimpleAsyncComponent for EnvironmentPage {
|
|||
tracing::info!("Initializing environment settings");
|
||||
|
||||
let mut model = Self {
|
||||
variables: AsyncFactoryVecDeque::new(adw::PreferencesGroup::new(), sender.input_sender()),
|
||||
variables: AsyncFactoryVecDeque::builder()
|
||||
.launch_default()
|
||||
.forward(sender.input_sender(), std::convert::identity),
|
||||
|
||||
name_entry: adw::EntryRow::new(),
|
||||
value_entry: adw::EntryRow::new()
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
use relm4::factory::*;
|
||||
|
||||
use adw::prelude::*;
|
||||
|
@ -24,7 +23,6 @@ impl AsyncFactoryComponent for GameSession {
|
|||
type Input = GamePageMsg;
|
||||
type Output = GamePageMsg;
|
||||
type CommandOutput = ();
|
||||
type ParentInput = GamePageMsg;
|
||||
type ParentWidget = adw::PreferencesGroup;
|
||||
|
||||
view! {
|
||||
|
@ -48,7 +46,8 @@ impl AsyncFactoryComponent for GameSession {
|
|||
set_valign: gtk::Align::Center,
|
||||
|
||||
connect_clicked[sender, index] => move |_| {
|
||||
sender.output(GamePageMsg::UpdateSession(index.current_index()));
|
||||
sender.output(GamePageMsg::UpdateSession(index.current_index()))
|
||||
.unwrap();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -61,14 +60,16 @@ impl AsyncFactoryComponent for GameSession {
|
|||
set_valign: gtk::Align::Center,
|
||||
|
||||
connect_clicked[sender, index] => move |_| {
|
||||
sender.output(GamePageMsg::RemoveSession(index.current_index()));
|
||||
sender.output(GamePageMsg::RemoveSession(index.current_index()))
|
||||
.unwrap();
|
||||
}
|
||||
},
|
||||
|
||||
set_activatable: true,
|
||||
|
||||
connect_activated[sender, index] => move |_| {
|
||||
sender.output(GamePageMsg::SetCurrent(index.current_index()));
|
||||
sender.output(GamePageMsg::SetCurrent(index.current_index()))
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -80,10 +81,6 @@ impl AsyncFactoryComponent for GameSession {
|
|||
) -> Self {
|
||||
init
|
||||
}
|
||||
|
||||
fn forward_to_parent(output: Self::Output) -> Option<Self::ParentInput> {
|
||||
Some(output)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct GamePage {
|
||||
|
@ -162,7 +159,9 @@ impl SimpleAsyncComponent for GamePage {
|
|||
tracing::info!("Initializing game settings");
|
||||
|
||||
let mut model = Self {
|
||||
sessions: AsyncFactoryVecDeque::new(adw::PreferencesGroup::new(), sender.input_sender()),
|
||||
sessions: AsyncFactoryVecDeque::builder()
|
||||
.launch_default()
|
||||
.forward(sender.input_sender(), std::convert::identity),
|
||||
|
||||
sessions_root_widget: gtk::CheckButton::new(),
|
||||
session_name_entry: adw::EntryRow::new()
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use relm4::factory::{
|
||||
AsyncFactoryComponent,
|
||||
|
@ -45,7 +44,6 @@ impl AsyncFactoryComponent for DiscordRpcIcon {
|
|||
type Input = EnhancementsAppMsg;
|
||||
type Output = EnhancementsAppMsg;
|
||||
type CommandOutput = ();
|
||||
type ParentInput = EnhancementsAppMsg;
|
||||
type ParentWidget = adw::ExpanderRow;
|
||||
|
||||
view! {
|
||||
|
@ -70,7 +68,8 @@ impl AsyncFactoryComponent for DiscordRpcIcon {
|
|||
set_activatable: true,
|
||||
|
||||
connect_activated[sender, index] => move |_| {
|
||||
sender.output(EnhancementsAppMsg::SetDiscordRpcIcon(index.clone()));
|
||||
sender.output(EnhancementsAppMsg::SetDiscordRpcIcon(index.clone()))
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -83,11 +82,6 @@ impl AsyncFactoryComponent for DiscordRpcIcon {
|
|||
) -> Self {
|
||||
init
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn forward_to_parent(output: Self::Output) -> Option<Self::ParentInput> {
|
||||
Some(output)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct EnhancementsApp {
|
||||
|
@ -102,7 +96,7 @@ pub struct EnhancementsApp {
|
|||
|
||||
#[derive(Debug)]
|
||||
pub enum EnhancementsAppMsg {
|
||||
SetGamescopeParent(adw::PreferencesWindow),
|
||||
SetGamescopeParent,
|
||||
|
||||
SetDiscordRpcIcon(DynamicIndex),
|
||||
|
||||
|
@ -721,7 +715,10 @@ impl SimpleAsyncComponent for EnhancementsApp {
|
|||
tracing::info!("Initializing enhancements settings");
|
||||
|
||||
let mut model = Self {
|
||||
discord_rpc_icons: AsyncFactoryVecDeque::new(adw::ExpanderRow::new(), sender.input_sender()),
|
||||
discord_rpc_icons: AsyncFactoryVecDeque::builder()
|
||||
.launch_default()
|
||||
.forward(sender.input_sender(), std::convert::identity),
|
||||
|
||||
discord_rpc_root_check_button: gtk::CheckButton::new(),
|
||||
|
||||
gamescope: GamescopeApp::builder()
|
||||
|
@ -792,6 +789,7 @@ impl SimpleAsyncComponent for EnhancementsApp {
|
|||
|
||||
model.discord_rpc_icons.guard().push_back(DiscordRpcIcon {
|
||||
check_button,
|
||||
|
||||
name: icon.name.clone(),
|
||||
path: cache_file.clone()
|
||||
});
|
||||
|
@ -818,8 +816,8 @@ impl SimpleAsyncComponent for EnhancementsApp {
|
|||
|
||||
async fn update(&mut self, msg: Self::Input, sender: AsyncComponentSender<Self>) {
|
||||
match msg {
|
||||
EnhancementsAppMsg::SetGamescopeParent(parent) => {
|
||||
self.gamescope.widget().set_transient_for(Some(&parent));
|
||||
EnhancementsAppMsg::SetGamescopeParent => unsafe {
|
||||
self.gamescope.widget().set_transient_for(super::main::PREFERENCES_WINDOW.as_ref());
|
||||
}
|
||||
|
||||
EnhancementsAppMsg::SetDiscordRpcIcon(index) => {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
use relm4::factory::*;
|
||||
|
||||
use adw::prelude::*;
|
||||
|
@ -24,7 +23,6 @@ macro_rules! impl_directory {
|
|||
type Input = SandboxPageMsg;
|
||||
type Output = SandboxPageMsg;
|
||||
type CommandOutput = ();
|
||||
type ParentInput = SandboxPageMsg;
|
||||
type ParentWidget = adw::PreferencesGroup;
|
||||
|
||||
view! {
|
||||
|
@ -41,7 +39,8 @@ macro_rules! impl_directory {
|
|||
set_valign: gtk::Align::Center,
|
||||
|
||||
connect_clicked[sender, index] => move |_| {
|
||||
sender.output($msg(index.clone()));
|
||||
sender.output($msg(index.clone()))
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -57,10 +56,6 @@ macro_rules! impl_directory {
|
|||
to: init.1
|
||||
}
|
||||
}
|
||||
|
||||
fn forward_to_parent(output: Self::Output) -> Option<Self::ParentInput> {
|
||||
Some(output)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -335,9 +330,17 @@ impl SimpleAsyncComponent for SandboxPage {
|
|||
tracing::info!("Initializing sandbox settings");
|
||||
|
||||
let mut model = Self {
|
||||
private_paths: AsyncFactoryVecDeque::new(adw::PreferencesGroup::new(), sender.input_sender()),
|
||||
shared_paths: AsyncFactoryVecDeque::new(adw::PreferencesGroup::new(), sender.input_sender()),
|
||||
symlink_paths: AsyncFactoryVecDeque::new(adw::PreferencesGroup::new(), sender.input_sender()),
|
||||
private_paths: AsyncFactoryVecDeque::builder()
|
||||
.launch_default()
|
||||
.forward(sender.input_sender(), std::convert::identity),
|
||||
|
||||
shared_paths: AsyncFactoryVecDeque::builder()
|
||||
.launch_default()
|
||||
.forward(sender.input_sender(), std::convert::identity),
|
||||
|
||||
symlink_paths: AsyncFactoryVecDeque::builder()
|
||||
.launch_default()
|
||||
.forward(sender.input_sender(), std::convert::identity),
|
||||
|
||||
private_path_entry: adw::EntryRow::new(),
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use adw::prelude::*;
|
||||
|
||||
use anime_launcher_sdk::config::ConfigExt;
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use gtk::prelude::*;
|
||||
use adw::prelude::*;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use relm4::factory::{
|
||||
AsyncFactoryVecDeque,
|
||||
AsyncFactoryComponent,
|
||||
|
@ -41,7 +41,6 @@ impl AsyncFactoryComponent for VoicePackageComponent {
|
|||
type Input = GeneralAppMsg;
|
||||
type Output = GeneralAppMsg;
|
||||
type CommandOutput = ();
|
||||
type ParentInput = GeneralAppMsg;
|
||||
type ParentWidget = adw::ExpanderRow;
|
||||
|
||||
view! {
|
||||
|
@ -97,11 +96,8 @@ impl AsyncFactoryComponent for VoicePackageComponent {
|
|||
async fn update(&mut self, msg: Self::Input, sender: AsyncFactorySender<Self>) {
|
||||
self.installed = !self.installed;
|
||||
|
||||
sender.output(msg);
|
||||
}
|
||||
|
||||
fn forward_to_parent(output: Self::Output) -> Option<Self::ParentInput> {
|
||||
Some(output)
|
||||
sender.output(msg)
|
||||
.unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -543,7 +539,9 @@ impl SimpleAsyncComponent for GeneralApp {
|
|||
tracing::info!("Initializing general settings");
|
||||
|
||||
let mut model = Self {
|
||||
voice_packages: AsyncFactoryVecDeque::new(adw::ExpanderRow::new(), sender.input_sender()),
|
||||
voice_packages: AsyncFactoryVecDeque::builder()
|
||||
.launch_default()
|
||||
.forward(sender.input_sender(), std::convert::identity),
|
||||
|
||||
migrate_installation: MigrateInstallationApp::builder()
|
||||
.launch(())
|
||||
|
@ -655,7 +653,7 @@ impl SimpleAsyncComponent for GeneralApp {
|
|||
self.migrate_installation.widget().set_transient_for(Some(window.widget()));
|
||||
}
|
||||
|
||||
self.migrate_installation.widget().show();
|
||||
self.migrate_installation.widget().present();
|
||||
}
|
||||
|
||||
GeneralAppMsg::RepairGame => {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
use relm4::prelude::*;
|
||||
use relm4::component::*;
|
||||
|
||||
use gtk::prelude::*;
|
||||
use adw::prelude::*;
|
||||
|
@ -64,7 +63,7 @@ impl SimpleAsyncComponent for PreferencesApp {
|
|||
});
|
||||
}
|
||||
|
||||
gtk::Inhibit::default()
|
||||
gtk::glib::Propagation::Proceed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -94,12 +93,10 @@ impl SimpleAsyncComponent for PreferencesApp {
|
|||
PREFERENCES_WINDOW = Some(widgets.preferences_window.clone());
|
||||
}
|
||||
|
||||
#[allow(unused_must_use)] {
|
||||
model.enhancements.sender().send(EnhancementsAppMsg::SetGamescopeParent(widgets.preferences_window.clone()));
|
||||
model.enhancements.emit(EnhancementsAppMsg::SetGamescopeParent);
|
||||
|
||||
model.general.sender().send(GeneralAppMsg::UpdateDownloadedWine);
|
||||
model.general.sender().send(GeneralAppMsg::UpdateDownloadedDxvk);
|
||||
}
|
||||
model.general.emit(GeneralAppMsg::UpdateDownloadedWine);
|
||||
model.general.emit(GeneralAppMsg::UpdateDownloadedDxvk);
|
||||
|
||||
AsyncComponentParts { model, widgets }
|
||||
}
|
||||
|
@ -108,9 +105,8 @@ impl SimpleAsyncComponent for PreferencesApp {
|
|||
tracing::debug!("Called preferences window event: {:?}", msg);
|
||||
|
||||
match msg {
|
||||
#[allow(unused_must_use)]
|
||||
PreferencesAppMsg::SetGameDiff(diff) => {
|
||||
self.general.sender().send(GeneralAppMsg::SetGameDiff(diff));
|
||||
self.general.emit(GeneralAppMsg::SetGameDiff(diff));
|
||||
}
|
||||
|
||||
#[allow(unused_must_use)]
|
||||
|
|
Loading…
Reference in a new issue