summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-07 00:30:12 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-07 00:30:12 +0300
commitdbe1294f640a7ab1328381a43f711043210842f5 (patch)
tree13ccd9e9ecc0ca66f442de2932b1deaefb84881a /src/gui/widgets
parentaa413701e451e0adc7b9887d1f45d06d19d684f1 (diff)
downloadmv-dbe1294f640a7ab1328381a43f711043210842f5.tar.gz
mv-dbe1294f640a7ab1328381a43f711043210842f5.tar.bz2
mv-dbe1294f640a7ab1328381a43f711043210842f5.tar.xz
mv-dbe1294f640a7ab1328381a43f711043210842f5.zip
Add client version as special constant to help window.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/battletab.cpp1
-rw-r--r--src/gui/widgets/browserbox.cpp6
-rw-r--r--src/gui/widgets/browserbox.h4
3 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/widgets/battletab.cpp b/src/gui/widgets/battletab.cpp
index 1ab5cb497..e5f8c0f77 100644
--- a/src/gui/widgets/battletab.cpp
+++ b/src/gui/widgets/battletab.cpp
@@ -26,6 +26,7 @@
#include "commandhandler.h"
#include "localplayer.h"
#include "log.h"
+#include "main.h"
#include "gui/theme.h"
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 20d1803f8..a925c0712 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -51,7 +51,8 @@ BrowserBox::BrowserBox(unsigned int mode, bool opaque):
mWidth(0),
mYStart(0),
mUpdateTime(-1),
- mAlwaysUpdate(true)
+ mAlwaysUpdate(true),
+ mProcessVersion(false)
{
setFocusable(true);
addMouseListener(this);
@@ -136,6 +137,9 @@ void BrowserBox::addRow(const std::string &row, bool atTop)
newRow = row;
}
+ if (mProcessVersion)
+ newRow = replaceAll(newRow, "%VER%", SMALL_VERSION);
+
if (atTop)
mTextRows.push_front(newRow);
else
diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h
index a21f6b926..a1939bc6d 100644
--- a/src/gui/widgets/browserbox.h
+++ b/src/gui/widgets/browserbox.h
@@ -175,6 +175,9 @@ class BrowserBox : public gcn::Widget,
void setAlwaysUpdate(bool n)
{ mAlwaysUpdate = n; }
+ void setProcessVersion(bool n)
+ { mProcessVersion = n; }
+
private:
int calcHeight();
@@ -201,6 +204,7 @@ class BrowserBox : public gcn::Widget,
int mYStart;
int mUpdateTime;
bool mAlwaysUpdate;
+ bool mProcessVersion;
};
#endif