[nautilus/940-maybe-don-t-show-stable-in-about-dialog] meson.build: Don't suffix VERSION with '-stable'




commit 74050734b2329c2e3db02bbd3771a78cab3a7210
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 in the C file.
    
    Closes #940

 meson.build           |  4 ++--
 src/nautilus-window.c | 12 +++++++++++-
 2 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 6abf6325a..de8c9edc5 100644
--- a/meson.build
+++ b/meson.build
@@ -157,7 +157,7 @@ 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('VCS_TAG', '@VCS_TAG@')
 
 conf.set('ENABLE_PACKAGEKIT', get_option('packagekit'))
 conf.set('ENABLE_PROFILING', get_option('profiling'))
@@ -171,7 +171,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: '',
     input: configure_file(
       output: 'config.h.in',
       configuration: conf
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index aefa7f12c..a518d7541 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;
+    const gchar *version;
 
     /* “Files” is the generic application name and the suffix is
      * an arbitrary and deliberately unlocalized string only shown
@@ -2983,9 +2984,18 @@ nautilus_window_show_about_dialog (NautilusWindow *window)
      */
     program_name = g_strconcat (_("Files"), NAME_SUFFIX, NULL);
 
+    if (g_str_equal (VCS_TAG, ""))
+    {
+        version = PACKAGE_VERSION;
+    }
+    else
+    {
+        version = PACKAGE_VERSION "-" VCS_TAG;
+    }
+
     gtk_show_about_dialog (window ? GTK_WINDOW (window) : NULL,
                            "program-name", program_name,
-                           "version", VERSION,
+                           "version", version,
                            "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]