From a115ca1ad19e7321255317c4284bff51f3021e73 Mon Sep 17 00:00:00 2001 From: Fabio Lenherr / DashieTM Date: Sun, 29 Oct 2023 14:55:24 +0100 Subject: [PATCH] merge --- build.rs | 7 +- src/components/audio/audioBox.rs | 2 +- src/components/audio/audioSource.rs | 4 +- src/components/bluetooth/bluetoothBox.rs | 2 +- src/components/bluetooth/bluetoothEntry.rs | 2 +- src/components/wifi/wifiBox.rs | 2 +- src/components/wifi/wifiEntry.rs | 2 +- src/components/window/mod.rs | 33 +++++----- src/components/window/sidebarEntry.rs | 2 +- src/components/window/window.rs | 2 +- src/main.rs | 2 + src/resources/icons/ReSet.svg | 73 +++++++++++++++++++++ src/resources/icons/resources.gresource.xml | 6 ++ src/resources/resources.gresource.xml | 20 +++--- 14 files changed, 124 insertions(+), 35 deletions(-) create mode 100644 src/resources/icons/ReSet.svg create mode 100644 src/resources/icons/resources.gresource.xml diff --git a/build.rs b/build.rs index 0bb8c79..7ff2fa1 100644 --- a/build.rs +++ b/build.rs @@ -4,4 +4,9 @@ fn main() { "src/resources/resources.gresource.xml", "src.templates.gresource", ); -} \ No newline at end of file + glib_build_tools::compile_resources( + &["src/resources/icons"], + "src/resources/icons/resources.gresource.xml", + "src.icons.gresource", + ); +} diff --git a/src/components/audio/audioBox.rs b/src/components/audio/audioBox.rs index 36db69d..65abd48 100644 --- a/src/components/audio/audioBox.rs +++ b/src/components/audio/audioBox.rs @@ -5,7 +5,7 @@ use crate::components::audio::AudioSourceEntry; #[allow(non_snake_case)] #[derive(Default, CompositeTemplate)] -#[template(resource = "/org/xetibo/reset/resetAudio.ui")] +#[template(resource = "/org/Xetibo/ReSet/resetAudio.ui")] pub struct AudioBox { #[template_child] pub resetOutputDevice: TemplateChild, diff --git a/src/components/audio/audioSource.rs b/src/components/audio/audioSource.rs index d0ef8e0..f91f31f 100644 --- a/src/components/audio/audioSource.rs +++ b/src/components/audio/audioSource.rs @@ -3,7 +3,7 @@ use gtk::subclass::prelude::*; #[allow(non_snake_case)] #[derive(Default, CompositeTemplate)] -#[template(resource = "/org/xetibo/reset/resetAudioSourceEntry.ui")] +#[template(resource = "/org/Xetibo/ReSet/resetAudioSourceEntry.ui")] pub struct AudioSourceEntry { #[template_child] pub resetSourceIcon: TemplateChild, @@ -38,4 +38,4 @@ impl BoxImpl for AudioSourceEntry {} impl ObjectImpl for AudioSourceEntry {} -impl WidgetImpl for AudioSourceEntry {} \ No newline at end of file +impl WidgetImpl for AudioSourceEntry {} diff --git a/src/components/bluetooth/bluetoothBox.rs b/src/components/bluetooth/bluetoothBox.rs index 2268381..a62d69e 100644 --- a/src/components/bluetooth/bluetoothBox.rs +++ b/src/components/bluetooth/bluetoothBox.rs @@ -5,7 +5,7 @@ use crate::components::bluetooth::BluetoothEntry; #[allow(non_snake_case)] #[derive(Default, CompositeTemplate)] -#[template(resource = "/org/xetibo/reset/resetBluetooth.ui")] +#[template(resource = "/org/Xetibo/ReSet/resetBluetooth.ui")] pub struct BluetoothBox { #[template_child] pub resetBluetoothSwitch: TemplateChild, diff --git a/src/components/bluetooth/bluetoothEntry.rs b/src/components/bluetooth/bluetoothEntry.rs index 75da27f..42ad9c4 100644 --- a/src/components/bluetooth/bluetoothEntry.rs +++ b/src/components/bluetooth/bluetoothEntry.rs @@ -3,7 +3,7 @@ use gtk::subclass::prelude::*; #[allow(non_snake_case)] #[derive(Default, CompositeTemplate)] -#[template(resource = "/org/xetibo/reset/resetBluetoothEntry.ui")] +#[template(resource = "/org/Xetibo/ReSet/resetBluetoothEntry.ui")] pub struct BluetoothEntry { #[template_child] pub resetBluetoothDeviceType: TemplateChild, diff --git a/src/components/wifi/wifiBox.rs b/src/components/wifi/wifiBox.rs index 6c33181..32daa68 100644 --- a/src/components/wifi/wifiBox.rs +++ b/src/components/wifi/wifiBox.rs @@ -6,7 +6,7 @@ use crate::components::wifi::WifiEntry; #[allow(non_snake_case)] #[derive(Default, CompositeTemplate)] -#[template(resource = "/org/xetibo/reset/resetWiFi.ui")] +#[template(resource = "/org/Xetibo/ReSet/resetWiFi.ui")] pub struct WifiBox { #[template_child] pub resetWifiList: TemplateChild, diff --git a/src/components/wifi/wifiEntry.rs b/src/components/wifi/wifiEntry.rs index 155102a..cc51f15 100644 --- a/src/components/wifi/wifiEntry.rs +++ b/src/components/wifi/wifiEntry.rs @@ -3,7 +3,7 @@ use gtk::subclass::prelude::*; #[allow(non_snake_case)] #[derive(Default, CompositeTemplate)] -#[template(resource = "/org/xetibo/reset/resetWifiEntry.ui")] +#[template(resource = "/org/Xetibo/ReSet/resetWifiEntry.ui")] pub struct WifiEntry { #[template_child] pub resetWifiStrength: TemplateChild, diff --git a/src/components/window/mod.rs b/src/components/window/mod.rs index be231ca..723e9ea 100644 --- a/src/components/window/mod.rs +++ b/src/components/window/mod.rs @@ -191,21 +191,24 @@ impl Window { fn setupPopoverButtons(&self) { let selfImp = self.imp(); - selfImp.resetAboutButton.connect_clicked(clone!(@ weak self as window => move |_| { - let dialog = adw::AboutWindow::builder() - .application_name("ReSet") - // .application_icon("") - .developer_name("Xetibo") - .license_type(gtk::License::Gpl30) - .website("https://github.com/Xetibo/ReSet") - .issue_url("https://github.com/Xetibo/ReSet/issues") - .version("0.0.1") - .transient_for(&window) - .modal(true) - .copyright("© 2022-2023 Xetibo") - .developers(vec!["DashieTM".to_string(), "takatori".to_string()]) - .designers(vec!["DashieTM".to_string(), "takatori".to_string()]) - .build(); + selfImp + .resetAboutButton + .connect_clicked(clone!(@ weak self as window => move |_| { + let dialog = adw::AboutWindow::builder() + .application_name("ReSet") + .application_icon("ReSet") + .developer_name("Xetibo") + .license("GPL-3.0") + .license_type(gtk::License::Gpl30) + .website("https://github.com/Xetibo/ReSet") + .issue_url("https://github.com/Xetibo/ReSet/issues") + .version("0.0.1") + .transient_for(&window) + .modal(true) + .copyright("© 2022-2023 Xetibo") + .developers(vec!["DashieTM".to_string(), "Takatori".to_string()]) + .designers(vec!["DashieTM".to_string(), "Takatori".to_string()]) + .build(); dialog.present(); })); diff --git a/src/components/window/sidebarEntry.rs b/src/components/window/sidebarEntry.rs index 3877cf4..448a2e8 100644 --- a/src/components/window/sidebarEntry.rs +++ b/src/components/window/sidebarEntry.rs @@ -16,7 +16,7 @@ pub enum Categories { #[allow(non_snake_case)] #[derive(CompositeTemplate, Default)] -#[template(resource = "/org/xetibo/reset/resetSidebarEntry.ui")] +#[template(resource = "/org/Xetibo/ReSet/resetSidebarEntry.ui")] pub struct SidebarEntry { #[template_child] pub resetSidebarLabel: TemplateChild