From 0f52676b4b99577af1bd9f23a0d6d54e22766f85 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Thu, 22 Dec 2011 13:13:26 +0100 Subject: [PATCH] version info popup --- elam | 2 +- pack | 2 +- src/main.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- src/main.h | 1 + tzone | 2 +- 5 files changed, 50 insertions(+), 7 deletions(-) diff --git a/elam b/elam index 018dc50..9e8411c 160000 --- a/elam +++ b/elam @@ -1 +1 @@ -Subproject commit 018dc50734423bcafe3645e2ce94442c5da11b8a +Subproject commit 9e8411cf5005c82fe37dd1f543568fe7ed761b8a diff --git a/pack b/pack index c390447..9be5a0e 160000 --- a/pack +++ b/pack @@ -1 +1 @@ -Subproject commit c3904476cb1ad67c6a663f7b1e9f6e9f9de42e02 +Subproject commit 9be5a0ec75e41359a6820c1cf43193eaa1a22853 diff --git a/src/main.cpp b/src/main.cpp index 1c9976d..d3da389 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -33,6 +33,7 @@ #include "main.h" #include "login.h" #include "msinterface.h" +#include "elam.h" QString choseLanguage(bool warn) { @@ -85,14 +86,12 @@ void MApplication::aboutMS() QMessageBox mb; mb.setIconPixmap(QPixmap(":/icon.png")); mb.setWindowTitle(tr("About MagicSmoke")); - mb.setText(tr( "

MagicSmoke %3

" + mb.setText(tr( "

MagicSmoke %1

" "© Konrad Rosenbaum, 2007-2011
" "© Peter Keller, 2007-2008
" "protected under the GNU GPL v.3 or at your option any newer

" - "See also the MagicSmoke Homepage.

" + "See also the MagicSmoke Homepage.

" "This version was compiled from repository '%1' revision '%2'.") - .arg(MSInterface::staticVersionInfo(WOb::VersionRootURL)) // %1 - .arg(MInterface::staticVersionInfo(WOb::VersionNumber)) //%2 .arg(MSInterface::staticVersionInfo(WOb::VersionHR)) //%3 .arg(HOMEPAGE_BASEURL) //%4 ); @@ -100,6 +99,48 @@ void MApplication::aboutMS() mb.exec(); } +void MApplication::versionDlg() +{ + QMessageBox mb; + mb.setIconPixmap(QPixmap(":/icon.png")); + mb.setWindowTitle(tr("MagicSmoke Version Information")); + mb.setText(tr( "

MagicSmoke Version %3

" + "" + "" + "" + "" + "" + "" + "
Repository:%1
Revision:%2
Modification State:%4
Commit Time:%5
Committer:%6

\n" + "

Libraries

\n" + "" + "" + "" + "" + "" + "" + "
WOC:%7
%8
PACK Library:%9
%10
Qt:%11
ELAM:%12
Time Zone Library:%13
Time Zone Data:%14
" + ) + .arg(htmlize(MSInterface::staticVersionInfo(WOb::VersionRootURL))) // %1 + .arg(htmlize(MSInterface::staticVersionInfo(WOb::VersionNumber))) //%2 + .arg(htmlize(MSInterface::staticVersionInfo(WOb::VersionHR))) //%3 + .arg(MSInterface::staticVersionInfo(WOb::VersionLocallyModified)) //%4 + .arg(htmlize(MSInterface::staticVersionInfo(WOb::VersionTime))) //%5 + .arg(htmlize(MSInterface::staticVersionInfo(WOb::VersionAuthor))) //&6 + .arg(htmlize(MSInterface::staticWocVersionInfo(WOb::VersionRootURL))) //%7 + .arg(htmlize(MSInterface::staticWocVersionInfo(WOb::VersionNumber))) + .arg(htmlize(WInterface::staticLibraryVersionInfo(WOb::VersionRootURL))) //%0 + .arg(htmlize(WInterface::staticLibraryVersionInfo(WOb::VersionNumber))) + .arg(htmlize(QT_VERSION_STR)) //%11 + .arg(htmlize(ELAM::versionInfo())) //%12 + .arg("??") //%13 + .arg("??") //%14 + ); + mb.setStandardButtons(QMessageBox::Ok); + mb.exec(); +} + + static QList > helpUrl; static void initHelpUrl() @@ -139,6 +180,7 @@ QMenu* MApplication::helpMenu() m->addSeparator(); m->addAction("About &MagicSmoke",qApp,SLOT(aboutMS())); m->addAction("About &Qt",qApp,SLOT(aboutQt())); + m->addAction("&Version Info",qApp,SLOT(versionDlg())); return m; } diff --git a/src/main.h b/src/main.h index 488a35f..6b61c0d 100644 --- a/src/main.h +++ b/src/main.h @@ -36,6 +36,7 @@ class MApplication:public QApplication public slots: //help menu void aboutMS(); + void versionDlg(); void help(); void help(int); }; diff --git a/tzone b/tzone index 7e5d076..e8f6925 160000 --- a/tzone +++ b/tzone @@ -1 +1 @@ -Subproject commit 7e5d076df856ad1d9952ca67a6dc72929c8c0e88 +Subproject commit e8f692597d177b69b5287d82514126b16a1a44e6 -- 1.7.2.5