Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/playlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,12 @@ void Playlist::createActions() {
prevAct = new MyAction(Qt::Key_P /*Qt::Key_Less*/, this, "pl_prev", false);
connect( prevAct, SIGNAL(triggered()), this, SLOT(playPrev()) );

firstAct = new MyAction(this, "pl_first", false);
connect( firstAct, SIGNAL(triggered()), this, SLOT(playFirst()) );

lastAct = new MyAction(this, "pl_last", false);
connect( lastAct, SIGNAL(triggered()), this, SLOT(playLast()) );

moveUpAct = new MyAction(this, "pl_move_up", false);
connect( moveUpAct, SIGNAL(triggered()), this, SLOT(upItem()) );

Expand Down Expand Up @@ -780,6 +786,9 @@ void Playlist::retranslateStrings() {
nextAct->change( tr("&Next") );
prevAct->change( tr("Pre&vious") );

firstAct->change( tr("&First") );
lastAct->change( tr("&Last") );

playAct->setIcon( Images::icon("play") );
pauseAct->setIcon( Images::icon("pause") );
nextAct->setIcon( Images::icon("next") );
Expand Down Expand Up @@ -1722,6 +1731,16 @@ void Playlist::playPrev() {
}
}

void Playlist::playFirst() {
qDebug("Playlist::playFirst");
playItem(0);
}

void Playlist::playLast() {
qDebug("Playlist::playLast");
playItem(proxy->rowCount()-1);
}

void Playlist::playNextAuto() {
qDebug("Playlist::playNextAuto");
if (automatically_play_next) {
Expand Down
5 changes: 5 additions & 0 deletions src/playlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ public slots:
void playNext();
void playPrev();

void playFirst();
void playLast();

void playNextAuto(); // Called from GUI when a file finished

void resumePlay();
Expand Down Expand Up @@ -358,6 +361,8 @@ protected slots:
MyAction * pauseAct;
MyAction * prevAct;
MyAction * nextAct;
MyAction * firstAct;
MyAction * lastAct;
MyAction * repeatAct;
MyAction * shuffleAct;
MyAction * showSearchAct;
Expand Down