[gnome-calculator/wip/cdavis/about-dialog: 14/14] calculator: Port to AdwAboutWindow
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator/wip/cdavis/about-dialog: 14/14] calculator: Port to AdwAboutWindow
- Date: Tue, 19 Jul 2022 07:09:23 +0000 (UTC)
commit c1e9b581645ad2ff98a9140356c4ebb6f29552fc
Author: Christopher Davis <christopherdavis gnome org>
Date: Thu Jul 7 15:02:13 2022 -0400
calculator: 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.
meson.build | 2 +-
src/gnome-calculator.vala | 41 +++++++++++++++++++----------------------
2 files changed, 20 insertions(+), 23 deletions(-)
---
diff --git a/meson.build b/meson.build
index 8c481673..e85570fc 100644
--- a/meson.build
+++ b/meson.build
@@ -102,7 +102,7 @@ gnome.post_install(
gtk_update_icon_cache: true,
)
-libadwaita = dependency('libadwaita-1', version: '>= 1.0.0')
+libadwaita = dependency('libadwaita-1', version: '>= 1.2.alpha')
gtksourceview = dependency('gtksourceview-5', version: '>= 5.3.0')
subdir('data')
subdir('lib')
diff --git a/src/gnome-calculator.vala b/src/gnome-calculator.vala
index 20902ab1..f78c8315 100644
--- a/src/gnome-calculator.vala
+++ b/src/gnome-calculator.vala
@@ -300,7 +300,7 @@ public class Calculator : Adw.Application
private void about_cb ()
{
- string[] authors =
+ string[] developers =
{
"Robert Roth <robert roth off gmail com>",
"Robert Ancell",
@@ -315,27 +315,24 @@ public class Calculator : Adw.Application
null
};
- /* The translator credits. Please translate this with your name (s). */
- var translator_credits = _("translator-credits");
-
- Gtk.show_about_dialog (get_active_window (),
- "program-name",
- /* Program name in the about dialog */
- NAME_PREFIX + _("Calculator"),
- "title", _("About Calculator"),
- "version", VERSION,
- "website", "https://wiki.gnome.org/Apps/Calculator",
- "copyright",
- "\xc2\xa9 1986–2022 The Calculator authors",
- /* We link to MPFR and MPC which are LGPLv3+, so Calculator cannot be
conveyed as GPLv2+ */
- "license-type", Gtk.License.GPL_3_0,
- "comments",
- /* Short description in the about dialog */
- _("Calculator with financial and scientific modes."),
- "authors", authors,
- "documenters", documenters,
- "translator_credits", translator_credits,
- "logo-icon-name", APP_ID);
+ var about = new Adw.AboutWindow () {
+ transient_for = get_active_window (),
+ application_name = _("Calculator"),
+ application_icon = APP_ID,
+ developer_name = _("The GNOME Project"),
+ version = VERSION,
+ website = "https://wiki.gnome.org/Apps/Calculator",
+ issue_url = "https://gitlab.gnome.org/GNOME/gnome-calculator/-/issues/new",
+ copyright = "\xc2\xa9 1986–2022 The Calculator authors",
+ /* We link to MPFR and MPC which are LGPLv3+, so Calculator cannot be conveyed as GPLv2+ */
+ license_type = Gtk.License.GPL_3_0,
+ developers = developers,
+ documenters = documenters,
+ /* The translator credits. Please translate this with your name (s). */
+ translator_credits = _("translator-credits")
+ };
+
+ about.present ();
}
private void quit_cb ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]