[sysprof: 1/2] Use AdwAboutWindow




commit 16a456a8dd132012941d55910cceb921f0c3b45b
Author: JMS <jschweitz1717 gmail com>
Date:   Sat Jul 16 21:23:57 2022 +0000

    Use AdwAboutWindow

 src/sysprof/meson.build           |  2 +-
 src/sysprof/sysprof-application.c | 29 +++++++++--------------------
 2 files changed, 10 insertions(+), 21 deletions(-)
---
diff --git a/src/sysprof/meson.build b/src/sysprof/meson.build
index c5c4593a..5b5796c1 100644
--- a/src/sysprof/meson.build
+++ b/src/sysprof/meson.build
@@ -16,7 +16,7 @@ sysprof_deps = [
   libsysprof_dep,
   libsysprof_ui_dep,
   dependency('pangoft2', required: false),
-  dependency('libadwaita-1'),
+  dependency('libadwaita-1', version: '>=  1.2.alpha'),
 ]
 
 sysprof = executable('sysprof', sysprof_resources + sysprof_sources,
diff --git a/src/sysprof/sysprof-application.c b/src/sysprof/sysprof-application.c
index e07115e2..4cdc17f3 100644
--- a/src/sysprof/sysprof-application.c
+++ b/src/sysprof/sysprof-application.c
@@ -175,7 +175,6 @@ sysprof_about (GSimpleAction *action,
 {
   GtkApplication *app = user_data;
   GtkWindow *best_toplevel = NULL;
-  GtkWindow *dialog;
   GList *windows;
 
   g_assert (G_IS_APPLICATION (app));
@@ -193,30 +192,20 @@ sysprof_about (GSimpleAction *action,
         }
     }
 
-  dialog = g_object_new (GTK_TYPE_ABOUT_DIALOG,
-                         "application", app,
-                         "authors", sysprof_authors,
-                         "artists", sysprof_artists,
-                         "comments", _("A system profiler"),
+  adw_show_about_window(best_toplevel,
+                         "application-name", _("Sysprof"),
+                         "application-icon", "org.gnome.Sysprof",
+                         "version", "GNOME " SYMBOLIC_VERSION " (" PACKAGE_VERSION ")",
                          "copyright", "Copyright 2004-2009 Søren Sandmann Pedersen\n"
                                       "Copyright 2016-2021 Christian Hergert",
-                         "transient-for", best_toplevel,
-                         "modal", TRUE,
-                         "translator-credits", _("translator-credits"),
+                         "issue-url", "https://gitlab.gnome.org/GNOME/sysprof/-/issues/new";,
                          "license-type", GTK_LICENSE_GPL_3_0,
-                         "logo-icon-name", "org.gnome.Sysprof",
-                         "program-name", _("Sysprof"),
-                         "version", "GNOME " SYMBOLIC_VERSION " (" PACKAGE_VERSION ")",
+                         "developers", sysprof_authors,
+                         "artists", sysprof_artists,
+                         "comments", _("A system profiler"),
+                         "translator-credits", _("translator-credits"),
                          "website", "https://wiki.gnome.org/Apps/Sysprof";,
-                         "website-label", _("Learn more about Sysprof"),
                          NULL);
-
-  g_signal_connect (dialog,
-                    "close-request",
-                    G_CALLBACK (gtk_window_destroy),
-                    NULL);
-
-  gtk_window_present (dialog);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]