summaryrefslogtreecommitdiff
path: root/demos/gtk-demo
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-02-18 22:52:15 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-02-18 22:52:15 -0500
commit516776b630d38a7e95b1bc0b33fb1f0e6ecccfbf (patch)
treef14f6ba8afa37f9c2e7bf6b991f99f16ad73bf09 /demos/gtk-demo
parent4d0a1a97ccce80092ab7a9323c41d09f08865b9a (diff)
downloadgtk+-516776b630d38a7e95b1bc0b33fb1f0e6ecccfbf.tar.gz
gtk-demo: Make --version match about
Print the same version information in --version that we show in the about dialog.
Diffstat (limited to 'demos/gtk-demo')
-rw-r--r--demos/gtk-demo/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c
index 5ae00882ac..96ec96e476 100644
--- a/demos/gtk-demo/main.c
+++ b/demos/gtk-demo/main.c
@@ -1052,10 +1052,10 @@ out:
static void
print_version (void)
{
- g_print ("gtk4-demo %d.%d.%d\n",
- gtk_get_major_version (),
- gtk_get_minor_version (),
- gtk_get_micro_version ());
+ g_print ("gtk4-demo %s%s%s\n",
+ PACKAGE_VERSION,
+ g_strcmp0 (PROFILE, "devel") == 0 ? "-" : "",
+ g_strcmp0 (PROFILE, "devel") == 0 ? VCS_TAG : "");
}
static int