[nautilus/940-maybe-don-t-show-stable-in-about-dialog: 533/533] meson.build: Don't suffix VERSION with '-stable'
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/940-maybe-don-t-show-stable-in-about-dialog: 533/533] meson.build: Don't suffix VERSION with '-stable'
- Date: Wed, 30 Dec 2020 22:11:56 +0000 (UTC)
commit 77ebc1e585a702bc9990f5ff7b9b46a37b12e3ba
Author: António Fernandes <antoniof gnome org>
Date: Wed Dec 30 22:07:01 2020 +0000
meson.build: Don't suffix VERSION with '-stable'
It is visible in the about dialog and may be wrong.
For better control of the resulting label, concatenate at runtime.
Based on libide from gnome-builder.
Closes #940
meson.build | 5 +++--
src/nautilus-window.c | 9 ++++++++-
2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 6abf6325a..cebb66692 100644
--- a/meson.build
+++ b/meson.build
@@ -157,7 +157,8 @@ conf.set_quoted('NAUTILUS_DATADIR', join_paths(prefix, datadir, 'nautilus'))
conf.set_quoted('NAUTILUS_EXTENSIONDIR', join_paths(prefix, extensiondir))
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
conf.set_quoted('PROFILE', profile)
-conf.set_quoted('VERSION', '@0@-@VCS_TAG@'.format(meson.project_version()))
+conf.set_quoted('VERSION', meson.project_version())
+conf.set_quoted('VCS_TAG', '@VCS_TAG@')
conf.set('ENABLE_PACKAGEKIT', get_option('packagekit'))
conf.set('ENABLE_PROFILING', get_option('profiling'))
@@ -171,7 +172,7 @@ conf.set('HAVE_SELINUX', get_option('selinux'))
config_h = declare_dependency(
sources: vcs_tag(
command: ['git', 'rev-parse', '--short', 'HEAD'],
- fallback: profile != ''? 'devel' : 'stable',
+ fallback: profile != ''? 'devel' : '',
input: configure_file(
output: 'config.h.in',
configuration: conf
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index aefa7f12c..7f5b74313 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -2976,6 +2976,7 @@ nautilus_window_show_about_dialog (NautilusWindow *window)
NULL
};
g_autofree gchar *program_name = NULL;
+ g_autoptr (GString) version = NULL;
/* “Files” is the generic application name and the suffix is
* an arbitrary and deliberately unlocalized string only shown
@@ -2983,9 +2984,15 @@ nautilus_window_show_about_dialog (NautilusWindow *window)
*/
program_name = g_strconcat (_("Files"), NAME_SUFFIX, NULL);
+ version = g_string_new (VERSION);
+ if (!g_str_equal (PROFILE, ""))
+ {
+ g_string_append (version, "-" VCS_TAG);
+ }
+
gtk_show_about_dialog (window ? GTK_WINDOW (window) : NULL,
"program-name", program_name,
- "version", VERSION,
+ "version", version->str,
"comments", _("Access and organize your files"),
"website", "https://wiki.gnome.org/action/show/Apps/Files",
"copyright", "© 1999–2018 The Files Authors",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]