diff --git a/data/data.qrc b/data/data.qrc
index 46fbac7e6..1475567c3 100644
--- a/data/data.qrc
+++ b/data/data.qrc
@@ -246,5 +246,8 @@
icons/48x48/drive-removable-media-usb-pendrive.png
schema-15.sql
device-schema.sql
+ icons/22x22/go-down.png
+ icons/32x32/go-down.png
+ icons/48x48/go-down.png
diff --git a/data/icons/22x22/go-down.png b/data/icons/22x22/go-down.png
new file mode 100644
index 000000000..63331a575
Binary files /dev/null and b/data/icons/22x22/go-down.png differ
diff --git a/data/icons/32x32/go-down.png b/data/icons/32x32/go-down.png
new file mode 100644
index 000000000..b834f25a5
Binary files /dev/null and b/data/icons/32x32/go-down.png differ
diff --git a/data/icons/48x48/go-down.png b/data/icons/48x48/go-down.png
new file mode 100644
index 000000000..780714b8f
Binary files /dev/null and b/data/icons/48x48/go-down.png differ
diff --git a/src/playlist/playlist.cpp b/src/playlist/playlist.cpp
index 2a4aeba6f..f812a3746 100644
--- a/src/playlist/playlist.cpp
+++ b/src/playlist/playlist.cpp
@@ -74,6 +74,10 @@ Playlist::Playlist(PlaylistBackend* backend, TaskManager* task_manager,
proxy_->setSourceModel(this);
queue_->setSourceModel(this);
+
+ connect(queue_, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
+ SLOT(TracksAboutToBeDequeued(QModelIndex,int,int)));
+ connect(queue_, SIGNAL(rowsRemoved(QModelIndex,int,int)), SLOT(TracksDequeued()));
}
Playlist::~Playlist() {
@@ -1065,3 +1069,18 @@ quint64 Playlist::GetTotalLength() const {
PlaylistItemList Playlist::library_items_by_id(int id) const {
return library_items_by_id_.values(id);
}
+
+void Playlist::TracksAboutToBeDequeued(const QModelIndex&, int begin, int end) {
+ qDebug() << begin << end;
+ for (int i=begin ; i<=end ; ++i) {
+ temp_queue_change_indexes_ << queue_->mapToSource(queue_->index(i, Column_Title));
+ }
+}
+
+void Playlist::TracksDequeued() {
+ foreach (const QModelIndex& index, temp_queue_change_indexes_) {
+ qDebug() << "Changed" << index.row() << index.data(Role_QueuePosition);
+ emit dataChanged(index, index);
+ }
+ temp_queue_change_indexes_.clear();
+}
diff --git a/src/playlist/playlist.h b/src/playlist/playlist.h
index 322c57d95..e1df20b93 100644
--- a/src/playlist/playlist.h
+++ b/src/playlist/playlist.h
@@ -197,10 +197,16 @@ class Playlist : public QAbstractListModel {
void MoveItemsWithoutUndo(const QList& source_rows, int pos);
void MoveItemsWithoutUndo(int start, const QList& dest_rows);
+ private slots:
+ void TracksAboutToBeDequeued(const QModelIndex&, int begin, int end);
+ void TracksDequeued();
+
private:
PlaylistFilter* proxy_;
Queue* queue_;
+ QList temp_queue_change_indexes_;
+
PlaylistBackend* backend_;
TaskManager* task_manager_;
int id_;
diff --git a/src/playlist/queue.cpp b/src/playlist/queue.cpp
index 2714385e7..942de11dd 100644
--- a/src/playlist/queue.cpp
+++ b/src/playlist/queue.cpp
@@ -101,13 +101,13 @@ int Queue::columnCount(const QModelIndex &parent) const {
}
QVariant Queue::data(const QModelIndex& proxy_index, int role) const {
+ QModelIndex source_index = source_indexes_[proxy_index.row()];
+
switch (role) {
case Playlist::Role_QueuePosition:
return proxy_index.row();
- case Qt::DisplayRole: {
- QModelIndex source_index = source_indexes_[proxy_index.row()];
-
+ case Qt::DisplayRole:
if (proxy_index.column() == Column_CombinedArtistTitle) {
const QString artist = source_index.sibling(source_index.row(), Playlist::Column_Artist).data().toString();
const QString title = source_index.sibling(source_index.row(), Playlist::Column_Title).data().toString();
@@ -116,12 +116,10 @@ QVariant Queue::data(const QModelIndex& proxy_index, int role) const {
return title;
return artist + " - " + title;
}
- }
+ // fallthrough
- default: {
- QModelIndex source_index = source_indexes_[proxy_index.row()];
+ default:
return source_index.data(role);
- }
}
}
@@ -147,3 +145,16 @@ void Queue::ToggleTracks(const QModelIndexList &source_indexes) {
int Queue::PositionOf(const QModelIndex& source_index) const {
return mapFromSource(source_index).row();
}
+
+bool Queue::is_empty() const {
+ return source_indexes_.isEmpty();
+}
+
+void Queue::Clear() {
+ if (source_indexes_.isEmpty())
+ return;
+
+ beginRemoveRows(QModelIndex(), 0, source_indexes_.count()-1);
+ source_indexes_.clear();
+ endRemoveRows();
+}
diff --git a/src/playlist/queue.h b/src/playlist/queue.h
index 1444dc5c4..3d8f2e8fb 100644
--- a/src/playlist/queue.h
+++ b/src/playlist/queue.h
@@ -33,11 +33,14 @@ public:
ColumnCount
};
+ // Query the queue
bool is_empty() const;
int PositionOf(const QModelIndex& source_index) const;
+ // Modify the queue
QModelIndex TakeNext();
void ToggleTracks(const QModelIndexList& source_indexes);
+ void Clear();
// QAbstractProxyModel
void setSourceModel(QAbstractItemModel* source_model);
@@ -47,8 +50,8 @@ public:
// QAbstractItemModel
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
QModelIndex parent(const QModelIndex &child) const;
- int rowCount(const QModelIndex &parent) const;
- int columnCount(const QModelIndex &parent) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex& proxy_index, int role) const;
private slots:
diff --git a/src/playlist/queuemanager.cpp b/src/playlist/queuemanager.cpp
index 4bf68fccb..6d4ce87a8 100644
--- a/src/playlist/queuemanager.cpp
+++ b/src/playlist/queuemanager.cpp
@@ -20,6 +20,7 @@
#include "queue.h"
#include "queuemanager.h"
#include "ui_queuemanager.h"
+#include "ui/iconloader.h"
QueueManager::QueueManager(QWidget *parent)
: QDialog(parent),
@@ -28,8 +29,17 @@ QueueManager::QueueManager(QWidget *parent)
current_playlist_(NULL)
{
ui_->setupUi(this);
-
ui_->list->setItemDelegate(new QueuedItemDelegate(this));
+
+ // Set icons on buttons
+ ui_->move_down->setIcon(IconLoader::Load("go-down"));
+ ui_->move_up->setIcon(IconLoader::Load("go-up"));
+ ui_->clear->setIcon(IconLoader::Load("edit-clear-list"));
+
+ // Button connections
+ connect(ui_->move_down, SIGNAL(clicked()), SLOT(MoveDown()));
+ connect(ui_->move_up, SIGNAL(clicked()), SLOT(MoveUp()));
+ connect(ui_->clear, SIGNAL(clicked()), SLOT(Clear()));
}
QueueManager::~QueueManager() {
@@ -43,7 +53,49 @@ void QueueManager::SetPlaylistManager(PlaylistManager* manager) {
}
void QueueManager::CurrentPlaylistChanged(Playlist* playlist) {
+ if (current_playlist_) {
+ disconnect(current_playlist_->queue(), SIGNAL(rowsInserted(QModelIndex,int,int)),
+ this, SLOT(UpdateButtonState()));
+ disconnect(current_playlist_->queue(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
+ this, SLOT(UpdateButtonState()));
+ }
+
current_playlist_ = playlist;
+
+ connect(current_playlist_->queue(), SIGNAL(rowsInserted(QModelIndex,int,int)),
+ this, SLOT(UpdateButtonState()));
+ connect(current_playlist_->queue(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
+ this, SLOT(UpdateButtonState()));
+
ui_->list->setModel(current_playlist_->queue());
ui_->list->setModelColumn(Queue::Column_CombinedArtistTitle);
+
+ connect(ui_->list->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
+ SLOT(UpdateButtonState()));
+}
+
+void QueueManager::MoveUp() {
+
+}
+
+void QueueManager::MoveDown() {
+
+}
+
+void QueueManager::Clear() {
+ current_playlist_->queue()->Clear();
+}
+
+void QueueManager::UpdateButtonState() {
+ const QModelIndex current = ui_->list->selectionModel()->currentIndex();
+
+ if (current.isValid()) {
+ ui_->move_up->setEnabled(current.row() != 0);
+ ui_->move_down->setEnabled(current.row() != current_playlist_->queue()->rowCount()-1);
+ } else {
+ ui_->move_up->setEnabled(false);
+ ui_->move_down->setEnabled(false);
+ }
+
+ ui_->clear->setEnabled(!current_playlist_->queue()->is_empty());
}
diff --git a/src/playlist/queuemanager.h b/src/playlist/queuemanager.h
index 5e076ef2d..e138557ea 100644
--- a/src/playlist/queuemanager.h
+++ b/src/playlist/queuemanager.h
@@ -23,6 +23,8 @@ class Playlist;
class PlaylistManager;
class Ui_QueueManager;
+class QModelIndex;
+
class QueueManager : public QDialog {
Q_OBJECT
@@ -34,6 +36,11 @@ public:
private slots:
void CurrentPlaylistChanged(Playlist* playlist);
+ void UpdateButtonState();
+
+ void MoveUp();
+ void MoveDown();
+ void Clear();
private:
Ui_QueueManager* ui_;
diff --git a/src/playlist/queuemanager.ui b/src/playlist/queuemanager.ui
index 569434696..ec9b60bfb 100644
--- a/src/playlist/queuemanager.ui
+++ b/src/playlist/queuemanager.ui
@@ -6,8 +6,8 @@
0
0
- 455
- 366
+ 582
+ 363
@@ -35,35 +35,50 @@
-
-
- 0
-
-
-
+
+
+ false
+
+
+ Move up
+
- 22
- 22
+ 16
+ 16
-
-
+
+
+ false
+
+
+ Move down
+
- 22
- 22
+ 16
+ 16
-
-
+
+
+ false
+
+
+ Clear
+
- 22
- 22
+ 16
+ 16
@@ -91,7 +106,7 @@
Qt::Horizontal
- QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+ QDialogButtonBox::Close
diff --git a/src/translations/ar.po b/src/translations/ar.po
index 20994d0aa..b9744a050 100644
--- a/src/translations/ar.po
+++ b/src/translations/ar.po
@@ -303,6 +303,9 @@ msgstr ""
msgid "Classical"
msgstr ""
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr ""
@@ -960,9 +963,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr ""
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr ""
diff --git a/src/translations/cs.po b/src/translations/cs.po
index 5480a0a05..a8ec84cfe 100644
--- a/src/translations/cs.po
+++ b/src/translations/cs.po
@@ -304,6 +304,9 @@ msgstr "Vybrat obal ručně"
msgid "Classical"
msgstr "Klasická"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Vprázdnit seznam skladeb"
@@ -964,9 +967,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Přesunout do knihovny..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Hudba"
diff --git a/src/translations/da.po b/src/translations/da.po
index a59993871..9582bf160 100644
--- a/src/translations/da.po
+++ b/src/translations/da.po
@@ -304,6 +304,9 @@ msgstr "Vælg omslag manuelt"
msgid "Classical"
msgstr "Klassisk"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Ryd spilleliste"
@@ -965,9 +968,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Flyt til bibliotek..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Musik"
diff --git a/src/translations/de.po b/src/translations/de.po
index 04ad59935..601cfb1c5 100644
--- a/src/translations/de.po
+++ b/src/translations/de.po
@@ -303,6 +303,9 @@ msgstr "Cover selbst auswählen"
msgid "Classical"
msgstr "Klassisch"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Wiedergabeliste leeren"
@@ -967,9 +970,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "In die Musiksammlung verschieben..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Musik"
diff --git a/src/translations/el.po b/src/translations/el.po
index ad55352d6..9cc98914f 100644
--- a/src/translations/el.po
+++ b/src/translations/el.po
@@ -310,6 +310,9 @@ msgstr "Επιλογή εξώφυλλου χειροκίνητα"
msgid "Classical"
msgstr "Κλασσική"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Καθαρισμός λίστας"
@@ -973,9 +976,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Μετακίνηση στην βιβλιοθήκη..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Μουσική"
diff --git a/src/translations/en_CA.po b/src/translations/en_CA.po
index c295c9bdf..99be607c1 100644
--- a/src/translations/en_CA.po
+++ b/src/translations/en_CA.po
@@ -303,6 +303,9 @@ msgstr "Choose manual cover"
msgid "Classical"
msgstr "Classical"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Clear playlist"
@@ -964,9 +967,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Move to library..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Music"
diff --git a/src/translations/en_GB.po b/src/translations/en_GB.po
index 0b2d9b2bc..926591783 100644
--- a/src/translations/en_GB.po
+++ b/src/translations/en_GB.po
@@ -303,6 +303,9 @@ msgstr "Choose manual cover"
msgid "Classical"
msgstr "Classical"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Clear playlist"
@@ -962,9 +965,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Move to library..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Music"
diff --git a/src/translations/es.po b/src/translations/es.po
index 5bfe48377..ab05b384d 100644
--- a/src/translations/es.po
+++ b/src/translations/es.po
@@ -305,6 +305,9 @@ msgstr "Establecer carátula personalizada"
msgid "Classical"
msgstr "Clásico"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Limpiar lista de reproducción"
@@ -971,9 +974,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Mover a la colección..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Música"
diff --git a/src/translations/fi.po b/src/translations/fi.po
index ba1441291..e61d327c3 100644
--- a/src/translations/fi.po
+++ b/src/translations/fi.po
@@ -303,6 +303,9 @@ msgstr ""
msgid "Classical"
msgstr ""
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Tyhjennä soittolista"
@@ -961,9 +964,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Siirrä kirjastoon..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Musiikki"
diff --git a/src/translations/fr.po b/src/translations/fr.po
index 81a094e36..c3c318de2 100644
--- a/src/translations/fr.po
+++ b/src/translations/fr.po
@@ -304,6 +304,9 @@ msgstr "Choisir une jaquette manuellement"
msgid "Classical"
msgstr "Classique"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Vider la liste de lecture"
@@ -968,9 +971,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Déplacer vers la bibliothèque..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Musique"
diff --git a/src/translations/gl.po b/src/translations/gl.po
index dcce49027..eccb9ce2a 100644
--- a/src/translations/gl.po
+++ b/src/translations/gl.po
@@ -303,6 +303,9 @@ msgstr "Escoller unha capa manualmente"
msgid "Classical"
msgstr "Clásica"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr ""
@@ -962,9 +965,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Mover para a biblioteca..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr ""
diff --git a/src/translations/it.po b/src/translations/it.po
index 69b463cb2..ceaa5f080 100644
--- a/src/translations/it.po
+++ b/src/translations/it.po
@@ -304,6 +304,9 @@ msgstr "Scelta manuale della copertina"
msgid "Classical"
msgstr "Classica"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Svuota la scaletta"
@@ -969,9 +972,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Sposta nella raccolta..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Musica"
diff --git a/src/translations/kk.po b/src/translations/kk.po
index 248263978..00c931a40 100644
--- a/src/translations/kk.po
+++ b/src/translations/kk.po
@@ -303,6 +303,9 @@ msgstr ""
msgid "Classical"
msgstr "Классикалық"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr ""
@@ -962,9 +965,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr ""
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr ""
diff --git a/src/translations/nb.po b/src/translations/nb.po
index 7bad99a4b..9f82eee37 100644
--- a/src/translations/nb.po
+++ b/src/translations/nb.po
@@ -303,6 +303,9 @@ msgstr "Velg cover manuelt"
msgid "Classical"
msgstr "Klassisk"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Tøm spillelisten"
@@ -963,9 +966,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Flytt til bibliotek..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Musikk"
diff --git a/src/translations/oc.po b/src/translations/oc.po
index 29ff0f2a4..bba7df0d3 100644
--- a/src/translations/oc.po
+++ b/src/translations/oc.po
@@ -303,6 +303,9 @@ msgstr ""
msgid "Classical"
msgstr "Classic"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Voidar la lista de lectura"
@@ -960,9 +963,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr ""
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Musica"
diff --git a/src/translations/pl.po b/src/translations/pl.po
index 9cd67f14e..6ffb2a39d 100644
--- a/src/translations/pl.po
+++ b/src/translations/pl.po
@@ -304,6 +304,9 @@ msgstr "Wybierz okładkę ręcznie"
msgid "Classical"
msgstr ""
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Wyczyść playlistę"
@@ -962,9 +965,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Przenieś do biblioteki..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Muzyka"
diff --git a/src/translations/pt.po b/src/translations/pt.po
index 9caf3bdfa..257aeac1b 100644
--- a/src/translations/pt.po
+++ b/src/translations/pt.po
@@ -308,6 +308,9 @@ msgstr "Escolher uma capa manualmente"
msgid "Classical"
msgstr "Clássica"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Limpar a lista de reprodução"
@@ -970,9 +973,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Mover para a biblioteca..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Música"
diff --git a/src/translations/pt_BR.po b/src/translations/pt_BR.po
index 9213ab2c6..a98f86d2b 100644
--- a/src/translations/pt_BR.po
+++ b/src/translations/pt_BR.po
@@ -306,6 +306,9 @@ msgstr "Escolher capa manualmente"
msgid "Classical"
msgstr "Clássica"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Limpar lista de reprodução"
@@ -970,9 +973,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Mover para biblioteca..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Música"
diff --git a/src/translations/ro.po b/src/translations/ro.po
index a228b1cf4..5551573d5 100644
--- a/src/translations/ro.po
+++ b/src/translations/ro.po
@@ -303,6 +303,9 @@ msgstr ""
msgid "Classical"
msgstr "Clasică"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Golește lista"
@@ -961,9 +964,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Mută în bibliotecă..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Muzică"
diff --git a/src/translations/ru.po b/src/translations/ru.po
index 3d2959274..a9a1e24e9 100644
--- a/src/translations/ru.po
+++ b/src/translations/ru.po
@@ -302,6 +302,9 @@ msgstr "Укажите обложку вручную"
msgid "Classical"
msgstr "Classical"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Очистить список воспроизведения"
@@ -964,9 +967,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Переместить в коллекцию..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Музыка"
diff --git a/src/translations/sk.po b/src/translations/sk.po
index cd5e02838..c033962bd 100644
--- a/src/translations/sk.po
+++ b/src/translations/sk.po
@@ -308,6 +308,9 @@ msgstr "Vybrať obal ručne"
msgid "Classical"
msgstr "Classical"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Vyprázdniť playlist"
@@ -970,9 +973,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Presunúť do zbierky..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Hudba"
diff --git a/src/translations/sv.po b/src/translations/sv.po
index 32d8ba3e8..5fc3ee408 100644
--- a/src/translations/sv.po
+++ b/src/translations/sv.po
@@ -303,6 +303,9 @@ msgstr "Ange omslag manuellt"
msgid "Classical"
msgstr "Klassiskt"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Töm spellista"
@@ -965,9 +968,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Flytta till bibliotek"
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Musik"
diff --git a/src/translations/tr.po b/src/translations/tr.po
index 14ae1e6c1..8cdcf06ae 100644
--- a/src/translations/tr.po
+++ b/src/translations/tr.po
@@ -303,6 +303,9 @@ msgstr ""
msgid "Classical"
msgstr "Klasik"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Çalma listesini temizle"
@@ -960,9 +963,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr ""
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Müzik"
diff --git a/src/translations/translations.pot b/src/translations/translations.pot
index 96833f379..277edb97f 100644
--- a/src/translations/translations.pot
+++ b/src/translations/translations.pot
@@ -294,6 +294,9 @@ msgstr ""
msgid "Classical"
msgstr ""
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr ""
@@ -951,9 +954,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr ""
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr ""
diff --git a/src/translations/uk.po b/src/translations/uk.po
index 1f9ff2727..c14b988f1 100644
--- a/src/translations/uk.po
+++ b/src/translations/uk.po
@@ -307,6 +307,9 @@ msgstr "Виберіть обкладинку вручну"
msgid "Classical"
msgstr "Класична"
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "Очистити список відтворення"
@@ -969,9 +972,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr "Перемістити до фонотеки..."
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr "Музика"
diff --git a/src/translations/zh_CN.po b/src/translations/zh_CN.po
index 3e513687b..117ffd85e 100644
--- a/src/translations/zh_CN.po
+++ b/src/translations/zh_CN.po
@@ -303,6 +303,9 @@ msgstr ""
msgid "Classical"
msgstr ""
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr ""
@@ -960,9 +963,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr ""
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr ""
diff --git a/src/translations/zh_TW.po b/src/translations/zh_TW.po
index 58d5f06f2..3e183f592 100644
--- a/src/translations/zh_TW.po
+++ b/src/translations/zh_TW.po
@@ -303,6 +303,9 @@ msgstr ""
msgid "Classical"
msgstr ""
+msgid "Clear"
+msgstr ""
+
msgid "Clear playlist"
msgstr "清除播放清單"
@@ -960,9 +963,15 @@ msgstr ""
msgid "Mount points"
msgstr ""
+msgid "Move down"
+msgstr ""
+
msgid "Move to library..."
msgstr ""
+msgid "Move up"
+msgstr ""
+
msgid "Music"
msgstr ""
diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp
index 32d769b4a..eeb63be0a 100644
--- a/src/ui/mainwindow.cpp
+++ b/src/ui/mainwindow.cpp
@@ -1302,7 +1302,11 @@ void MainWindow::PlaylistDelete() {
}
void MainWindow::PlaylistQueue() {
- QModelIndexList indexes = playlists_->current()->proxy()->mapSelectionToSource(
- ui_->playlist->view()->selectionModel()->selection()).indexes();
+ QModelIndexList indexes;
+ foreach (const QModelIndex& proxy_index,
+ ui_->playlist->view()->selectionModel()->selectedRows()) {
+ indexes << playlists_->current()->proxy()->mapToSource(proxy_index);
+ }
+
playlists_->current()->queue()->ToggleTracks(indexes);
}