From 4733ca193b729cef9d3b9570e6a88637890c3457 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 18 Jan 2024 14:55:38 -0500 Subject: [PATCH] inspector: Show git sha for the build --- gtk/inspector/general.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c index fc0f8b62d3..c485dd4388 100644 --- a/gtk/inspector/general.c +++ b/gtk/inspector/general.c @@ -38,6 +38,8 @@ #include "gdk/gdkdebugprivate.h" #include "gdk/gdkdisplayprivate.h" +#include "profile_conf.h" + #include #ifdef GDK_WINDOWING_X11 @@ -193,7 +195,16 @@ init_version (GtkInspectorGeneral *gen) g_object_unref (gsk_renderer); gdk_surface_destroy (surface); - gtk_label_set_text (GTK_LABEL (gen->gtk_version), GTK_VERSION); + if (g_strcmp0 (PROFILE, "devel") == 0) + { + char *version = g_strdup_printf ("%s-%s", GTK_VERSION, VCS_TAG); + gtk_label_set_text (GTK_LABEL (gen->gtk_version), version); + g_free (version); + } + else + { + gtk_label_set_text (GTK_LABEL (gen->gtk_version), GTK_VERSION); + } gtk_label_set_text (GTK_LABEL (gen->gdk_backend), backend); gtk_label_set_text (GTK_LABEL (gen->gsk_renderer), renderer); }