Commit bcf559cd authored by con's avatar con
Browse files

Fixes: - Don't use multiple key shortcuts on Mac

Task:     - 244529
Details:  - It just doesn't work in Mac menus (at least not with Qt, but
I suspect it's some Mac thingy), so just don't do it.
parent 70f08bdf
......@@ -100,13 +100,17 @@ bool CodepasterPlugin::initialize(const QStringList &arguments, QString *error_m
m_postAction = new QAction(tr("Paste Snippet..."), this);
command = actionManager->registerAction(m_postAction, "CodePaster.Post", globalcontext);
#ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+P")));
#endif
connect(m_postAction, SIGNAL(triggered()), this, SLOT(post()));
cpContainer->addAction(command);
m_fetchAction = new QAction(tr("Fetch Snippet..."), this);
command = actionManager->registerAction(m_fetchAction, "CodePaster.Fetch", globalcontext);
#ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+C,Alt+F")));
#endif
connect(m_fetchAction, SIGNAL(triggered()), this, SLOT(fetch()));
cpContainer->addAction(command);
......
......@@ -277,41 +277,53 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
m_diffAction = new QAction(tr("Diff Current File"), this);
command = actionManager->registerAction(m_diffAction, "Git.Diff", globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
#ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+D")));
#endif
connect(m_diffAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
gitContainer->addAction(command);
m_statusAction = new QAction(tr("File Status"), this);
command = actionManager->registerAction(m_statusAction, "Git.Status", globalcontext);
#ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+S")));
#endif
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_statusAction, SIGNAL(triggered()), this, SLOT(statusFile()));
gitContainer->addAction(command);
m_logAction = new QAction(tr("Log File"), this);
command = actionManager->registerAction(m_logAction, "Git.Log", globalcontext);
#ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+L")));
#endif
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_logAction, SIGNAL(triggered()), this, SLOT(logFile()));
gitContainer->addAction(command);
m_blameAction = new QAction(tr("Blame"), this);
command = actionManager->registerAction(m_blameAction, "Git.Blame", globalcontext);
#ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+B")));
#endif
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_blameAction, SIGNAL(triggered()), this, SLOT(blameFile()));
gitContainer->addAction(command);
m_undoFileAction = new QAction(tr("Undo Changes"), this);
command = actionManager->registerAction(m_undoFileAction, "Git.Undo", globalcontext);
#ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+U")));
#endif
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_undoFileAction, SIGNAL(triggered()), this, SLOT(undoFileChanges()));
gitContainer->addAction(command);
m_stageAction = new QAction(tr("Stage File for Commit"), this);
command = actionManager->registerAction(m_stageAction, "Git.Stage", globalcontext);
#ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+A")));
#endif
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_stageAction, SIGNAL(triggered()), this, SLOT(stageFile()));
gitContainer->addAction(command);
......@@ -332,7 +344,9 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
m_diffProjectAction = new QAction(tr("Diff Current Project"), this);
command = actionManager->registerAction(m_diffProjectAction, "Git.DiffProject", globalcontext);
#ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence("Alt+G,Alt+Shift+D"));
#endif
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_diffProjectAction, SIGNAL(triggered()), this, SLOT(diffCurrentProject()));
gitContainer->addAction(command);
......@@ -345,7 +359,9 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
m_logProjectAction = new QAction(tr("Log Project"), this);
command = actionManager->registerAction(m_logProjectAction, "Git.LogProject", globalcontext);
#ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+K")));
#endif
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_logProjectAction, SIGNAL(triggered()), this, SLOT(logProject()));
gitContainer->addAction(command);
......@@ -380,7 +396,9 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
m_commitAction = new QAction(tr("Commit..."), this);
command = actionManager->registerAction(m_commitAction, "Git.Commit", globalcontext);
#ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+G,Alt+C")));
#endif
command->setAttribute(Core::Command::CA_UpdateText);
connect(m_commitAction, SIGNAL(triggered()), this, SLOT(startCommit()));
gitContainer->addAction(command);
......
......@@ -321,7 +321,9 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
command = ami->registerAction(m_addAction, SubversionPlugin::ADD,
globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
#ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+S,Alt+A")));
#endif
connect(m_addAction, SIGNAL(triggered()), this, SLOT(addCurrentFile()));
subversionMenu->addAction(command);
......@@ -351,7 +353,9 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
command = ami->registerAction(m_diffCurrentAction,
SubversionPlugin::DIFF_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
#ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+S,Alt+D")));
#endif
connect(m_diffCurrentAction, SIGNAL(triggered()), this, SLOT(diffCurrentFile()));
subversionMenu->addAction(command);
......@@ -367,7 +371,9 @@ bool SubversionPlugin::initialize(const QStringList &arguments, QString *errorMe
command = ami->registerAction(m_commitCurrentAction,
SubversionPlugin::COMMIT_CURRENT, globalcontext);
command->setAttribute(Core::Command::CA_UpdateText);
#ifndef Q_OS_MAC
command->setDefaultKeySequence(QKeySequence(tr("Alt+S,Alt+C")));
#endif
connect(m_commitCurrentAction, SIGNAL(triggered()), this, SLOT(startCommitCurrentFile()));
subversionMenu->addAction(command);
......
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