[gnome-contacts/wip/exalm/about] app: Port to AdwAboutWindow
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts/wip/exalm/about] app: Port to AdwAboutWindow
- Date: Thu, 7 Jul 2022 15:24:01 +0000 (UTC)
commit 2210f6c5a6f9aa14c57198b95cb2f0e3ade463bf
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Jul 7 19:22:31 2022 +0400
app: Port to AdwAboutWindow
While adw_show_about_window() exists, there's no Vala override for it,
so just do it manually. Vala has a nice syntax for that anyway, and it's
also checked at compile time now.
src/contacts-app.vala | 32 ++++++++++++++++++--------------
1 file changed, 18 insertions(+), 14 deletions(-)
---
diff --git a/src/contacts-app.vala b/src/contacts-app.vala
index 43d60ed7..dcf3e6e4 100644
--- a/src/contacts-app.vala
+++ b/src/contacts-app.vala
@@ -153,27 +153,31 @@ public class Contacts.App : Adw.Application {
}
public void show_about () {
- string[] authors = {
+ string[] developers = {
"Alexander Larsson <alexl redhat com>",
"Erick Pérez Castellanos <erick red gmail com>",
"Niels De Graef <nielsdegraef gmail com>",
"Julian Sparber <jsparber gnome org>"
};
- string[] artists = {
+ string[] designers = {
"Allan Day <allanpday gmail com>"
};
- Gtk.show_about_dialog (this.window,
- "artists", artists,
- "authors", authors,
- "translator-credits", _("translator-credits"),
- "title", _("About GNOME Contacts"),
- "comments", _("Contact Management Application"),
- "copyright", _("© 2011 Red Hat, Inc.\n© 2011-2020 The Contacts Developers"),
- "license-type", Gtk.License.GPL_2_0,
- "logo-icon-name", Config.APP_ID,
- "version", Config.PACKAGE_VERSION,
- "website", "https://wiki.gnome.org/Apps/Contacts",
- "wrap-license", true);
+
+ var about = new Adw.AboutWindow () {
+ transient_for = this.window,
+ application_name = Environment.get_application_name (),
+ application_icon = Config.APP_ID,
+ developer_name = _("The GNOME Project"),
+ version = Config.PACKAGE_VERSION,
+ website = "https://wiki.gnome.org/Apps/Contacts",
+ issue_url = "https://gitlab.gnome.org/GNOME/gnome-contacts/-/issues/new",
+ developers = developers,
+ designers = designers,
+ copyright = _("© 2011 Red Hat, Inc.\n© 2011-2020 The Contacts Developers"),
+ license_type = Gtk.License.GPL_2_0
+ };
+
+ about.present ();
}
public async void show_by_email (string email_address) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]