summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-06-18 22:09:38 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-06-18 22:09:38 (GMT)
commita23b90319f9de8db0b455f5cd56e2428a3fcc53b (patch)
tree95d5baed116136cc214d8e1b5c49136b4abded5f /Swift/QtUI
parentce4eb88be2eba12d5580bb22b48af3a0e915363b (diff)
parent5b88d16b2ea7edfbc1487751fb95f128b2c30330 (diff)
downloadswift-contrib-a23b90319f9de8db0b455f5cd56e2428a3fcc53b.zip
swift-contrib-a23b90319f9de8db0b455f5cd56e2428a3fcc53b.tar.bz2
Merge branch 'swift-1.x'
* swift-1.x: Fixed Debian manpages installation. Use LibXML as a Debian source dependency (instead of Expat) Tweak help documentation and add manpages. Conflicts: Swift/QtUI/QtSwift.cpp
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtSwift.cpp13
-rw-r--r--Swift/QtUI/main.cpp11
2 files changed, 17 insertions, 7 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index f0c876c..1d820b1 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -67,12 +67,13 @@ po::options_description QtSwift::getOptionsDescription() {
po::options_description result("Options");
result.add_options()
("debug", "Turn on debug logging")
- ("help", "produce help message")
- ("netbook-mode", "use netbook mode display (unsupported)")
- ("no-tabs", "don't manage chat windows in tabs (unsupported)")
- ("latency-debug", "use latency debugging (unsupported)")
- ("multi-account", po::value<int>()->default_value(1), "number of accounts to open windows for (unsupported)")
- ("start-minimized", "don't show the login/roster window at startup")
+ ("help", "Show this help message")
+ ("version", "Show version information")
+ ("netbook-mode", "Use netbook mode display (unsupported)")
+ ("no-tabs", "Don't manage chat windows in tabs (unsupported)")
+ ("latency-debug", "Use latency debugging (unsupported)")
+ ("multi-account", po::value<int>()->default_value(1), "Number of accounts to open windows for (unsupported)")
+ ("start-minimized", "Don't show the login/roster window at startup")
("eagle-mode", "Settings more suitable for military/secure deployments")
;
return result;
diff --git a/Swift/QtUI/main.cpp b/Swift/QtUI/main.cpp
index d44bd01..2eef379 100644
--- a/Swift/QtUI/main.cpp
+++ b/Swift/QtUI/main.cpp
@@ -16,6 +16,7 @@
#include <Swift/Controllers/Translator.h>
#include <Swift/Controllers/ApplicationInfo.h>
+#include <Swift/Controllers/BuildVersion.h>
#include <SwifTools/Application/PlatformApplicationPathProvider.h>
#include "QtSwift.h"
@@ -52,9 +53,17 @@ int main(int argc, char* argv[]) {
}
boost::program_options::notify(vm);
if (vm.count("help") > 0) {
- std::cout << desc << "\n";
+ std::cout << SWIFT_APPLICATION_NAME << " is an instant messaging client for the XMPP network." << std::endl;
+ std::cout << std::endl;
+ std::cout << "Usage: " << argv[0] << " [OPTIONS]..." << std::endl;
+ std::cout << std::endl;
+ std::cout << desc << std::endl;
return 1;
}
+ if (vm.count("version") > 0) {
+ std::cout << SWIFT_APPLICATION_NAME << " " << buildVersion << std::endl;
+ return 0;
+ }
Swift::QtSwift swift(vm);
int result = app.exec();