From 81a0b1c8b5be7affa71bccdd55ed90fa67863be7 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Wed, 6 Nov 2013 11:44:05 +0000 Subject: fixed regression git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3874 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/hotkey/hotkeymanager_x11.cpp | 5 ++++- src/plugins/General/hotkey/settingsdialog.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/plugins/General/hotkey/hotkeymanager_x11.cpp b/src/plugins/General/hotkey/hotkeymanager_x11.cpp index 1e9f8ff22..21e3bdab8 100644 --- a/src/plugins/General/hotkey/hotkeymanager_x11.cpp +++ b/src/plugins/General/hotkey/hotkeymanager_x11.cpp @@ -84,7 +84,7 @@ HotkeyManager::HotkeyManager(QObject *parent) : QObject(parent) WId rootWindow = QX11Info::appRootWindow(); QSettings settings(Qmmp::configFile(), QSettings::IniFormat); //load settings settings.beginGroup("Hotkey"); - for (int i = Hotkey::PLAY, j = 0; i <= Hotkey::JUMP_TO_TRACK; ++i, ++j) + for (int i = Hotkey::PLAY, j = 0; i <= Hotkey::VOLUME_MUTE; ++i, ++j) { quint32 key = settings.value(QString("key_%1").arg(i), Hotkey::defaultKey(i)).toUInt(); quint32 mod = settings.value(QString("modifiers_%1").arg(i), 0).toUInt(); @@ -193,6 +193,9 @@ bool HotkeyManager::eventFilter(QObject* o, QEvent* e) case Hotkey::JUMP_TO_TRACK: UiHelper::instance()->jumpToTrack(); break; + case Hotkey::VOLUME_MUTE: + SoundCore::instance()->setMuted(!SoundCore::instance()->isMuted()); + break; } qApp->processEvents(); diff --git a/src/plugins/General/hotkey/settingsdialog.cpp b/src/plugins/General/hotkey/settingsdialog.cpp index 29d351cb4..abb2c6893 100644 --- a/src/plugins/General/hotkey/settingsdialog.cpp +++ b/src/plugins/General/hotkey/settingsdialog.cpp @@ -49,7 +49,7 @@ SettingsDialog::SettingsDialog(QWidget *parent) QSettings settings(Qmmp::configFile(), QSettings::IniFormat); settings.beginGroup("Hotkey"); - for (int i = Hotkey::PLAY, j = 0; i <= Hotkey::JUMP_TO_TRACK; ++i, ++j) + for (int i = Hotkey::PLAY, j = 0; i <= Hotkey::VOLUME_MUTE; ++i, ++j) { Hotkey *hotkey = new Hotkey; hotkey->action = i; -- cgit v1.2.3-13-gbd6f