aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp4
-rw-r--r--src/plugins/General/hotkey/hotkeymanager_win.cpp6
-rw-r--r--src/plugins/General/hotkey/hotkeymanager_x11.cpp4
-rw-r--r--src/plugins/Ui/qsui/mainwindow.cpp8
-rw-r--r--src/plugins/Ui/skinned/mainwindow.cpp8
5 files changed, 11 insertions, 19 deletions
diff --git a/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp b/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp
index eac1fb148..b94b342fd 100644
--- a/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp
+++ b/src/plugins/CommandLineOptions/IncDecVolumeOption/incdecvolumeoption.cpp
@@ -51,9 +51,9 @@ QString IncDecVolumeCommandLineOption::executeCommand(const QString& opt_str, co
Q_UNUSED(args);
if (opt_str == "--volume-inc")
- SoundCore::instance()->changeVolume(5);
+ SoundCore::instance()->volumeUp();
else if (opt_str == "--volume-dec")
- SoundCore::instance()->changeVolume(-5);
+ SoundCore::instance()->volumeDown();
return QString();
}
diff --git a/src/plugins/General/hotkey/hotkeymanager_win.cpp b/src/plugins/General/hotkey/hotkeymanager_win.cpp
index bf2b2165e..bd917d578 100644
--- a/src/plugins/General/hotkey/hotkeymanager_win.cpp
+++ b/src/plugins/General/hotkey/hotkeymanager_win.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2013-2014 by Ilya Kotov *
+ * Copyright (C) 2013-2016 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -168,10 +168,10 @@ public:
UiHelper::instance()->toggleVisibility();
break;
case Hotkey::VOLUME_UP:
- core->changeVolume(+5);
+ core->volumeUp();
break;
case Hotkey::VOLUME_DOWN:
- core->changeVolume(-5);
+ core->volumeDown();
break;
case Hotkey::FORWARD:
core->seek(core->elapsed() + 5000);
diff --git a/src/plugins/General/hotkey/hotkeymanager_x11.cpp b/src/plugins/General/hotkey/hotkeymanager_x11.cpp
index 7a3abacf6..47b9d2a11 100644
--- a/src/plugins/General/hotkey/hotkeymanager_x11.cpp
+++ b/src/plugins/General/hotkey/hotkeymanager_x11.cpp
@@ -179,10 +179,10 @@ bool HotkeyManager::eventFilter(QObject* o, QEvent* e)
UiHelper::instance()->toggleVisibility();
break;
case Hotkey::VOLUME_UP:
- core->changeVolume(+5);
+ core->volumeUp();
break;
case Hotkey::VOLUME_DOWN:
- core->changeVolume(-5);
+ core->volumeDown();
break;
case Hotkey::FORWARD:
core->seek(core->elapsed() + 5000);
diff --git a/src/plugins/Ui/qsui/mainwindow.cpp b/src/plugins/Ui/qsui/mainwindow.cpp
index 48097729e..a8784604a 100644
--- a/src/plugins/Ui/qsui/mainwindow.cpp
+++ b/src/plugins/Ui/qsui/mainwindow.cpp
@@ -630,12 +630,8 @@ void MainWindow::createActions()
m_ui.menuPlayback->addAction(SET_ACTION(ActionManager::STOP_AFTER_SELECTED, m_pl_manager,
SLOT(stopAfterSelected())));
m_ui.menuPlayback->addSeparator();
- signalMapper = new QSignalMapper(this);
- signalMapper->setMapping(ACTION(ActionManager::VOL_ENC), 5);
- signalMapper->setMapping(ACTION(ActionManager::VOL_DEC), -5);
- connect(signalMapper, SIGNAL(mapped(int)), m_core, SLOT(changeVolume(int)));
- m_ui.menuPlayback->addAction(SET_ACTION(ActionManager::VOL_ENC, signalMapper, SLOT(map())));
- m_ui.menuPlayback->addAction(SET_ACTION(ActionManager::VOL_DEC, signalMapper, SLOT(map())));
+ m_ui.menuPlayback->addAction(SET_ACTION(ActionManager::VOL_ENC, m_core, SLOT(volumeUp())));
+ m_ui.menuPlayback->addAction(SET_ACTION(ActionManager::VOL_DEC, m_core, SLOT(volumeDown())));
m_ui.menuPlayback->addAction(SET_ACTION(ActionManager::VOL_MUTE, m_core, SLOT(setMuted(bool))));
connect(m_core, SIGNAL(mutedChanged(bool)), ACTION(ActionManager::VOL_MUTE), SLOT(setChecked(bool)));
diff --git a/src/plugins/Ui/skinned/mainwindow.cpp b/src/plugins/Ui/skinned/mainwindow.cpp
index fca65bea4..f1e621d2d 100644
--- a/src/plugins/Ui/skinned/mainwindow.cpp
+++ b/src/plugins/Ui/skinned/mainwindow.cpp
@@ -432,12 +432,8 @@ void MainWindow::createActions()
ACTION(ActionManager::SHUFFLE), SLOT(setChecked(bool)));
QMenu *audioMenu = m_mainMenu->addMenu(tr("Audio"));
- QSignalMapper *mapper = new QSignalMapper(this);
- mapper->setMapping(ACTION(ActionManager::VOL_ENC), 5);
- mapper->setMapping(ACTION(ActionManager::VOL_DEC), -5);
- connect(mapper, SIGNAL(mapped(int)), m_core, SLOT(changeVolume(int)));
- audioMenu->addAction(SET_ACTION(ActionManager::VOL_ENC, mapper, SLOT(map())));
- audioMenu->addAction(SET_ACTION(ActionManager::VOL_DEC, mapper, SLOT(map())));
+ audioMenu->addAction(SET_ACTION(ActionManager::VOL_ENC, m_core, SLOT(volumeUp())));
+ audioMenu->addAction(SET_ACTION(ActionManager::VOL_DEC, m_core, SLOT(volumeDown())));
audioMenu->addAction(SET_ACTION(ActionManager::VOL_MUTE, m_core, SLOT(setMuted(bool))));
connect(m_core, SIGNAL(mutedChanged(bool)), ACTION(ActionManager::VOL_MUTE), SLOT(setChecked(bool)));