[gimp] app: Include commit hash in display shell message



commit 2c80affe4cbf39bf562057ea2464b4d0080702f9
Author: Mukund Sivaraman <muks banu com>
Date:   Thu Mar 12 12:07:32 2015 +0530

    app: Include commit hash in display shell message

 app/display/gimpdisplayshell-callbacks.c |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-callbacks.c b/app/display/gimpdisplayshell-callbacks.c
index 7099dba..f936b0a 100644
--- a/app/display/gimpdisplayshell-callbacks.c
+++ b/app/display/gimpdisplayshell-callbacks.c
@@ -46,6 +46,8 @@
 #include "gimpimagewindow.h"
 #include "gimpnavigationeditor.h"
 
+#include "git-version.h"
+
 #include "gimp-intl.h"
 
 
@@ -515,18 +517,27 @@ gimp_display_shell_canvas_draw_drop_zone (GimpDisplayShell *shell,
 #ifdef GIMP_UNSTABLE
   {
     PangoLayout   *layout;
+    const gchar   *version;
+    gchar         *short_hash;
+    gchar         *msg;
     GtkAllocation  allocation;
     gint           width;
     gint           height;
     gdouble        scale;
 
     layout = gtk_widget_create_pango_layout (shell->canvas, NULL);
-    pango_layout_set_markup (layout,
-                             _("<big>Unstable Development Version</big>\n\n"
-                               "<small>Please build latest "
-                               "git master before\n"
-                               "reporting any bugs against "
-                               "this version</small>"), -1);
+
+    version = GIMP_GIT_VERSION;
+    short_hash = g_strdup (version + strlen (version) - 7);
+    msg = g_strdup_printf (_("<big>Unstable Development Version</big>\n\n"
+                             "<small>commit <tt>%s</tt></small>\n\n"
+                             "<small>Please build latest "
+                             "git master before\n"
+                             "reporting any bugs against "
+                             "this version.</small>"), short_hash);
+    pango_layout_set_markup (layout, msg, -1);
+    g_free (msg);
+    g_free (short_hash);
     pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
 
     pango_layout_get_pixel_size (layout, &width, &height);


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