From 51030545db4b742e9831662ab911990bb8389f67 Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Sat, 17 Sep 2022 14:12:52 +0200 Subject: [PATCH] Port to AdwAboutWindow --- Cargo.lock | 5 +++-- crates/musicus/src/screens/main.rs | 13 ++++++------- meson.build | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ef05d6c..ebe5f5c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -897,8 +897,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libadwaita" version = "0.2.0" -source = "git+https://gitlab.gnome.org/World/Rust/libadwaita-rs.git#00488986662796deee21f0ca601be661b269b09c" +source = "git+https://gitlab.gnome.org/World/Rust/libadwaita-rs.git#f77307028c4d874d9cb87e9489e389aad4151dbf" dependencies = [ + "futures-channel", "gdk-pixbuf", "gdk4", "gio 0.16.0", @@ -913,7 +914,7 @@ dependencies = [ [[package]] name = "libadwaita-sys" version = "0.2.0" -source = "git+https://gitlab.gnome.org/World/Rust/libadwaita-rs.git#00488986662796deee21f0ca601be661b269b09c" +source = "git+https://gitlab.gnome.org/World/Rust/libadwaita-rs.git#f77307028c4d874d9cb87e9489e389aad4151dbf" dependencies = [ "gdk4-sys", "gio-sys 0.16.0", diff --git a/crates/musicus/src/screens/main.rs b/crates/musicus/src/screens/main.rs index dbeafa0..a7b8698 100644 --- a/crates/musicus/src/screens/main.rs +++ b/crates/musicus/src/screens/main.rs @@ -8,7 +8,6 @@ use adw::builders::ActionRowBuilder; use adw::prelude::*; use gettextrs::gettext; use glib::clone; -use gtk::builders::AboutDialogBuilder; use gtk_macros::get_widget; use musicus_backend::db::PersonOrEnsemble; use std::cell::RefCell; @@ -195,18 +194,18 @@ impl Widget for MainScreen { impl MainScreen { /// Show a dialog with information on this application. fn show_about_dialog(&self) { - let dialog = AboutDialogBuilder::new() + let dialog = adw::AboutWindow::builder() .transient_for(&self.handle.window) .modal(true) - .logo_icon_name("de.johrpan.musicus") - .program_name(&gettext("Musicus")) + .application_icon("de.johrpan.musicus") + .application_name(&gettext("Musicus")) + .developer_name("Elias Projahn") .version(config::VERSION) .comments(&gettext("The classical music player and organizer.")) .website("https://code.johrpan.de/johrpan/musicus") - .website_label(&gettext("Further information and source code")) - .copyright("© 2020 Elias Projahn") + .developers(vec![String::from("Elias Projahn ")]) + .copyright("© 2022 Elias Projahn") .license_type(gtk::License::Agpl30) - .authors(vec![String::from("Elias Projahn ")]) .build(); dialog.show(); diff --git a/meson.build b/meson.build index d08479a..0e757aa 100644 --- a/meson.build +++ b/meson.build @@ -9,7 +9,7 @@ dependency('glib-2.0', version: '>= 2.56') dependency('gio-2.0', version: '>= 2.56') dependency('gstreamer-1.0', version: '>= 1.12') dependency('gtk4', version: '>= 4.0') -dependency('libadwaita-1', version: '>= 1.0') +dependency('libadwaita-1', version: '>= 1.2') dependency('pango', version: '>= 1.0') dependency('sqlite3', version: '>= 3.20')