mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 11:03:54 -07:00
Merge pull request #702 from ctrlaltca/osx_menubar
Osx menubar improvements; fix #659
This commit is contained in:
commit
43a9ac61fb
17 changed files with 11077 additions and 8727 deletions
|
|
@ -306,8 +306,11 @@ void MainWindow::retranslateUi()
|
|||
aSettings->setText(tr("&Settings..."));
|
||||
aExit->setText(tr("&Exit"));
|
||||
|
||||
#if defined(__APPLE__) /* For OSX */
|
||||
cockatriceMenu->setTitle(tr("A&ctions"));
|
||||
#else
|
||||
cockatriceMenu->setTitle(tr("&Cockatrice"));
|
||||
|
||||
#endif
|
||||
aAbout->setText(tr("&About Cockatrice"));
|
||||
helpMenu->setTitle(tr("&Help"));
|
||||
|
||||
|
|
@ -337,6 +340,21 @@ void MainWindow::createActions()
|
|||
|
||||
aAbout = new QAction(this);
|
||||
connect(aAbout, SIGNAL(triggered()), this, SLOT(actAbout()));
|
||||
|
||||
#if defined(__APPLE__) /* For OSX */
|
||||
aSettings->setMenuRole(QAction::PreferencesRole);
|
||||
aExit->setMenuRole(QAction::QuitRole);
|
||||
aAbout->setMenuRole(QAction::AboutRole);
|
||||
|
||||
char const * foo; // avoid "warning: expression result unused" under clang
|
||||
foo = QT_TRANSLATE_NOOP("QMenuBar","Services");
|
||||
foo = QT_TRANSLATE_NOOP("QMenuBar","Hide %1");
|
||||
foo = QT_TRANSLATE_NOOP("QMenuBar","Hide Others");
|
||||
foo = QT_TRANSLATE_NOOP("QMenuBar","Show All");
|
||||
foo = QT_TRANSLATE_NOOP("QMenuBar","Preferences...");
|
||||
foo = QT_TRANSLATE_NOOP("QMenuBar","Quit %1");
|
||||
foo = QT_TRANSLATE_NOOP("QMenuBar","About %1");
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::createMenus()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue