about window: show data from appdata file

This commit is contained in:
ranfdev
2023-11-09 19:08:57 +01:00
parent 98811de34a
commit 6581eb55ab
5 changed files with 36 additions and 40 deletions

View File

@ -8,7 +8,6 @@ use adw::subclass::prelude::*;
use capnp_rpc::{rpc_twoparty_capnp, twoparty, RpcSystem};
use futures::stream::Stream;
use futures::AsyncReadExt;
use gettextrs::gettext;
use gio::SocketClient;
use gio::UnixSocketAddress;
use gtk::prelude::*;
@ -207,17 +206,10 @@ impl NotifyApplication {
}
fn show_about_dialog(&self) {
let dialog = adw::AboutWindow::builder()
.application_icon(APP_ID)
.application_name("Notify")
.license_type(gtk::License::Gpl30)
.version(VERSION)
.transient_for(&self.main_window())
.translator_credits(gettext("translator-credits"))
.modal(true)
.developers(vec!["ranfdev"])
.artists(vec!["ranfdev"])
.build();
let dialog = adw::AboutWindow::from_appdata("/com/ranfdev/Notify/metainfo.xml", None);
if let Some(w) = self.imp().window.borrow().upgrade() {
dialog.set_transient_for(Some(&w));
}
dialog.present();
}