[gimp] Bug 750920 - Show commit number in About dialog
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 750920 - Show commit number in About dialog
- Date: Fri, 21 Aug 2015 08:27:37 +0000 (UTC)
commit 4161ea9cd7d02391ba498826d19282a0b3da7d7a
Author: Michael Natterer <mitch gimp org>
Date: Fri Aug 21 10:26:30 2015 +0200
Bug 750920 - Show commit number in About dialog
Done.
app/dialogs/about-dialog.c | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/app/dialogs/about-dialog.c b/app/dialogs/about-dialog.c
index 70dd15d..7fbf03c 100644
--- a/app/dialogs/about-dialog.c
+++ b/app/dialogs/about-dialog.c
@@ -39,6 +39,8 @@
#include "about-dialog.h"
#include "authors.h"
+#include "git-version.h"
+
#include "gimp-intl.h"
@@ -599,9 +601,21 @@ about_dialog_timer (gpointer data)
static void
about_dialog_add_unstable_message (GtkWidget *vbox)
{
- GtkWidget *label;
-
- label = gtk_label_new (_("This is an unstable development release."));
+ GtkWidget *label;
+ const gchar *version;
+ gchar *short_hash;
+ gchar *text;
+
+ version = GIMP_GIT_VERSION;
+ short_hash = g_strdup (version + strlen (version) - 7);
+ text = g_strdup_printf (_("This is an unstable development release\n"
+ "commit %s"), short_hash);
+ label = gtk_label_new (text);
+ g_free (text);
+ g_free (short_hash);
+
+ gtk_label_set_selectable (GTK_LABEL (label), TRUE);
+ gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);
gimp_label_set_attributes (GTK_LABEL (label),
PANGO_ATTR_STYLE, PANGO_STYLE_ITALIC,
-1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]