Commit a471f542 authored by Nicolas Arnaud-Cormos's avatar Nicolas Arnaud-Cormos Committed by Tobias Hunger
Browse files

Macros: add different shortcuts for mac.



Also change the default "Execute last macro" to a one sequence shortcut.

Merge-request: 234
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
Task-number: QTCREATORBUG-3500
parent 8a9debda
...@@ -91,20 +91,28 @@ bool MacrosPlugin::initialize(const QStringList &arguments, QString *error_messa ...@@ -91,20 +91,28 @@ bool MacrosPlugin::initialize(const QStringList &arguments, QString *error_messa
QAction *startMacro = new QAction(tr("Start Macro"), this); QAction *startMacro = new QAction(tr("Start Macro"), this);
Core::Command *command = am->registerAction(startMacro, Constants::START_MACRO, textContext); Core::Command *command = am->registerAction(startMacro, Constants::START_MACRO, textContext);
#ifdef Q_WS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Ctrl+(")));
#else
command->setDefaultKeySequence(QKeySequence(tr("Alt+("))); command->setDefaultKeySequence(QKeySequence(tr("Alt+(")));
#endif
mmacrotools->addAction(command); mmacrotools->addAction(command);
connect(startMacro, SIGNAL(triggered()), m_macroManager, SLOT(startMacro())); connect(startMacro, SIGNAL(triggered()), m_macroManager, SLOT(startMacro()));
QAction *endMacro = new QAction(tr("End Macro"), this); QAction *endMacro = new QAction(tr("End Macro"), this);
endMacro->setEnabled(false); endMacro->setEnabled(false);
command = am->registerAction(endMacro, Constants::END_MACRO, globalcontext); command = am->registerAction(endMacro, Constants::END_MACRO, globalcontext);
#ifdef Q_WS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Ctrl+)")));
#else
command->setDefaultKeySequence(QKeySequence(tr("Alt+)"))); command->setDefaultKeySequence(QKeySequence(tr("Alt+)")));
#endif
mmacrotools->addAction(command); mmacrotools->addAction(command);
connect(endMacro, SIGNAL(triggered()), m_macroManager, SLOT(endMacro())); connect(endMacro, SIGNAL(triggered()), m_macroManager, SLOT(endMacro()));
QAction *executeLastMacro = new QAction(tr("Execute Last Macro"), this); QAction *executeLastMacro = new QAction(tr("Execute Last Macro"), this);
command = am->registerAction(executeLastMacro, Constants::EXECUTE_LAST_MACRO, textContext); command = am->registerAction(executeLastMacro, Constants::EXECUTE_LAST_MACRO, textContext);
command->setDefaultKeySequence(QKeySequence(tr("Alt+R,Alt+M"))); command->setDefaultKeySequence(QKeySequence(tr("Alt+Shift+R")));
mmacrotools->addAction(command); mmacrotools->addAction(command);
connect(executeLastMacro, SIGNAL(triggered()), m_macroManager, SLOT(executeLastMacro())); connect(executeLastMacro, SIGNAL(triggered()), m_macroManager, SLOT(executeLastMacro()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment