mirror of
https://github.com/an-anime-team/sleepy-launcher.git
synced 2024-11-21 20:27:35 +03:00
0.1.1
- added more system data in about dialog - updated core library
This commit is contained in:
parent
9860c54dc1
commit
daac4c8ff0
7 changed files with 42 additions and 8 deletions
|
@ -1,12 +1,16 @@
|
|||
[package]
|
||||
name = "anime-game-launcher"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
description = "Anime Game launcher"
|
||||
authors = ["Nikita Podvirnyy <suimin.tu.mu.ga.mi@gmail.com>"]
|
||||
license = "GPL-3.0"
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
|
||||
[profile.release]
|
||||
strip = true
|
||||
lto = true
|
||||
|
||||
[build-dependencies]
|
||||
gtk4 = "0.4"
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 93cff0fc6a6b1904bedbff8e42f925602947befb
|
||||
Subproject commit f5c91f01561cd12873e92bb51b37c7d68ca0cd99
|
BIN
assets/icons/64x64.ico
Normal file
BIN
assets/icons/64x64.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
|
@ -1,6 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/org/app/assets/">
|
||||
<file>images/icon.png</file>
|
||||
<gresource prefix="/org/app/assets/images">
|
||||
<file alias="icon.png">images/icon.png</file>
|
||||
</gresource>
|
||||
<gresource prefix="/org/app/assets/icons">
|
||||
<file alias="64x64">icons/64x64.ico</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
|
|
|
@ -5,7 +5,7 @@ Adw.ApplicationWindow window {
|
|||
default-width: 900;
|
||||
default-height: 600;
|
||||
|
||||
styles ["devel"]
|
||||
icon-name: "resource:///org/app/assets/icons/64x64";
|
||||
|
||||
content: Adw.ToastOverlay toast_overlay {
|
||||
Adw.Leaflet leaflet {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
use gtk4::{self as gtk, prelude::*};
|
||||
use libadwaita::{self as adw, prelude::*};
|
||||
|
||||
use gtk::{CssProvider, StyleContext, gdk::Display, STYLE_PROVIDER_PRIORITY_APPLICATION};
|
||||
use gtk::{CssProvider, StyleContext, STYLE_PROVIDER_PRIORITY_APPLICATION};
|
||||
use gtk::gdk::Display;
|
||||
use gtk::glib::set_application_name;
|
||||
|
||||
pub mod ui;
|
||||
pub mod lib;
|
||||
|
@ -10,6 +12,7 @@ use ui::*;
|
|||
|
||||
pub const APP_ID: &str = "com.gitlab.an-anime-team.an-anime-game-launcher-gtk";
|
||||
pub const APP_VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
pub const APP_DEBUG: bool = cfg!(debug_assertions);
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
|
@ -20,6 +23,10 @@ async fn main() {
|
|||
gtk::gio::resources_register_include!(".assets.gresource")
|
||||
.expect("Failed to register resources");
|
||||
|
||||
// Set application's title
|
||||
// FIXME: doesn't work?
|
||||
set_application_name("An Anime Game Launcher");
|
||||
|
||||
// Create app
|
||||
let application = gtk::Application::new(
|
||||
Some(APP_ID),
|
||||
|
|
|
@ -74,16 +74,36 @@ impl AppWidgets {
|
|||
preferences_stack: PreferencesStack::new(window, toast_overlay)?
|
||||
};
|
||||
|
||||
// Set devel style to ApplicationWindow if it's debug mode
|
||||
if crate::APP_DEBUG {
|
||||
result.window.add_css_class("devel");
|
||||
}
|
||||
|
||||
// Set default About Dialog values
|
||||
result.about.set_version(Some(crate::APP_VERSION));
|
||||
if crate::APP_DEBUG {
|
||||
result.about.set_version(Some(format!("{} (development)", crate::APP_VERSION).as_str()));
|
||||
}
|
||||
|
||||
else {
|
||||
result.about.set_version(Some(crate::APP_VERSION));
|
||||
}
|
||||
|
||||
result.about.set_license_type(gtk::License::Gpl30);
|
||||
|
||||
result.about.set_authors(&[
|
||||
"Nikita Podvirnyy <suimin.tu.mu.ga.mi@gmail.com>"
|
||||
]);
|
||||
|
||||
let curl_info = anime_game_core::curl_sys::Version::get();
|
||||
|
||||
result.about.set_system_information(Some(&[
|
||||
format!("Anime Game core library version: {}", anime_game_core::VERSION)
|
||||
format!("Anime Game core library version: {}", anime_game_core::VERSION),
|
||||
format!(" Curl version: {}", curl_info.version()),
|
||||
format!(" SSL version: {}", curl_info.ssl_version().unwrap_or("?")),
|
||||
String::new(),
|
||||
format!("GTK version: {}.{}.{}", gtk::major_version(), gtk::minor_version(), gtk::micro_version()),
|
||||
format!("Libadwaita version: {}.{}.{}", adw::major_version(), adw::minor_version(), adw::micro_version()),
|
||||
format!("Pango version: {}", gtk::pango::version_string().unwrap_or("?".into())),
|
||||
].join("\n")));
|
||||
|
||||
// Add preferences page to the leaflet
|
||||
|
|
Loading…
Reference in a new issue