Added version moniker

Sun, 19 May 2013 13:13:40 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Sun, 19 May 2013 13:13:40 +0300
changeset 224
805bf9ef9529
parent 223
4f95d7f2e9ef
child 225
a78179b182e1

Added version moniker

src/common.h file | annotate | diff | comparison | revisions
src/file.cpp file | annotate | diff | comparison | revisions
src/gui.cpp file | annotate | diff | comparison | revisions
src/gui.h file | annotate | diff | comparison | revisions
src/gui_actions.cpp file | annotate | diff | comparison | revisions
src/history.cpp file | annotate | diff | comparison | revisions
--- a/src/common.h	Sun May 19 03:42:25 2013 +0300
+++ b/src/common.h	Sun May 19 13:13:40 2013 +0300
@@ -34,14 +34,20 @@
 #include "types.h"
 
 #define APPNAME "LDForge"
-
 #define VERSION_MAJOR 0
 #define VERSION_MAJOR_STR "0"
 #define VERSION_MINOR 1
 #define VERSION_MINOR_STR "1"
+#define BUILD_ID BUILD_INTERNAL
 
 // ============---
-// #define RELEASE
+#define RELEASE (BUILD_ID != BUILD_INTERNAL)
+
+#define BUILD_INTERNAL	0
+#define BUILD_ALPHA		1
+#define BUILD_BETA		2
+#define BUILD_RC			3
+#define BUILD_RELEASE		4
 
 #ifndef RELEASE
 # define devf(...) doDevf (__func__, __VA_ARGS__);
--- a/src/file.cpp	Sun May 19 03:42:25 2013 +0300
+++ b/src/file.cpp	Sun May 19 13:13:40 2013 +0300
@@ -380,7 +380,7 @@
 	
 	// Rebuild the object tree view now.
 	g_win->fullRefresh ();
-	g_win->setTitle ();
+	g_win->updateTitle ();
 	g_win->R ()->resetAngles ();
 	
 	History::clear ();
@@ -416,7 +416,7 @@
 	// We have successfully saved, update the save position now.
 	savePos = History::pos ();
 	
-	g_win->setTitle ();
+	g_win->updateTitle ();
 	
 	return true;
 }
--- a/src/gui.cpp	Sun May 19 03:42:25 2013 +0300
+++ b/src/gui.cpp	Sun May 19 13:13:40 2013 +0300
@@ -86,7 +86,7 @@
 	
 	setStatusBar (new QStatusBar);
 	setWindowIcon (getIcon ("ldforge"));
-	setTitle ();
+	updateTitle ();
 	setMinimumSize (320, 200);
 	resize (800, 600);
 	
@@ -491,10 +491,20 @@
 // =============================================================================
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 // =============================================================================
-void ForgeWindow::setTitle () {
+void ForgeWindow::updateTitle () {
 	str title = APPNAME " v";
 	title += versionString;
 	
+#if BUILD_ID == BUILD_INTERNAL
+	title += " Internal";
+#elif BUILD_ID == BUILD_ALPHA
+	title += " Alpha";
+#elif BUILD_ID == BUILD_BETA
+	title += " Beta";
+#elif BUILD_ID == BUILD_RC
+	title += " RC";
+#endif // BUILD_ID
+	
 	// Append our current file if we have one
 	if (g_curfile) {
 		title += fmt (": %s", basename (g_curfile->m_filename.chars()));
--- a/src/gui.h	Sun May 19 03:42:25 2013 +0300
+++ b/src/gui.h	Sun May 19 13:13:40 2013 +0300
@@ -122,7 +122,7 @@
 public:
 	ForgeWindow ();
 	void buildObjList ();
-	void setTitle ();
+	void updateTitle ();
 	void fullRefresh ();
 	void refresh ();
 	ulong getInsertionPoint ();
--- a/src/gui_actions.cpp	Sun May 19 03:42:25 2013 +0300
+++ b/src/gui_actions.cpp	Sun May 19 13:13:40 2013 +0300
@@ -72,7 +72,7 @@
 	
 	if (g_curfile->save (path)) {
 		g_curfile->m_filename = path;
-		g_win->setTitle ();
+		g_win->updateTitle ();
 		
 		logf ("Saved successfully to %s\n", path.chars ());
 	} else {
--- a/src/history.cpp	Sun May 19 03:42:25 2013 +0300
+++ b/src/history.cpp	Sun May 19 13:13:40 2013 +0300
@@ -87,7 +87,7 @@
 #endif // RELEASE
 		
 		// Update the window title as well
-		g_win->setTitle ();
+		g_win->updateTitle ();
 	}
 	
 	// =========================================================================

mercurial