From 23c6aa557a68f6907088fcbc0cced3cd191c2824 Mon Sep 17 00:00:00 2001 From: Gabriel Brand Date: Wed, 20 Mar 2024 21:25:14 +0100 Subject: Port AdwAboutWindow to AdwAboutDialog --- Cargo.toml | 7 ++++--- src/application.rs | 12 +++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f4d425f..94a010b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ dbus = "0.9.7" dbus-codegen = "0.10.0" directories = "5.0" gettext-rs = { version = "0.7", features = ["gettext-system"] } -gtk4-macros = "0.8.0" +gtk4-macros = "0.8.2" itertools = "0.10.5" log = "0.4" num-derive = "0.3.3" @@ -24,9 +24,10 @@ serde = { version = "1.0", features = ["derive"] } [dependencies.gtk] package = "gtk4" -version = "0.8.0" +version = "0.8.2" +features = ["gnome_46"] [dependencies.adw] package = "libadwaita" version = "0.6.0" -features = ["v1_4"] \ No newline at end of file +features = ["v1_5"] \ No newline at end of file diff --git a/src/application.rs b/src/application.rs index 46afbe7..8484b91 100644 --- a/src/application.rs +++ b/src/application.rs @@ -14,10 +14,10 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +use adw::prelude::*; +use adw::subclass::prelude::*; use gettextrs::*; use glib::clone; -use gtk::prelude::*; -use gtk::subclass::prelude::*; use gtk::{gdk, gio, glib}; use log::debug; use std::sync::Mutex; @@ -181,7 +181,7 @@ impl FurtheranceApplication { fn show_about(&self) { let window = self.active_window().unwrap(); - let dialog = adw::AboutWindow::builder() + let dialog = adw::AboutDialog::builder() .application_name("Furtherance") .application_icon(config::APP_ID) .developer_name("Ricky Kresslein") @@ -189,13 +189,11 @@ impl FurtheranceApplication { .website("https://furtherance.app") .issue_url("https://github.com/lakoliu/Furtherance/issues") .version(config::VERSION) - .transient_for(&window) - .modal(true) - .copyright("© 2023 Unobserved") + .copyright("© 2024 Unobserved") .translator_credits(gettext("translator-credits")) .build(); - dialog.show(); + dialog.present(&window); } fn delete_history(&self) { -- cgit 1.4.1