1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-23 08:20:01 +01:00

Add a shortcut to go to next album

This commit is contained in:
Robin Ekman 2021-06-03 03:36:24 +00:00 committed by John Maguire
parent 058fe6f4be
commit 0dbefa3064
3 changed files with 5 additions and 0 deletions

View File

@ -58,6 +58,8 @@ GlobalShortcuts::GlobalShortcuts(QWidget* parent)
SIGNAL(StopAfter()));
AddShortcut("next_track", tr("Next track"), SIGNAL(Next()),
QKeySequence(Qt::Key_MediaNext));
AddShortcut("next_album", tr("Next album"), SIGNAL(NextAlbum()),
QKeySequence(Qt::Key_MediaNext + Qt::SHIFT));
AddShortcut("prev_track", tr("Previous track"), SIGNAL(Previous()),
QKeySequence(Qt::Key_MediaPrevious));
AddShortcut("inc_volume", tr("Increase volume"), SIGNAL(IncVolume()));

View File

@ -66,6 +66,7 @@ class GlobalShortcuts : public QWidget {
void Stop();
void StopAfter();
void Next();
void NextAlbum();
void Previous();
void IncVolume();
void DecVolume();

View File

@ -862,6 +862,8 @@ MainWindow::MainWindow(Application* app, SystemTrayIcon* tray_icon, OSD* osd,
ui_->action_stop_after_this_track, SLOT(trigger()));
connect(global_shortcuts_, SIGNAL(Next()), ui_->action_next_track,
SLOT(trigger()));
connect(global_shortcuts_, SIGNAL(NextAlbum()), ui_->action_next_album,
SLOT(trigger()));
connect(global_shortcuts_, SIGNAL(Previous()), ui_->action_previous_track,
SLOT(trigger()));
connect(global_shortcuts_, SIGNAL(IncVolume()), app_->player(),