summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2013-03-10 16:39:02 +0000
committerme_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac>2013-03-10 16:39:02 +0000
commitd0e02c1af63cf96363ebb90eb047f3b3ffaf7eb1 (patch)
tree76cff6b4d89ff6ea8720302417ed34444eca4f14
parente02849a70f14950e2af7552b21e3fcadd3e1898d (diff)
downloadpica-pica-d0e02c1af63cf96363ebb90eb047f3b3ffaf7eb1.tar.gz
pica-pica-d0e02c1af63cf96363ebb90eb047f3b3ffaf7eb1.zip
new macro for protocol version as string literal; displaying protocol version in About dialog
git-svn-id: svn://localhost/project_picapica/trunk@231 fb96df88-216d-11de-830c-f3023f12d8ac
-rwxr-xr-xPICA_proto.h4
-rw-r--r--pica-client/picaactioncenter.cpp5
2 files changed, 8 insertions, 1 deletions
diff --git a/PICA_proto.h b/PICA_proto.h
index 9f71fd8..5062be9 100755
--- a/PICA_proto.h
+++ b/PICA_proto.h
@@ -7,6 +7,10 @@
#define PICA_PROTO_VER_HIGH 0
#define PICA_PROTO_VER_LOW 3
+#define PICA_PROTO_VER_STRING PICA_STRINGIFY2(PICA_PROTO_VER_HIGH, PICA_PROTO_VER_LOW)
+#define PICA_STRINGIFY2(H, L) PICA_STRINGIFY(H, L)
+#define PICA_STRINGIFY(H, L) #H#L
+
#define PICA_PROTO_INITREQ 0xCA
#define PICA_PROTO_INITRESPOK 0x01
#define PICA_PROTO_VERDIFFER 0x02
diff --git a/pica-client/picaactioncenter.cpp b/pica-client/picaactioncenter.cpp
index 8bedb0f..da8f0b0 100644
--- a/pica-client/picaactioncenter.cpp
+++ b/pica-client/picaactioncenter.cpp
@@ -3,6 +3,7 @@
#include "mainwindow.h"
#include "skynet.h"
#include <QApplication>
+#include "../PICA_proto.h"
#include <QMessageBox>
@@ -28,7 +29,9 @@ void PicaActionCenter::about()
QMessageBox mbx;
mbx.setWindowIcon(picapica_ico_sit);
mbx.setIconPixmap(picapica_ico_sit.pixmap(32));
- mbx.setText(tr("Pica Pica Messenger "VERSION_STRING"\n(c) 2012 Anton Sviridenko\n http://picapica.im\n\n\Contributors:\nDaniil Ustinov - bugfixes"));
+ mbx.setText(tr("Pica Pica Messenger "VERSION_STRING"\n(c) 2012 Anton Sviridenko\n\
+http://picapica.im\n\nContributors:\nDaniil Ustinov - bugfixes\n\n\
+protocol version " PICA_PROTO_VER_STRING));
mbx.exec();
}