diff options
author | Kevin Smith <git@kismith.co.uk> | 2009-06-21 15:39:42 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2009-06-21 15:39:42 (GMT) |
commit | 706276e0fdffb0af86d8178973bbf5ae3722733d (patch) | |
tree | f7e9ec5a77ed94da4feb65c2c10aa955c74e5082 /Swift/QtUI/QtSwift.cpp | |
parent | b1cc881c57dc8498e2ccdf1552421e116a01d3dd (diff) | |
download | swift-706276e0fdffb0af86d8178973bbf5ae3722733d.zip swift-706276e0fdffb0af86d8178973bbf5ae3722733d.tar.bz2 |
Enable netbook mode with any commandline parameters
Diffstat (limited to 'Swift/QtUI/QtSwift.cpp')
-rw-r--r-- | Swift/QtUI/QtSwift.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp index 8670ddb..caa3624 100644 --- a/Swift/QtUI/QtSwift.cpp +++ b/Swift/QtUI/QtSwift.cpp @@ -19,19 +19,25 @@ namespace Swift{ -QtSwift::QtSwift() { - QSplitter* splitter = new QSplitter(); +QtSwift::QtSwift(bool netbookMode) { + if (netbookMode) { + splitter_ = new QSplitter(); + } else { + splitter_ = NULL; + } treeWidgetFactory_ = new QtTreeWidgetFactory(); - loginWindowFactory_ = new QtLoginWindowFactory(splitter); + loginWindowFactory_ = new QtLoginWindowFactory(splitter_); rosterWindowFactory_ = new QtMainWindowFactory(treeWidgetFactory_); - chatWindowFactory_ = new QtChatWindowFactory(treeWidgetFactory_, splitter); + chatWindowFactory_ = new QtChatWindowFactory(treeWidgetFactory_, splitter_); systemTray_ = new QtSystemTray(); QCoreApplication::setApplicationName("Swift"); QCoreApplication::setOrganizationName("Swift"); QCoreApplication::setOrganizationDomain("swift.im"); settings_ = new QtSettingsProvider(); application_ = new PlatformApplication("Swift"); - splitter->show(); + if (splitter_) { + splitter_->show(); + } mainController_ = new MainController(chatWindowFactory_, rosterWindowFactory_, loginWindowFactory_, treeWidgetFactory_, settings_, application_, systemTray_); } @@ -44,6 +50,7 @@ QtSwift::~QtSwift() { delete settings_; delete application_; delete systemTray_; + delete splitter_; } } |