From 9a6d545f94428a60c05c3350506adb38dbebeab0 Mon Sep 17 00:00:00 2001 From: Armin Burgmeier Date: Thu, 10 Jan 2013 22:30:14 +0100 Subject: [PATCH] Use the OpenClonk version as the mape version --- CMakeLists.txt | 2 ++ src/mape/cpp-handles/version-handle.cpp | 28 ++++++++++++++++++++++++ src/mape/cpp-handles/version-handle.h | 29 +++++++++++++++++++++++++ src/mape/window.c | 6 +++-- 4 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 src/mape/cpp-handles/version-handle.cpp create mode 100644 src/mape/cpp-handles/version-handle.h diff --git a/CMakeLists.txt b/CMakeLists.txt index a04951282..e08833f28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -636,6 +636,8 @@ set(MAPE_SOURCES src/mape/cpp-handles/random-handle.cpp src/mape/cpp-handles/texture-handle.h src/mape/cpp-handles/texture-handle.cpp + src/mape/cpp-handles/version-handle.h + src/mape/cpp-handles/version-handle.cpp src/mape/cpp-handles/stub-handle.cpp src/mape/configfile.c src/mape/configfile.h diff --git a/src/mape/cpp-handles/version-handle.cpp b/src/mape/cpp-handles/version-handle.cpp new file mode 100644 index 000000000..0bb30c2a6 --- /dev/null +++ b/src/mape/cpp-handles/version-handle.cpp @@ -0,0 +1,28 @@ +/* + * mape - C4 Landscape.txt editor + * + * Copyright (c) 2005-2009 Armin Burgmeier + * + * Portions might be copyrighted by other authors who have contributed + * to OpenClonk. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * See isc_license.txt for full license and disclaimer. + * + * "Clonk" is a registered trademark of Matthes Bender. + * See clonk_trademark_license.txt for full license. + */ + +#include "C4Version.h" +#include "mape/cpp-handles/version-handle.h" + +extern "C" { + +const char* c4_version_get() +{ + return C4VERSION; +} + +} /* extern "C" */ diff --git a/src/mape/cpp-handles/version-handle.h b/src/mape/cpp-handles/version-handle.h new file mode 100644 index 000000000..5c38244c8 --- /dev/null +++ b/src/mape/cpp-handles/version-handle.h @@ -0,0 +1,29 @@ +/* + * mape - C4 Landscape.txt editor + * + * Copyright (c) 2005-2009 Armin Burgmeier + * + * Portions might be copyrighted by other authors who have contributed + * to OpenClonk. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * See isc_license.txt for full license and disclaimer. + * + * "Clonk" is a registered trademark of Matthes Bender. + * See clonk_trademark_license.txt for full license. + */ + +#ifndef INC_MAPE_C4_VERSION_HANDLE_H +#define INC_MAPE_C4_VERSION_HANDLE_H + +#include + +G_BEGIN_DECLS + +const char* c4_version_get(); + +G_END_DECLS + +#endif /* INC_MAPE_C4_TEXTURE_HANDLE_H */ diff --git a/src/mape/window.c b/src/mape/window.c index f697b4691..9256ed6cb 100644 --- a/src/mape/window.c +++ b/src/mape/window.c @@ -18,6 +18,7 @@ #include #include +#include "mape/cpp-handles/version-handle.h" #include "mape/fileicon.h" #include "mape/configfile.h" #include "mape/preferencesdialog.h" @@ -447,6 +448,7 @@ static void mape_window_cb_help_about(GtkAction* action, "", "Contributors:", " Tyron Madlener ", + " Günther Brammer ", NULL }; @@ -465,12 +467,12 @@ static void mape_window_cb_help_about(GtkAction* action, gtk_about_dialog_set_version( GTK_ABOUT_DIALOG(about_dialog), - "1.3.90" + c4_version_get() ); gtk_about_dialog_set_copyright( GTK_ABOUT_DIALOG(about_dialog), - "Copyright \xc2\xa9 2005-2009 Armin Burgmeier" + "Copyright \xc2\xa9 2005-2013 Armin Burgmeier" ); gtk_about_dialog_set_comments(