Commit d09d5690 authored by Juan Pablo Ugarte's avatar Juan Pablo Ugarte
Browse files

GladeWindow: use VCS version in development series

Closes issue #472 "gnome-nightly: About dialog should display git commit rev"
parent 0066ee41
......@@ -26,6 +26,7 @@
#include <config.h>
#include "version.h"
#include "glade-window.h"
#include "glade-resources.h"
#include "glade-preferences.h"
......@@ -1456,8 +1457,6 @@ on_about_action_activate (GSimpleAction *action,
GladeWindow *window = data;
GladeWindowPrivate *priv = window->priv;
gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (priv->about_dialog), PACKAGE_VERSION);
gtk_window_present (priv->about_dialog);
}
......@@ -2105,6 +2104,11 @@ glade_window_init (GladeWindow *window)
/* Add Gdk backend as a class */
ctx = gtk_widget_get_style_context (GTK_WIDGET (window));
gtk_style_context_add_class (ctx, glade_window_get_gdk_backend ());
/* Check if this is a development version */
if (GLADE_MINOR_VERSION % 2)
gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (priv->about_dialog),
VCS_VERSION);
}
static void
......
......@@ -23,6 +23,7 @@
#include <config.h>
#include "version.h"
#include "glade-window.h"
#include "glade-resources.h"
......@@ -67,7 +68,11 @@ handle_local_options (GApplication *application,
if (version != FALSE)
{
/* Print version information and exit */
g_print ("%s\n", PACKAGE_STRING);
if (GLADE_MINOR_VERSION % 2)
g_print (PACKAGE_NAME" "VCS_VERSION"\n");
else
g_print (PACKAGE_STRING"\n");
return 0;
}
......
vcs_tag(input: 'version.h.in', output: 'version.h')
sources = files(
'glade-http.c',
'glade-intro.c',
......
#define VCS_VERSION "@VCS_TAG@"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment