[gnome-builder/wip/exalm/fixes: 18/18] application-actions: Port to AdwAboutWindow
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/exalm/fixes: 18/18] application-actions: Port to AdwAboutWindow
- Date: Thu, 14 Jul 2022 02:39:41 +0000 (UTC)
commit 9cda9480b6f6755be5920f144c6a89eaf403c557
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Jul 14 05:18:00 2022 +0400
application-actions: Port to AdwAboutWindow
- Move ide-support.[ch] to libide/gui, remove the support plugin
- Use it as debug info in the about window
src/libide/gui/ide-application-actions.c | 46 ++++---
src/libide/gui/ide-application-credits.h | 4 +-
.../gui/ide-support-private.h} | 0
src/{plugins/support => libide/gui}/ide-support.c | 2 +-
src/libide/gui/meson.build | 2 +
src/plugins/meson.build | 1 -
src/plugins/support/gtk/menus.ui | 11 --
.../support/ide-support-application-addin.c | 133 ---------------------
.../support/ide-support-application-addin.h | 31 -----
src/plugins/support/meson.build | 13 --
src/plugins/support/support-plugin.c | 32 -----
src/plugins/support/support.gresource.xml | 7 --
src/plugins/support/support.plugin | 9 --
13 files changed, 27 insertions(+), 264 deletions(-)
---
diff --git a/src/libide/gui/ide-application-actions.c b/src/libide/gui/ide-application-actions.c
index 669265977..e4090e71e 100644
--- a/src/libide/gui/ide-application-actions.c
+++ b/src/libide/gui/ide-application-actions.c
@@ -34,6 +34,7 @@
#include "ide-gui-global.h"
#include "ide-preferences-window.h"
#include "ide-primary-workspace.h"
+#include "ide-support-private.h"
static void
ide_application_actions_preferences (GSimpleAction *action,
@@ -123,7 +124,8 @@ ide_application_actions_about (GSimpleAction *action,
gpointer user_data)
{
IdeApplication *self = user_data;
- g_autoptr(GString) version = NULL;
+ g_autofree char *support_info = NULL;
+ g_autofree char *support_filename = NULL;
GtkDialog *dialog;
GtkWindow *parent = NULL;
GList *iter;
@@ -142,33 +144,29 @@ ide_application_actions_about (GSimpleAction *action,
}
}
- version = g_string_new (PACKAGE_VERSION);
+ support_info = ide_get_support_log ();
+ support_filename = g_strdup_printf ("gnome-builder-%u.log", (int)getpid ());
- if (!g_str_equal (IDE_BUILD_TYPE, "release"))
- g_string_append (version, " (" IDE_BUILD_IDENTIFIER ")");
-
- if (g_strcmp0 (IDE_BUILD_CHANNEL, "other") != 0)
- g_string_append (version, "\n" IDE_BUILD_CHANNEL);
-
- dialog = g_object_new (GTK_TYPE_ABOUT_DIALOG,
- "artists", ide_application_credits_artists,
- "authors", ide_application_credits_authors,
- "comments", _("An IDE for GNOME"),
- "copyright", "© 2014–2022 Christian Hergert, et al.",
- "documenters", ide_application_credits_documenters,
- "license-type", GTK_LICENSE_GPL_3_0,
- "logo-icon-name", ide_get_application_id (),
- "modal", TRUE,
- "program-name", _("GNOME Builder"),
+ dialog = g_object_new (ADW_TYPE_ABOUT_WINDOW,
"transient-for", parent,
- "translator-credits", _("translator-credits"),
- "version", version->str,
+ "application-icon", ide_get_application_id (),
+ "application-name", _("Builder"),
+ "developer-name", _("Christian Hergert, et al."),
+ "version", PACKAGE_VERSION,
"website", "https://wiki.gnome.org/Apps/Builder",
- "website-label", _("Learn more about GNOME Builder"),
+ "issue-url", "https://gitlab.gnome.org/GNOME/gnome-builder/-/issues/new",
+ "developers", ide_application_credits_developers,
+ "designers", ide_application_credits_designers,
+ "documenters", ide_application_credits_documenters,
+ "translator-credits", _("translator-credits"),
+ "copyright", "© 2014–2022 Christian Hergert, et al.",
+ "license-type", GTK_LICENSE_GPL_3_0,
+ "debug-info", support_info,
+ "debug-info-filename", support_filename,
NULL);
- gtk_about_dialog_add_credit_section (GTK_ABOUT_DIALOG (dialog),
- _("Funded By"),
- ide_application_credits_funders);
+ adw_about_window_add_acknowledgement_section (ADW_ABOUT_WINDOW (dialog),
+ _("Funded By"),
+ ide_application_credits_funders);
ide_gtk_window_present (GTK_WINDOW (dialog));
}
diff --git a/src/libide/gui/ide-application-credits.h b/src/libide/gui/ide-application-credits.h
index 8016ec3a3..5a3780710 100644
--- a/src/libide/gui/ide-application-credits.h
+++ b/src/libide/gui/ide-application-credits.h
@@ -24,7 +24,7 @@
G_BEGIN_DECLS
-static const gchar *ide_application_credits_artists[] = {
+static const gchar *ide_application_credits_designers[] = {
"Allan Day",
"Hylke Bons",
"Jakub Steiner",
@@ -32,7 +32,7 @@ static const gchar *ide_application_credits_artists[] = {
NULL
};
-static const gchar *ide_application_credits_authors[] = {
+static const gchar *ide_application_credits_developers[] = {
"Akshaya Kakkilaya",
"Alberto Fanjul",
"Alex285",
diff --git a/src/plugins/support/ide-support.h b/src/libide/gui/ide-support-private.h
similarity index 100%
rename from src/plugins/support/ide-support.h
rename to src/libide/gui/ide-support-private.h
diff --git a/src/plugins/support/ide-support.c b/src/libide/gui/ide-support.c
similarity index 99%
rename from src/plugins/support/ide-support.c
rename to src/libide/gui/ide-support.c
index 89c94b7db..0a55aaa93 100644
--- a/src/plugins/support/ide-support.c
+++ b/src/libide/gui/ide-support.c
@@ -29,7 +29,7 @@
#include <libide-gui.h>
#include <ide-build-ident.h>
-#include "ide-support.h"
+#include "ide-support-private.h"
gchar *
ide_get_support_log (void)
diff --git a/src/libide/gui/meson.build b/src/libide/gui/meson.build
index c0f821ebc..8f318edec 100644
--- a/src/libide/gui/meson.build
+++ b/src/libide/gui/meson.build
@@ -61,6 +61,7 @@ libide_gui_private_headers = [
'ide-shortcut-bundle-private.h',
'ide-shortcut-manager-private.h',
'ide-style-variant-preview-private.h',
+ 'ide-support-private.h',
]
libide_gui_private_sources = [
@@ -79,6 +80,7 @@ libide_gui_private_sources = [
'ide-session.c',
'ide-shortcut-bundle.c',
'ide-shortcut-manager.c',
+ 'ide-support.c',
'ide-style-variant-preview.c',
'ide-workspace-actions.c',
]
diff --git a/src/plugins/meson.build b/src/plugins/meson.build
index 8ac8f7dca..5a89ee8be 100644
--- a/src/plugins/meson.build
+++ b/src/plugins/meson.build
@@ -114,7 +114,6 @@ subdir('snippets')
subdir('spellcheck')
subdir('sphinx-preview')
subdir('stylelint')
-subdir('support')
subdir('symbol-tree')
subdir('sysprof')
subdir('sysroot')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]