[gnome-text-editor] build: add bugreport_url option



commit 110149f15f254ae6d7f209b480f3a58fcaafef4d
Author: Christian Hergert <chergert redhat com>
Date:   Sun Jun 19 15:59:55 2022 -0700

    build: add bugreport_url option
    
    And distributions should set this so that they get the front-line of
    reports for their distribution rather than upstream.

 meson.build              | 1 +
 meson_options.txt        | 1 +
 src/editor-application.c | 4 ++++
 3 files changed, 6 insertions(+)
---
diff --git a/meson.build b/meson.build
index adc6fff..84294f6 100644
--- a/meson.build
+++ b/meson.build
@@ -55,6 +55,7 @@ config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
 config_h.set_quoted('GETTEXT_PACKAGE', 'gnome-text-editor')
 config_h.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
 config_h.set_quoted('PACKAGE_WEBSITE', 'https://gitlab.gnome.org/GNOME/gnome-text-editor')
+config_h.set_quoted('PACKAGE_BUGREPORTS', get_option('bugreport_url'))
 config_h.set_quoted('PACKAGE_ICON_NAME', app_id)
 config_h.set_quoted('PACKAGE_NAME', 'Text Editor')
 config_h.set_quoted('PACKAGE_DATADIR', join_paths(get_option('prefix'), get_option('datadir'), 
'gnome-text-editor'))
diff --git a/meson_options.txt b/meson_options.txt
index efcfecc..94b42d1 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,2 +1,3 @@
 option('development', type: 'boolean', value: false, description: 'If this is a development build')
 option('enchant', type: 'feature', value: 'enabled', description: 'Use enchant for spellchecking')
+option('bugreport_url', type: 'string', value: 'https://gitlab.gnome.org/GNOME/gnome-text-editor/issues', 
description: 'URL to report issues. Distributions packaging Text Editor are encouraged to set this to their 
bugtracker.')
diff --git a/src/editor-application.c b/src/editor-application.c
index 129136f..823e78e 100644
--- a/src/editor-application.c
+++ b/src/editor-application.c
@@ -540,6 +540,7 @@ static void
 editor_application_constructed (GObject *object)
 {
   EditorApplication *self = (EditorApplication *)object;
+  g_autofree char *description = NULL;
 
   g_assert (EDITOR_IS_APPLICATION (self));
 
@@ -547,6 +548,9 @@ editor_application_constructed (GObject *object)
 
   g_application_set_application_id (G_APPLICATION (self), APP_ID);
   g_application_set_resource_base_path (G_APPLICATION (self), "/org/gnome/TextEditor");
+
+  description = g_strdup_printf ("%s %s", _("Bugs may be reported at:"), PACKAGE_BUGREPORTS);
+  g_application_set_option_context_description (G_APPLICATION (self), description);
 }
 
 static void


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