mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Fixed: #1193 Updated mac menu stuff.
This commit is contained in:
parent
8680766a2e
commit
589fd30e8a
1 changed files with 5 additions and 11 deletions
|
@ -266,9 +266,6 @@ void MainWindow::createActions()
|
||||||
|
|
||||||
m_saveAllAction = new QAction(tr("&Save A&ll"), this);
|
m_saveAllAction = new QAction(tr("&Save A&ll"), this);
|
||||||
m_saveAllAction->setShortcut(QKeySequence::SelectAll);
|
m_saveAllAction->setShortcut(QKeySequence::SelectAll);
|
||||||
#ifdef Q_WS_MAC
|
|
||||||
m_saveAllAction->setShortcut(QKeySequence(tr("Ctrl+Shift+S")));
|
|
||||||
#endif
|
|
||||||
menuManager()->registerAction(m_saveAllAction, Constants::SAVE_ALL);
|
menuManager()->registerAction(m_saveAllAction, Constants::SAVE_ALL);
|
||||||
connect(m_saveAllAction, SIGNAL(triggered()), this, SLOT(saveAll()));
|
connect(m_saveAllAction, SIGNAL(triggered()), this, SLOT(saveAll()));
|
||||||
m_saveAllAction->setEnabled(false);
|
m_saveAllAction->setEnabled(false);
|
||||||
|
@ -321,21 +318,17 @@ void MainWindow::createActions()
|
||||||
connect(m_gotoAction, SIGNAL(triggered()), this, SLOT(gotoPos()));
|
connect(m_gotoAction, SIGNAL(triggered()), this, SLOT(gotoPos()));
|
||||||
m_gotoAction->setEnabled(false);
|
m_gotoAction->setEnabled(false);
|
||||||
|
|
||||||
#ifndef Q_WS_MAC
|
//#ifndef Q_WS_MAC
|
||||||
m_fullscreenAction = new QAction(tr("Fullscreen"), this);
|
m_fullscreenAction = new QAction(tr("Fullscreen"), this);
|
||||||
m_fullscreenAction->setCheckable(true);
|
m_fullscreenAction->setCheckable(true);
|
||||||
m_fullscreenAction->setShortcut(QKeySequence(tr("Ctrl+Shift+F11")));
|
m_fullscreenAction->setShortcut(QKeySequence(tr("Ctrl+Shift+F11")));
|
||||||
menuManager()->registerAction(m_fullscreenAction, Constants::SETTINGS);
|
menuManager()->registerAction(m_fullscreenAction, Constants::SETTINGS);
|
||||||
connect(m_fullscreenAction, SIGNAL(triggered(bool)), this, SLOT(setFullScreen(bool)));
|
connect(m_fullscreenAction, SIGNAL(triggered(bool)), this, SLOT(setFullScreen(bool)));
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
m_settingsAction = new QAction(tr("&Settings"), this);
|
m_settingsAction = new QAction(tr("&Settings"), this);
|
||||||
m_settingsAction->setIcon(QIcon(":/images/preferences.png"));
|
m_settingsAction->setIcon(QIcon(":/images/preferences.png"));
|
||||||
m_settingsAction->setShortcut(QKeySequence::Preferences);
|
m_settingsAction->setShortcut(QKeySequence::Preferences);
|
||||||
#ifdef Q_WS_MAC
|
|
||||||
m_settingsAction->setShortcut(QKeySequence("Ctrl+,"));
|
|
||||||
m_settingsAction->setMenuRole(QAction::PreferencesRole);
|
|
||||||
#endif
|
|
||||||
m_settingsAction->setStatusTip(tr("Open the settings dialog"));
|
m_settingsAction->setStatusTip(tr("Open the settings dialog"));
|
||||||
menuManager()->registerAction(m_settingsAction, Constants::SETTINGS);
|
menuManager()->registerAction(m_settingsAction, Constants::SETTINGS);
|
||||||
connect(m_settingsAction, SIGNAL(triggered()), this, SLOT(showOptionsDialog()));
|
connect(m_settingsAction, SIGNAL(triggered()), this, SLOT(showOptionsDialog()));
|
||||||
|
@ -359,6 +352,7 @@ void MainWindow::createActions()
|
||||||
m_exitAction->setMenuRole(QAction::QuitRole);
|
m_exitAction->setMenuRole(QAction::QuitRole);
|
||||||
m_aboutAction->setMenuRole(QAction::AboutRole);
|
m_aboutAction->setMenuRole(QAction::AboutRole);
|
||||||
m_aboutQtAction->setMenuRole(QAction::AboutQtRole);
|
m_aboutQtAction->setMenuRole(QAction::AboutQtRole);
|
||||||
|
m_settingsAction->setMenuRole(QAction::PreferencesRole);
|
||||||
m_pluginViewAction->setMenuRole(QAction::ApplicationSpecificRole);
|
m_pluginViewAction->setMenuRole(QAction::ApplicationSpecificRole);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -398,9 +392,9 @@ void MainWindow::createMenus()
|
||||||
menuManager()->registerMenu(m_editMenu, Constants::M_EDIT);
|
menuManager()->registerMenu(m_editMenu, Constants::M_EDIT);
|
||||||
|
|
||||||
m_viewMenu = menuBar()->addMenu(tr("&View"));
|
m_viewMenu = menuBar()->addMenu(tr("&View"));
|
||||||
#ifndef Q_WS_MAC
|
//#ifndef Q_WS_MAC
|
||||||
m_viewMenu->addAction(m_fullscreenAction);
|
m_viewMenu->addAction(m_fullscreenAction);
|
||||||
#endif
|
//#endif
|
||||||
menuManager()->registerMenu(m_viewMenu, Constants::M_VIEW);
|
menuManager()->registerMenu(m_viewMenu, Constants::M_VIEW);
|
||||||
|
|
||||||
m_toolsMenu = menuBar()->addMenu(tr("&Tools"));
|
m_toolsMenu = menuBar()->addMenu(tr("&Tools"));
|
||||||
|
|
Loading…
Reference in a new issue