From 08ae222984018e50efa0dea02f12efeb02dde534 Mon Sep 17 00:00:00 2001 From: Thierry Lorthiois Date: Fri, 15 Jan 2010 20:09:35 +0000 Subject: [PATCH] central version.h. the build system could overwrite it... --- src/Makefile.am | 3 ++- src/panel.c | 1 - src/tint.c | 3 ++- src/tint2conf/Makefile.am | 2 +- src/tint2conf/main.c | 5 ++--- src/version.h | 4 ++++ 6 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 src/version.h diff --git a/src/Makefile.am b/src/Makefile.am index 6813a04..64c3b74 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -31,7 +31,8 @@ tint2_SOURCES = config.c \ taskbar/taskbar.h \ taskbar/task.h \ tooltip/tooltip.c \ - tooltip/tooltip.h + tooltip/tooltip.h \ + version.h if ENABLE_BATTERY DEFS += -DENABLE_BATTERY diff --git a/src/panel.c b/src/panel.c index 77dcb2d..eb83902 100644 --- a/src/panel.c +++ b/src/panel.c @@ -570,7 +570,6 @@ void set_panel_background(Panel *p) x -= xoff; y -= yoff; } - //printf("x %d, y %d\n", x, y); XSetTSOrigin(server.dsp, server.gc, -x, -y); XFillRectangle(server.dsp, p->area.pix, server.gc, 0, 0, p->area.width, p->area.height); } diff --git a/src/tint.c b/src/tint.c index a606546..c95c317 100644 --- a/src/tint.c +++ b/src/tint.c @@ -31,6 +31,7 @@ #include #include +#include "version.h" #include "server.h" #include "window.h" #include "config.h" @@ -59,7 +60,7 @@ void init (int argc, char *argv[]) exit(0); } if (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--version")) { - printf("tint2 version 0.8\n"); + printf("tint2 version %s\n", VERSION_STRING); exit(0); } if (!strcmp(argv[i], "-c")) { diff --git a/src/tint2conf/Makefile.am b/src/tint2conf/Makefile.am index 6e85d01..c76dc92 100644 --- a/src/tint2conf/Makefile.am +++ b/src/tint2conf/Makefile.am @@ -1,7 +1,7 @@ if ENABLE_TINT2CONF bin_PROGRAMS = tint2conf dist_bin_SCRIPTS = tintwizard.py -tint2conf_SOURCES = main.c theme_view.c theme_view.h ../util/common.c +tint2conf_SOURCES = main.c theme_view.c theme_view.h ../util/common.c ../version.h INCLUDES = -I../util AM_CFLAGS += @TINT2CONF_CFLAGS@ diff --git a/src/tint2conf/main.c b/src/tint2conf/main.c index 86a2968..7026102 100644 --- a/src/tint2conf/main.c +++ b/src/tint2conf/main.c @@ -28,12 +28,11 @@ #include #include +#include "version.h" #include "common.h" #include "theme_view.h" -#define LONG_VERSION_STRING "0.7" - // default config file and directory char *g_path_config = 0; @@ -195,7 +194,7 @@ static void menuAbout(GtkWindow * parent) gtk_show_about_dialog( parent, "name", g_get_application_name( ), "comments", _("Theming tool for tint2 panel"), - "version", LONG_VERSION_STRING, + "version", VERSION_STRING, "copyright", _("Copyright 2009 tint2 team\nTint2 License GNU GPL version 2\nTintwizard License GNU GPL version 3"), "logo-icon-name", NULL, "authors", authors, /* Translators: translate "translator-credits" as diff --git a/src/version.h b/src/version.h new file mode 100644 index 0000000..a38524e --- /dev/null +++ b/src/version.h @@ -0,0 +1,4 @@ + + +#define VERSION_STRING "0.9rc1" + -- 2.44.0