diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-04-12 12:31:55 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-04-12 12:31:55 (GMT) |
commit | 13254e6c8e69bf5f45b1ad50d3d3483bb46f0179 (patch) | |
tree | dd09ad17a0af94a4c8176d21c76eab2e8ba13aaf /Swift/QtUI/QtLoginWindow.cpp | |
parent | 6dcca70b2f9ed13817e3600d96dbc9af3b597241 (diff) | |
download | swift-contrib-13254e6c8e69bf5f45b1ad50d3d3483bb46f0179.zip swift-contrib-13254e6c8e69bf5f45b1ad50d3d3483bb46f0179.tar.bz2 |
Use General menu on OS X (don't duplicate Swift).
Resolves: #307
Diffstat (limited to 'Swift/QtUI/QtLoginWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtLoginWindow.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp index 4ae2f6a..8ad20e7 100644 --- a/Swift/QtUI/QtLoginWindow.cpp +++ b/Swift/QtUI/QtLoginWindow.cpp @@ -117,6 +117,11 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream) : QMainWindow() { QApplication::setQuitOnLastWindowClosed(false); swiftMenu_ = new QMenu(tr("Swift"), this); +#ifdef SWIFTEN_PLATFORM_MACOSX + generalMenu_ = new QMenu(tr("General"), this); +#else + generalMenu_ = swiftMenu_; +#endif QAction* aboutAction = new QAction("About Swift", this); connect(aboutAction, SIGNAL(activated()), SLOT(handleAbout())); @@ -132,7 +137,7 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream) : QMainWindow() { toggleSoundsAction_->setCheckable(true); toggleSoundsAction_->setChecked(true); connect(toggleSoundsAction_, SIGNAL(toggled(bool)), SLOT(handleToggleSounds(bool))); - swiftMenu_->addAction(toggleSoundsAction_); + generalMenu_->addAction(toggleSoundsAction_); QAction* quitAction = new QAction("Quit", this); @@ -279,6 +284,9 @@ void QtLoginWindow::handleQuit() { void QtLoginWindow::setInitialMenus() { menuBar_->clear(); menuBar_->addMenu(swiftMenu_); +#ifdef SWIFTEN_PLATFORM_MACOSX + menuBar_->addMenu(generalMenu_); +#endif menuBar_->addMenu(toolsMenu_); } |