Skip to content

Commit

Permalink
build: updated development libraries versions
Browse files Browse the repository at this point in the history
GTK 4.8 -> 4.12
Libadwaita 1.2 -> 1.3
Relm4 0.6.2 -> 0.7.0-beta.2
  • Loading branch information
krypt0nn committed Nov 13, 2023
1 parent 5e8db5b commit e6076ef
Show file tree
Hide file tree
Showing 25 changed files with 618 additions and 512 deletions.
856 changes: 481 additions & 375 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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"
15 changes: 8 additions & 7 deletions assets/locales/common.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/ui/about.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl SimpleComponent for AboutDialog {
connect_close_request[sender] => move |_| {
sender.input(AboutDialogMsg::Hide);

gtk::Inhibit(false)
gtk::glib::Propagation::Proceed
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/ui/components/group.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use std::path::PathBuf;

use relm4::prelude::*;
use relm4::component::*;

use adw::prelude::*;

use super::ComponentsListMsg;
Expand Down
2 changes: 0 additions & 2 deletions src/ui/components/list.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use relm4::prelude::*;
use relm4::component::*;

use adw::prelude::*;

use super::ComponentGroupMsg;
Expand Down
2 changes: 0 additions & 2 deletions src/ui/components/progress_bar.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use relm4::prelude::*;
use relm4::component::*;

use adw::prelude::*;

use anime_launcher_sdk::anime_game_core::prelude::*;
Expand Down
1 change: 0 additions & 1 deletion src/ui/components/version.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::path::PathBuf;

use relm4::prelude::*;
use relm4::component::*;

use gtk::prelude::*;
use adw::prelude::*;
Expand Down
65 changes: 45 additions & 20 deletions src/ui/first_run/default_paths.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use std::path::PathBuf;

use relm4::prelude::*;
use relm4::component::*;

use adw::prelude::*;

use crate::*;
Expand Down Expand Up @@ -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 = &gtk::Image {
set_icon_name: Some("folder-symbolic")
}
},
},

Expand Down Expand Up @@ -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 = &gtk::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 = &gtk::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 = &gtk::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 = &gtk::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 = &gtk::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 = &gtk::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 = &gtk::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 = &gtk::Image {
set_icon_name: Some("folder-symbolic")
}
},
},

Expand Down
2 changes: 0 additions & 2 deletions src/ui/first_run/dependencies.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use relm4::prelude::*;
use relm4::component::*;

use adw::prelude::*;

use anime_launcher_sdk::is_available;
Expand Down
50 changes: 28 additions & 22 deletions src/ui/first_run/download_components.rs
Original file line number Diff line number Diff line change
@@ -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::*;
Expand Down Expand Up @@ -163,11 +161,13 @@ impl SimpleAsyncComponent for DownloadComponentsApp {
#[watch]
set_subtitle: &model.downloading_wine_version,

#[watch]
set_icon_name: match model.downloading_wine {
Some(true) => Some("emblem-ok-symbolic"),
Some(false) => None, // Some("process-working"),
None => None
add_prefix = &gtk::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 = &gtk::Spinner {
Expand All @@ -184,11 +184,13 @@ impl SimpleAsyncComponent for DownloadComponentsApp {
#[watch]
set_subtitle: &model.creating_prefix_path,

#[watch]
set_icon_name: match model.creating_prefix {
Some(true) => Some("emblem-ok-symbolic"),
Some(false) => None, // Some("process-working"),
None => None
add_prefix = &gtk::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 = &gtk::Spinner {
Expand All @@ -205,11 +207,13 @@ impl SimpleAsyncComponent for DownloadComponentsApp {
#[watch]
set_subtitle: &model.downloading_dxvk_version,

#[watch]
set_icon_name: match model.downloading_dxvk {
Some(true) => Some("emblem-ok-symbolic"),
Some(false) => None, // Some("process-working"),
None => None
add_prefix = &gtk::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 = &gtk::Spinner {
Expand All @@ -223,11 +227,13 @@ impl SimpleAsyncComponent for DownloadComponentsApp {
adw::ActionRow {
set_title: &tr!("apply-dxvk"),

#[watch]
set_icon_name: match model.applying_dxvk {
Some(true) => Some("emblem-ok-symbolic"),
Some(false) => None, // Some("process-working"),
None => None
add_prefix = &gtk::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 = &gtk::Spinner {
Expand Down
2 changes: 0 additions & 2 deletions src/ui/first_run/finish.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use relm4::prelude::*;
use relm4::component::*;

use adw::prelude::*;

use crate::*;
Expand Down
1 change: 0 additions & 1 deletion src/ui/first_run/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use relm4::prelude::*;
use relm4::component::*;

use gtk::prelude::*;
use adw::prelude::*;
Expand Down
2 changes: 0 additions & 2 deletions src/ui/first_run/select_voiceovers.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use relm4::prelude::*;
use relm4::component::*;

use adw::prelude::*;

use anime_launcher_sdk::config::ConfigExt;
Expand Down
2 changes: 0 additions & 2 deletions src/ui/first_run/welcome.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use relm4::prelude::*;
use relm4::component::*;

use adw::prelude::*;

use anime_launcher_sdk::is_available;
Expand Down
3 changes: 1 addition & 2 deletions src/ui/main/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use relm4::{
prelude::*,
component::*,
actions::*,
MessageBroker
};
Expand Down Expand Up @@ -611,7 +610,7 @@ impl SimpleComponent for App {
});
}

gtk::Inhibit::default()
gtk::glib::Propagation::Proceed
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/ui/migrate_installation.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use relm4::prelude::*;
use relm4::component::*;

use gtk::prelude::*;

use crate::tr;
Expand Down
Loading

0 comments on commit e6076ef

Please sign in to comment.