forked from qt-creator/qt-creator
Mac: Avoid Alt+<character> shortcuts
Because these tend to add special characters into the editor instead of triggering the shortcut. Use Ctrl (aka Qt's Meta) instead. Change-Id: I5866772baf4550e6d048e4d7252b2899a6d28296 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -233,7 +233,11 @@ void MercurialPlugin::createFileActions(const Core::Context &context)
|
||||
diffFile = new ParameterAction(tr("Diff Current File"), tr("Diff \"%1\""), ParameterAction::EnabledWithParameter, this);
|
||||
command = actionManager->registerAction(diffFile, Core::Id(Constants::DIFF), context);
|
||||
command->setAttribute(Core::Command::CA_UpdateText);
|
||||
#ifdef Q_OS_MAC
|
||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+H,Meta+D")));
|
||||
#else
|
||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+H,Alt+D")));
|
||||
#endif
|
||||
connect(diffFile, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
|
||||
mercurialContainer->addAction(command);
|
||||
m_commandLocator->appendCommand(command);
|
||||
@@ -241,7 +245,11 @@ void MercurialPlugin::createFileActions(const Core::Context &context)
|
||||
logFile = new ParameterAction(tr("Log Current File"), tr("Log \"%1\""), ParameterAction::EnabledWithParameter, this);
|
||||
command = actionManager->registerAction(logFile, Core::Id(Constants::LOG), context);
|
||||
command->setAttribute(Core::Command::CA_UpdateText);
|
||||
#ifdef Q_OS_MAC
|
||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+H,Meta+L")));
|
||||
#else
|
||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+H,Alt+L")));
|
||||
#endif
|
||||
connect(logFile, SIGNAL(triggered()), this, SLOT(logCurrentFile()));
|
||||
mercurialContainer->addAction(command);
|
||||
m_commandLocator->appendCommand(command);
|
||||
@@ -249,7 +257,11 @@ void MercurialPlugin::createFileActions(const Core::Context &context)
|
||||
statusFile = new ParameterAction(tr("Status Current File"), tr("Status \"%1\""), ParameterAction::EnabledWithParameter, this);
|
||||
command = actionManager->registerAction(statusFile, Core::Id(Constants::STATUS), context);
|
||||
command->setAttribute(Core::Command::CA_UpdateText);
|
||||
#ifdef Q_OS_MAC
|
||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+H,Meta+S")));
|
||||
#else
|
||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+H,Alt+S")));
|
||||
#endif
|
||||
connect(statusFile, SIGNAL(triggered()), this, SLOT(statusCurrentFile()));
|
||||
mercurialContainer->addAction(command);
|
||||
m_commandLocator->appendCommand(command);
|
||||
@@ -439,7 +451,11 @@ void MercurialPlugin::createRepositoryActions(const Core::Context &context)
|
||||
action = new QAction(tr("Commit..."), this);
|
||||
m_repositoryActionList.append(action);
|
||||
command = actionManager->registerAction(action, Core::Id(Constants::COMMIT), context);
|
||||
#ifdef Q_OS_MAC
|
||||
command->setDefaultKeySequence(QKeySequence(tr("Meta+H,Meta+C")));
|
||||
#else
|
||||
command->setDefaultKeySequence(QKeySequence(tr("Alt+H,Alt+C")));
|
||||
#endif
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(commit()));
|
||||
mercurialContainer->addAction(command);
|
||||
m_commandLocator->appendCommand(command);
|
||||
|
||||
Reference in New Issue
Block a user