app: Include commit hash in display shell message

This commit is contained in:
Mukund Sivaraman
2015-03-12 12:07:32 +05:30
parent 0fdde98f6d
commit 2c80affe4c

View File

@ -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);