Commit 71260c31 authored by Eike Ziller's avatar Eike Ziller
Browse files

Mac: Avoid more Opt+<char> shortcuts.



Change-Id: I1f2ae70ed8b184be6d1467642924289af1b535a9
Reviewed-by: default avatarBradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent 6c3a9678
......@@ -39,6 +39,7 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h>
#include <texteditor/basetexteditor.h>
......@@ -784,7 +785,7 @@ Id BookmarkViewFactory::id() const
QKeySequence BookmarkViewFactory::activationSequence() const
{
return QKeySequence(Qt::ALT + Qt::Key_M);
return QKeySequence(Core::UseMacShortcuts ? tr("Alt+Meta+M") : tr("Alt+M"));
}
Core::NavigationView BookmarkViewFactory::createWidget()
......
......@@ -41,6 +41,7 @@
#include <coreplugin/documentmanager.h>
#include <coreplugin/id.h>
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <utils/qtcassert.h>
#include <QTimer>
......@@ -240,7 +241,7 @@ Core::Id OpenEditorsViewFactory::id() const
QKeySequence OpenEditorsViewFactory::activationSequence() const
{
return QKeySequence(Qt::ALT + Qt::Key_O);
return QKeySequence(Core::UseMacShortcuts ? tr("Meta+O") : tr("Alt+O"));
}
OpenEditorsViewFactory::OpenEditorsViewFactory()
......
......@@ -970,7 +970,7 @@ bool FakeVimPluginPrivate::initialize()
Core::Command *cmd = 0;
cmd = actionManager->registerAction(theFakeVimSetting(ConfigUseFakeVim),
Constants::INSTALL_HANDLER, globalcontext, true);
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+V,Alt+V")));
cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+V,Meta+V") : tr("Alt+V,Alt+V")));
ActionContainer *advancedMenu =
actionManager->actionContainer(Core::Constants::M_EDIT_ADVANCED);
......@@ -982,7 +982,7 @@ bool FakeVimPluginPrivate::initialize()
act->setData(i);
QString id = QString("FakeVim.UserAction%1").arg(i);
cmd = actionManager->registerAction(act, Core::Id(id), globalcontext);
cmd->setDefaultKeySequence(QKeySequence(tr("Alt+V,%1").arg(i)));
cmd->setDefaultKeySequence(QKeySequence((Core::UseMacShortcuts ? tr("Meta+V,%1") : tr("Alt+V,%1")).arg(i)));
connect(act, SIGNAL(triggered()), SLOT(userActionTriggered()));
}
......
......@@ -101,7 +101,7 @@ bool MacrosPlugin::initialize(const QStringList &arguments, QString *errorMessag
QAction *executeLastMacro = new QAction(tr("Play Last Macro"), this);
command = am->registerAction(executeLastMacro, Constants::EXECUTE_LAST_MACRO, textContext);
command->setDefaultKeySequence(QKeySequence(tr("Alt+R")));
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+R") : tr("Alt+R")));
mmacrotools->addAction(command);
connect(executeLastMacro, SIGNAL(triggered()), m_macroManager, SLOT(executeLastMacro()));
......
......@@ -36,6 +36,7 @@
#include <extensionsystem/pluginmanager.h>
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/icore.h>
#include <coreplugin/fileiconprovider.h>
#include <coreplugin/documentmanager.h>
......@@ -408,7 +409,7 @@ Core::Id FolderNavigationWidgetFactory::id() const
QKeySequence FolderNavigationWidgetFactory::activationSequence() const
{
return QKeySequence(Qt::ALT + Qt::Key_Y);
return QKeySequence(Core::UseMacShortcuts ? tr("Meta+Y") : tr("Alt+Y"));
}
Core::NavigationView FolderNavigationWidgetFactory::createWidget()
......
......@@ -39,6 +39,7 @@
#include "projectexplorerconstants.h"
#include "projectmodels.h"
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
#include <coreplugin/editormanager/editormanager.h>
......@@ -412,7 +413,7 @@ Core::Id ProjectTreeWidgetFactory::id() const
QKeySequence ProjectTreeWidgetFactory::activationSequence() const
{
return QKeySequence(Qt::ALT + Qt::Key_X);
return QKeySequence(Core::UseMacShortcuts ? tr("Meta+X") : tr("Alt+X"));
}
Core::NavigationView ProjectTreeWidgetFactory::createWidget()
......
......@@ -358,13 +358,13 @@ void TextEditorActionHandler::createActions()
m_upperCaseSelectionAction = new QAction(tr("Uppercase Selection"), this);
m_modifyingActions << m_upperCaseSelectionAction;
command = am->registerAction(m_upperCaseSelectionAction, Constants::UPPERCASE_SELECTION, m_contextId, true);
command->setDefaultKeySequence(QKeySequence(tr("Alt+Shift+U")));
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+Shift+U") : tr("Alt+Shift+U")));
connect(m_upperCaseSelectionAction, SIGNAL(triggered()), this, SLOT(uppercaseSelection()));
m_lowerCaseSelectionAction = new QAction(tr("Lowercase Selection"), this);
m_modifyingActions << m_lowerCaseSelectionAction;
command = am->registerAction(m_lowerCaseSelectionAction, Constants::LOWERCASE_SELECTION, m_contextId, true);
command->setDefaultKeySequence(QKeySequence(tr("Alt+U")));
command->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+U") : tr("Alt+U")));
connect(m_lowerCaseSelectionAction, SIGNAL(triggered()), this, SLOT(lowercaseSelection()));
m_circularPasteAction = new QAction(tr("Paste from Clipboard History"), this);
......
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