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
2 changes: 2 additions & 0 deletions src/basegui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2527,6 +2527,8 @@ void BaseGui::createPlaylist() {
connect(playlist, SIGNAL(requestToPlayStream(const QString &, QStringList)),
core, SLOT(openStream(const QString &, QStringList)));

connect(playlist, SIGNAL(requestToPause()), core, SLOT(pause()));

connect(playlist, SIGNAL(requestToAddCurrentFile()), this, SLOT(addToPlaylistCurrentFile()));

connect( core, SIGNAL(mediaFinished()), playlist, SLOT(playNextAuto()), Qt::QueuedConnection );
Expand Down
11 changes: 11 additions & 0 deletions src/playlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,9 @@ void Playlist::createActions() {
playAct = new MyAction(this, "pl_play", false);
connect( playAct, SIGNAL(triggered()), this, SLOT(playCurrent()) );

pauseAct = new MyAction(this, "pl_pause", false);
connect( pauseAct, SIGNAL(triggered()), this, SLOT(pause()) );

nextAct = new MyAction(Qt::Key_N /*Qt::Key_Greater*/, this, "pl_next", false);
connect( nextAct, SIGNAL(triggered()), this, SLOT(playNext()) );

Expand Down Expand Up @@ -671,6 +674,7 @@ void Playlist::createToolbar() {

toolbar->addSeparator();
toolbar->addAction(playAct);
toolbar->addAction(pauseAct);
toolbar->addAction(prevAct);
toolbar->addAction(nextAct);
#ifdef PLAYLIST_DOUBLE_TOOLBAR
Expand Down Expand Up @@ -740,11 +744,13 @@ void Playlist::retranslateStrings() {
saveAsAct->change( Images::icon("save"), tr("Save &as...") );

playAct->change( tr("&Play") );
pauseAct->change( tr("&Pause") );

nextAct->change( tr("&Next") );
prevAct->change( tr("Pre&vious") );

playAct->setIcon( Images::icon("play") );
pauseAct->setIcon( Images::icon("pause") );
nextAct->setIcon( Images::icon("next") );
prevAct->setIcon( Images::icon("previous") );

Expand Down Expand Up @@ -1507,6 +1513,11 @@ void Playlist::playCurrent() {
}
}

void Playlist::pause() {
qDebug("Playlist::pause");
emit requestToPause();
}

void Playlist::itemActivated(const QModelIndex & index ) {
qDebug() << "Playlist::itemActivated: row:" << index.row();
playItem(index.row());
Expand Down
3 changes: 3 additions & 0 deletions src/playlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ public slots:
signals:
void requestToPlayFile(const QString & filename, int seek = -1);
void requestToPlayStream(const QString & filename, QStringList params = QStringList());
void requestToPause();

void requestToAddCurrentFile();
void playlistEnded();
Expand All @@ -265,6 +266,7 @@ public slots:

protected slots:
void playCurrent();
void pause();
void itemActivated(const QModelIndex & index );
void headerClicked(int index);
void showPopup(const QPoint & pos);
Expand Down Expand Up @@ -351,6 +353,7 @@ protected slots:
MyAction * saveAct;
MyAction * saveAsAct;
MyAction * playAct;
MyAction * pauseAct;
MyAction * prevAct;
MyAction * nextAct;
MyAction * repeatAct;
Expand Down
1 change: 1 addition & 0 deletions src/shortcuts/default.keys
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ pl_open_url
pl_save
pl_save_as
pl_play
pl_pause
pl_next N
pl_prev P
pl_move_up
Expand Down
1 change: 1 addition & 0 deletions src/shortcuts/euskara.keys
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ restore/hide
pl_open
pl_save
pl_play
pl_pause
pl_next
pl_prev
pl_move_up
Expand Down
1 change: 1 addition & 0 deletions src/shortcuts/vlc.keys
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ restore/hide
pl_open
pl_save
pl_play
pl_pause
pl_next
pl_prev
pl_move_up
Expand Down