From b8f99a1054805b2d7d662c805414c713f24001c9 Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Thu, 13 Aug 2009 14:40:15 +0200 Subject: [PATCH] volume mute keyboard shortcut --- src/MainWindow.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index d19c080..774b827 100755 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -173,24 +173,30 @@ void MainWindow::createActions() { // Invisible actions - searchFocusAct = new QAction(tr("&Search"), this); + searchFocusAct = new QAction(this); searchFocusAct->setShortcut(QKeySequence::Find); actions->insert("search", searchFocusAct); connect(searchFocusAct, SIGNAL(triggered()), this, SLOT(searchFocus())); addAction(searchFocusAct); - volumeUpAct = new QAction(tr("&Volume up"), this); + volumeUpAct = new QAction(this); volumeUpAct->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Plus)); actions->insert("volume-up", volumeUpAct); connect(volumeUpAct, SIGNAL(triggered()), this, SLOT(volumeUp())); addAction(volumeUpAct); - volumeDownAct = new QAction(tr("&Volume down"), this); + volumeDownAct = new QAction(this); volumeDownAct->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Minus)); actions->insert("volume-down", volumeDownAct); connect(volumeDownAct, SIGNAL(triggered()), this, SLOT(volumeDown())); addAction(volumeDownAct); + volumeMuteAct = new QAction(this); + volumeMuteAct->setShortcut(tr("Ctrl+M")); + actions->insert("volume-mute", volumeMuteAct); + connect(volumeMuteAct, SIGNAL(triggered()), this, SLOT(volumeMute())); + addAction(volumeMuteAct); + // common action properties foreach (QAction *action, actions->values()) { -- 2.39.5