Skip to content

Commit

Permalink
Merge pull request #235 from AchetaGames/3.9.0
Browse files Browse the repository at this point in the history
3.8.4
  • Loading branch information
aknarts authored Apr 3, 2023
2 parents a07c459 + d1539af commit a8cc879
Show file tree
Hide file tree
Showing 58 changed files with 798 additions and 1,480 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: "Flatpak"
runs-on: ubuntu-20.04
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-43
image: bilelmoussaoui/flatpak-github-actions:gnome-44
options: --privileged
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: "Flatpak"
runs-on: ubuntu-20.04
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-43
image: bilelmoussaoui/flatpak-github-actions:gnome-44
options: --privileged
steps:
- uses: actions/checkout@v2
Expand Down
18 changes: 8 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "epic_asset_manager"
version = "3.8.3"
version = "3.8.4"
authors = ["Milan Stastny <[email protected]>"]
edition = "2021"
license-file = "LICENSE"
Expand All @@ -9,10 +9,8 @@ description = "An unofficial client to install Unreal Engine, download and manag
keywords = ["unreal", "engine", "gamedev", "assets", "epic"]
categories = ["gui"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
adw = { package = "libadwaita", version = "0.2" }
adw = { package = "libadwaita", version = "0.3" }
anyhow = "1.0"
byte-unit = "4.0"
chrono = "0.4"
Expand All @@ -21,14 +19,14 @@ diesel_migrations = { version = "2.0.0", features = ["sqlite"] }
egs-api = "0.6"
env_logger = "0.10.0"
fs2 = "0.4.3"
gtk4 = { version = "0.5", features = ["v4_8"] }
gtk4 = { version = "0.6", features = ["v4_8"] }
gtk-macros = "0.3"
html2pango = "0.5"
lazy_static = "1.4"
libsqlite3-sys = { version = "0.22.2", features = ["bundled"] }
libsqlite3-sys = { version = "0.25.2", features = ["bundled"] }
log = "0.4"
once_cell = "1.8"
opener = "0.5"
opener = "0.6"
rand = "0.8"
regex = "1"
reqwest = { version = "0.11", features = ["json", "cookies", "blocking"] }
Expand All @@ -44,10 +42,10 @@ zip = "0.6"
winres = "0.1"

[target.'cfg(target_os = "windows")'.dependencies]
open = "3"
open = "4"

[target.'cfg(target_os = "linux")'.dependencies]
ashpd = "0.3"
ashpd = "0.4"
gettext-rs = { version = "0.7", features = ["gettext-system"] }
ghregistry = "^0.2"
secret-service = "2.0"
secret-service = { version = "3.0", features = ["crypto-rust"]}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"app-id": "io.github.achetagames.epic_asset_manager.Devel",
"runtime": "org.gnome.Platform",
"runtime-version": "43",
"runtime-version": "44",
"sdk": "org.gnome.Sdk",
"command": "epic_asset_manager",
"sdk-extensions": [
Expand Down
2 changes: 1 addition & 1 deletion build-aux/io.github.achetagames.epic_asset_manager.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"app-id": "io.github.achetagames.epic_asset_manager",
"runtime": "org.gnome.Platform",
"runtime-version": "43",
"runtime-version": "44",
"sdk": "org.gnome.Sdk",
"command": "epic_asset_manager",
"sdk-extensions": [
Expand Down
10 changes: 10 additions & 0 deletions data/io.github.achetagames.epic_asset_manager.metainfo.xml.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@
<url type="donation">https://ko-fi.com/achetagames</url>
<content_rating type="oars-1.0"/>
<releases>
<release version="3.8.4" date="2023-04-03">
<description>
<p>Update release</p>
<ul>
<li>Gracefully handle corrupted chunk</li>
<li>Update dependencies</li>
<li>Fix actions</li>
</ul>
</description>
</release>
<release version="3.8.3" date="2023-01-24">
<description>
<p>Bug fixing</p>
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project('epic_asset_manager',
'rust',
version: '3.8.3',
version: '3.8.4',
license: 'MIT',
meson_version: '>= 0.59')

Expand Down
40 changes: 19 additions & 21 deletions src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use glib::clone;
use gtk4::prelude::*;
use gtk4::subclass::prelude::*;
use gtk4::{gdk, gio, glib};
use gtk_macros::{action, stateful_action};
use gtk_macros::action;
use log::{debug, error, info};
use once_cell::sync::OnceCell;

Expand Down Expand Up @@ -45,7 +45,7 @@ pub mod imp {
impl ApplicationImpl for EpicAssetManager {
fn activate(&self) {
debug!("GtkApplication<EpicAssetManager>::activate");
let app = self.instance();
let app = self.obj();
let self_ = app.imp();
if let Some(window) = self_.window.get() {
window.show();
Expand Down Expand Up @@ -126,7 +126,7 @@ pub mod imp {
fn startup(&self) {
debug!("GtkApplication<EpicAssetManager>::startup");
self.parent_startup();
let app = self.instance();
let app = self.obj();

app.set_resource_base_path(Some("/io/github/achetagames/epic_asset_manager"));
Self::Type::setup_css();
Expand Down Expand Up @@ -161,14 +161,14 @@ impl Default for EpicAssetManager {

impl EpicAssetManager {
pub fn new() -> Self {
glib::Object::new::<Self>(&[
("application-id", &Some(config::APP_ID)),
("flags", &ApplicationFlags::HANDLES_OPEN),
(
glib::Object::builder()
.property("application-id", config::APP_ID)
.property("flags", ApplicationFlags::HANDLES_OPEN)
.property(
"resource-base-path",
&Some("/io/github/achetagames/epic_asset_manager/"),
),
])
"/io/github/achetagames/epic_asset_manager/",
)
.build()
}

pub fn main_window(&self) -> &EpicAssetManagerWindow {
Expand All @@ -194,14 +194,12 @@ impl EpicAssetManager {
);

let is_dark_mode = self_.settings.boolean("dark-mode");
stateful_action!(
self,
"dark-mode",
is_dark_mode,
clone!(@weak self as app => move |action, _| {
app.toggle_dark_mode(action);
})
);
let simple_action =
gio::SimpleAction::new_stateful("dark-mode", None, is_dark_mode.to_variant());
simple_action.connect_activate(clone!(@weak self as app => move |action, _| {
app.toggle_dark_mode(action);
}));
self.add_action(&simple_action);

// About
action!(
Expand All @@ -227,7 +225,7 @@ impl EpicAssetManager {
let state = action.state().unwrap();
let action_state: bool = state.get().unwrap();
let is_dark_mode = !action_state;
action.set_state(&is_dark_mode.to_variant());
action.set_state(is_dark_mode.to_variant());
if let Err(err) = self_.settings.set_boolean("dark-mode", is_dark_mode) {
error!("Failed to switch dark mode: {} ", err);
}
Expand Down Expand Up @@ -263,8 +261,8 @@ impl EpicAssetManager {
.version(config::VERSION)
.transient_for(self.main_window())
.modal(true)
.authors(vec!["Acheta Games".into()])
.documenters(vec!["Osayami".into()])
.authors(vec!["Acheta Games".to_string()])
.documenters(vec!["Osayami".to_string()])
.build();

dialog.show();
Expand Down
Loading

0 comments on commit a8cc879

Please sign in to comment.