From c53955522f3c150c566f630ddf01c05e475a93bc Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 5 Apr 2017 13:17:11 -0700 Subject: [PATCH] Qt: Make "Mute" able to be bound to a key (fixes #559) --- CHANGES | 1 + src/platform/qt/Window.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 95fc56ce6..8613b2b86 100644 --- a/CHANGES +++ b/CHANGES @@ -23,6 +23,7 @@ Misc: - Feature: Support ImageMagick 7 - FFmpeg: Return false if a file fails to open - FFmpeg: Force MP4 files to YUV420P + - Qt: Make "Mute" able to be bound to a key 0.5.2: (2016-12-31) Bugfixes: diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index e0cdcb02f..6500c76b7 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -1256,11 +1256,12 @@ void Window::setupMenu(QMenuBar* menubar) { avMenu->addSeparator(); ConfigOption* mute = m_config->addOption("mute"); - mute->addBoolean(tr("Mute"), avMenu); + QAction* muteAction = mute->addBoolean(tr("Mute"), avMenu); mute->connect([this](const QVariant& value) { reloadConfig(); }, this); m_config->updateOption("mute"); + addControlledAction(avMenu, muteAction, "mute"); QMenu* target = avMenu->addMenu(tr("FPS target")); ConfigOption* fpsTargetOption = m_config->addOption("fpsTarget");