Port to AdwAboutWindow

This commit is contained in:
Elias Projahn 2022-09-17 14:12:52 +02:00
parent 88bd3875f5
commit 51030545db
3 changed files with 10 additions and 10 deletions

5
Cargo.lock generated
View file

@ -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",

View file

@ -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 <elias@johrpan.de>")])
.copyright("© 2022 Elias Projahn")
.license_type(gtk::License::Agpl30)
.authors(vec![String::from("Elias Projahn <elias@johrpan.de>")])
.build();
dialog.show();

View file

@ -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')