summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-04-12 12:31:55 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-04-12 12:31:55 (GMT)
commit13254e6c8e69bf5f45b1ad50d3d3483bb46f0179 (patch)
treedd09ad17a0af94a4c8176d21c76eab2e8ba13aaf /Swift
parent6dcca70b2f9ed13817e3600d96dbc9af3b597241 (diff)
downloadswift-13254e6c8e69bf5f45b1ad50d3d3483bb46f0179.zip
swift-13254e6c8e69bf5f45b1ad50d3d3483bb46f0179.tar.bz2
Use General menu on OS X (don't duplicate Swift).
Resolves: #307
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/QtLoginWindow.cpp10
-rw-r--r--Swift/QtUI/QtLoginWindow.h1
2 files changed, 10 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_);
}
diff --git a/Swift/QtUI/QtLoginWindow.h b/Swift/QtUI/QtLoginWindow.h
index c2d06dd..654498d 100644
--- a/Swift/QtUI/QtLoginWindow.h
+++ b/Swift/QtUI/QtLoginWindow.h
@@ -71,6 +71,7 @@ namespace Swift {
QToolButton* certificateButton_;
QMenuBar* menuBar_;
QMenu* swiftMenu_;
+ QMenu* generalMenu_;
QMenu* toolsMenu_;
QAction* toggleSoundsAction_;
UIEventStream* uiEventStream_;