summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-12-19 11:46:44 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-12-19 11:46:44 (GMT)
commite8b2e33a6fc569af116a32ebb5e441728e390c8f (patch)
treed2128425b185734efb9c3482b07f974e9ed90523 /Swift/QtUI/QtSwift.cpp
parent92b024be81133682658dcd4a044286e4df3ef01a (diff)
downloadswift-e8b2e33a6fc569af116a32ebb5e441728e390c8f.zip
swift-e8b2e33a6fc569af116a32ebb5e441728e390c8f.tar.bz2
Calling with --start-minimized will not show login/roster at launch.
Release-Notes: Launching Swift with the --start-minimized command-line parameter will cause the initial login/roster window to not be displayed (it starts minimized to tray).
Diffstat (limited to 'Swift/QtUI/QtSwift.cpp')
-rw-r--r--Swift/QtUI/QtSwift.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index 9a1788f..7717b77 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -61,10 +61,11 @@ po::options_description QtSwift::getOptionsDescription() {
result.add_options()
("debug", "Turn on debug logging")
("help", "produce help message")
- ("netbook-mode", "use netbook mode display")
- ("no-tabs", "don't manage chat windows in tabs")
- ("latency-debug", "use latency debugging")
- ("multi-account", po::value<int>()->default_value(1), "number of accounts to open windows for")
+ ("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")
;
return result;
}
@@ -94,6 +95,7 @@ QtSwift::QtSwift(po::variables_map options) : networkFactories_(&clientMainThrea
}
tabs_ = options.count("no-tabs") && !(splitter_ > 0) ? NULL : new QtChatTabs();
+ bool startMinimized = options.count("start-minimized") > 0;
settings_ = new QtSettingsProvider();
applicationPathProvider_ = new PlatformApplicationPathProvider(SWIFT_APPLICATION_NAME);
storagesFactory_ = new FileStoragesFactory(applicationPathProvider_->getDataDir());
@@ -123,7 +125,7 @@ QtSwift::QtSwift(po::variables_map options) : networkFactories_(&clientMainThrea
for (int i = 0; i < numberOfAccounts; i++) {
QtSystemTray* systemTray = new QtSystemTray();
systemTrays_.push_back(systemTray);
- QtUIFactory* uiFactory = new QtUIFactory(settings_, tabs_, splitter_, systemTray, chatWindowFactory_);
+ QtUIFactory* uiFactory = new QtUIFactory(settings_, tabs_, splitter_, systemTray, chatWindowFactory_, startMinimized);
uiFactories_.push_back(uiFactory);
MainController* mainController = new MainController(
&clientMainThreadCaller_,