[gnome-terminal] about: Fix gnome version



commit 2c714c80239167852a8ea883fcedd73e2249f6c6
Author: Christian Persch <chpe src gnome org>
Date:   Thu Jul 8 20:07:53 2021 +0200

    about: Fix gnome version

 src/terminal-util.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/terminal-util.cc b/src/terminal-util.cc
index c88e002b..f1be9b26 100644
--- a/src/terminal-util.cc
+++ b/src/terminal-util.cc
@@ -222,7 +222,11 @@ terminal_util_show_about (void)
 
   licence_text = terminal_util_get_licence_text ();
 
-  int gnome_version = (TERMINAL_MINOR_VERSION + 1) & ~1;
+  /* gnome 40 corresponds to g-t 3.40.x. After that, gnome version
+   * increases by 1 while the g-t minor version increases by 2 between
+   * stable releases.
+   */
+  auto const gnome_version = 40 + (TERMINAL_MINOR_VERSION - 40 + 1) / 2;
   version = g_strdup_printf (_("Version %s for GNOME %d"),
                              VERSION,
                              gnome_version);


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