summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-04-17 14:29:20 (GMT)
committerTobias Markmann <tm@ayena.de>2014-04-17 14:29:20 (GMT)
commit130c36694a33959ef7da64e86c64e2d4dbc32fff (patch)
tree50bd9046523f1256baec0c04e1ea65d1c865b66f /Swift
parent1356add7e274170c9af313f49d9a448fda503f5d (diff)
downloadswift-contrib-130c36694a33959ef7da64e86c64e2d4dbc32fff.zip
swift-contrib-130c36694a33959ef7da64e86c64e2d4dbc32fff.tar.bz2
Handle menu shortcuts for "Add contact..." and "Start chat..." application wide in all Swift windows.
Change-Id: I39435ad80604790ba34acd6e6e5ca2ed85de1eb1 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/QtMainWindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp
index 879a54b..4716780 100644
--- a/Swift/QtUI/QtMainWindow.cpp
+++ b/Swift/QtUI/QtMainWindow.cpp
@@ -160,6 +160,7 @@ QtMainWindow::QtMainWindow(SettingsProvider* settings, UIEventStream* uiEventStr
openBlockingListEditor_->setVisible(false);
addUserAction_ = new QAction(tr("&Add Contact…"), this);
addUserAction_->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D));
+ addUserAction_->setShortcutContext(Qt::ApplicationShortcut);
connect(addUserAction_, SIGNAL(triggered(bool)), this, SLOT(handleAddUserActionTriggered(bool)));
actionsMenu->addAction(addUserAction_);
editUserAction_ = new QAction(tr("&Edit Selected Contact…"), this);
@@ -168,6 +169,7 @@ QtMainWindow::QtMainWindow(SettingsProvider* settings, UIEventStream* uiEventStr
editUserAction_->setEnabled(false);
chatUserAction_ = new QAction(tr("Start &Chat…"), this);
chatUserAction_->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_N));
+ chatUserAction_->setShortcutContext(Qt::ApplicationShortcut);
connect(chatUserAction_, SIGNAL(triggered(bool)), this, SLOT(handleChatUserActionTriggered(bool)));
actionsMenu->addAction(chatUserAction_);
serverAdHocMenu_ = new QMenu(tr("Run Server Command"), this);