mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
Use AdwAboutDialog
This commit is contained in:
parent
364557d959
commit
6b71701b81
2 changed files with 7 additions and 8 deletions
|
|
@ -4,7 +4,7 @@ version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
adw = { package = "libadwaita", version = "0.7", features = ["v1_5"] }
|
adw = { package = "libadwaita", version = "0.7", features = ["v1_6"] }
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
diesel = { version = "2.2", features = ["chrono", "sqlite"] }
|
diesel = { version = "2.2", features = ["chrono", "sqlite"] }
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
use adw::subclass::prelude::*;
|
use adw::{prelude::*, subclass::prelude::*};
|
||||||
use gettextrs::gettext;
|
use gettextrs::gettext;
|
||||||
use gtk::{gio, glib, prelude::*};
|
use gtk::{gio, glib};
|
||||||
|
|
||||||
use crate::{config, MusicusWindow};
|
use crate::{config, MusicusWindow};
|
||||||
|
|
||||||
|
|
@ -73,18 +73,17 @@ impl MusicusApplication {
|
||||||
|
|
||||||
fn show_about(&self) {
|
fn show_about(&self) {
|
||||||
let window = self.active_window().unwrap();
|
let window = self.active_window().unwrap();
|
||||||
let about = adw::AboutWindow::builder()
|
let about = adw::AboutDialog::builder()
|
||||||
.transient_for(&window)
|
|
||||||
.application_name(gettext(config::NAME))
|
.application_name(gettext(config::NAME))
|
||||||
.application_icon(config::APP_ID)
|
.application_icon(config::APP_ID)
|
||||||
.developer_name("Elias Projahn")
|
.developer_name("Elias Projahn")
|
||||||
.version(config::VERSION)
|
.version(config::VERSION)
|
||||||
.website("https://code.johrpan.de/johrpan/musicus")
|
.website("https://github.com/johrpan/musicus")
|
||||||
.developers(vec!["Elias Projahn <elias@johrpan.de>"])
|
.developers(vec!["Elias Projahn <elias@johrpan.de>"])
|
||||||
.copyright("© 2023 Elias Projahn")
|
.copyright("© 2025 Elias Projahn")
|
||||||
.license_type(gtk::License::Gpl30)
|
.license_type(gtk::License::Gpl30)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
about.present();
|
about.present(Some(&window));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue