From 1f9e72f9714e5edef095987fa22db8116dfe9b5e Mon Sep 17 00:00:00 2001 From: David Sansome Date: Sun, 11 Jul 2010 16:58:22 +0000 Subject: [PATCH] Add icons to the move up/move down/clear buttons, and implement the clear button --- data/data.qrc | 3 ++ data/icons/22x22/go-down.png | Bin 0 -> 892 bytes data/icons/32x32/go-down.png | Bin 0 -> 1437 bytes data/icons/48x48/go-down.png | Bin 0 -> 2404 bytes src/playlist/playlist.cpp | 19 +++++++++++ src/playlist/playlist.h | 6 ++++ src/playlist/queue.cpp | 25 ++++++++++---- src/playlist/queue.h | 7 ++-- src/playlist/queuemanager.cpp | 54 +++++++++++++++++++++++++++++- src/playlist/queuemanager.h | 7 ++++ src/playlist/queuemanager.ui | 45 ++++++++++++++++--------- src/translations/ar.po | 9 +++++ src/translations/cs.po | 9 +++++ src/translations/da.po | 9 +++++ src/translations/de.po | 9 +++++ src/translations/el.po | 9 +++++ src/translations/en_CA.po | 9 +++++ src/translations/en_GB.po | 9 +++++ src/translations/es.po | 9 +++++ src/translations/fi.po | 9 +++++ src/translations/fr.po | 9 +++++ src/translations/gl.po | 9 +++++ src/translations/it.po | 9 +++++ src/translations/kk.po | 9 +++++ src/translations/nb.po | 9 +++++ src/translations/oc.po | 9 +++++ src/translations/pl.po | 9 +++++ src/translations/pt.po | 9 +++++ src/translations/pt_BR.po | 9 +++++ src/translations/ro.po | 9 +++++ src/translations/ru.po | 9 +++++ src/translations/sk.po | 9 +++++ src/translations/sv.po | 9 +++++ src/translations/tr.po | 9 +++++ src/translations/translations.pot | 9 +++++ src/translations/uk.po | 9 +++++ src/translations/zh_CN.po | 9 +++++ src/translations/zh_TW.po | 9 +++++ src/ui/mainwindow.cpp | 8 +++-- 39 files changed, 390 insertions(+), 27 deletions(-) create mode 100644 data/icons/22x22/go-down.png create mode 100644 data/icons/32x32/go-down.png create mode 100644 data/icons/48x48/go-down.png 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 0000000000000000000000000000000000000000..63331a575a3207c6618466ee43398315e28f8e81 GIT binary patch literal 892 zcmV-?1B3jDP)d0hQqVW5MG!)~ zQ(l3~#roK)XgqrHOm@gAWPH5Z~NK~`i)k_?9txDMb2=3X!cY~Q+?S7nDNwO~_<>VOY- zA9t_#BXNIx@MJXcV|T-{`gv8=RRBaTlXyA-;KQ$BI~OxPC_mSDO#_J}zJ7~gD4%13 zB%knnqPOVLF3UH4(VKiO+dQLgra*XVmxyp7!Qou+KYW1#1|txWUha{5{d6-LR0VF9K^xR`)C1U4h(-^}}<`cMj~SmY%U z;9CpU;ONmxlOE3WcDmd=CxZ2g>J>?hcrG{-FN-MIS~W zq5_VdOj3p-VRTFV;syi*e)t2!i519_#M2UlyB;F)_Gzn?3ZFs+1fVj!v$G#wcRol) zKOn%RYA{$%9OP*WnK<4&xgG`)j({^RG0lE)ADMEnJ2WWpKEo>e`qcKJZG zADy?_ZxT^C?q~^&hJ-OdMBmX*gP%9NfAUP``vEil3jd5LOSa7o%vnDVW8^1;=xT*| SG6r-20000v0qr2#DW5qb9vaO7m4f8foHq7VRq0(9}puqrz;u?&Ui z$ZtLP}D+R`YOvb!N@718L^XxQ~N(lf4q|+J9CyfaFk^{I|Fa!X1NZ_`h zxkdnvSy}+53C6jOOaTc9u7Mj-R%!r zM!X7n&GY^F*_JmBZFD?-d}Mqk=J^2Q0!-szjI7a|bF8gRg3(KT0aN4LLr6;azEmw} zAF6<3JCMGcx9@udr=ez1S@VmV>YjUj+cVBB321I+`JzN3R$oqY7LYp1`SS#mGJS&4 zXwHyh$gNCS0ob;U#@Z=5_Q|+K(P#vfH7lA1#-`T+Xt@QTr~ASWmX-Z*`LgQ83*u4C z71khxP8Q%~O@+o32$ORONZ*I&Gthvke@(cqqwEK7YT)FFqp6w)D*KTWM@~1d z|7B_MC4bLMj_*j6l{44#)ru&7GAGZq1i4W{QwFH8WCQ{A885Ks5rD4}p}??a)l!@} z(}K&ry}P=O9caECK*>(_^~-Q|!m+LOk@!MYR8#%eb0ZzA`5cr20u|3eP;nLglB#k% zQdf||3IzTD~%$R=x~?JRB+ z#~tL(4o)JvB; zAcTY7^UX=x6+3D5KJFrpd&rv|G+C_X!tB(I9V=F^VwV7ZjW`gfm94Y4q|A)ma(`d+@|{FPf<~o0)ZF`f?A-WSFuZp;B~3<1TJ^9 zer8Yf9Kbx%3j2%L-PhfE`rO#)CADHh*HsEpik+-rj9ePiGXpqx`bdwI-n$@`1i&8a zvOULs`PBCZGnSVE=R7Eu@3}5?^_~k0za0KF>txNBoMf+w0>n|Ed^0)e`ub#YYUqX4 zjhmr!UETSCT-Sx|yEyvY$GFzj@s4+M_$QD`382K|i#w(U`x^ABvXu|jty0f@*Y)5K zKnL~xkHZIl)QrS#KRaE-KPH7kRO*K4+WEm3HT4w_BhYAi6kqM#K4Q+M8>sjM{%>iK ziY?VoHhR0i?v#7J>5{dL&w5OcZ9x&@C_>UTubQ)&xRnr1z1_{||NZ1g(oTJjA|z0x rn278%IM$E#bh=DL--k7e`%?b_@wH4+ebcqq00000NkvXXu0mjfns2Tg literal 0 HcmV?d00001 diff --git a/data/icons/48x48/go-down.png b/data/icons/48x48/go-down.png new file mode 100644 index 0000000000000000000000000000000000000000..780714b8fa8db3e15b9a258bccb3589e57ca5d80 GIT binary patch literal 2404 zcmV-q37htbP)#Yb#qihEXpDal z{6iBL^y9Yow)cF${?2>P=}DU+ zaJy1W_S`=AcTR6l`#iso_q->?hxmVnlrkVE7J5A+Vj*A)5YJ9@kM8Up$Zq@fzH|C` z#s-iVBjX>Md)2Hzy!q}X``$G*zk2vn&D$AcH`c&`6a9Mk`xDdmZ)g&)v=1VkwdaVR zPk0PN*YMzmCR`lO+V|bnR6+(^6aaw&@$Fx}<_pfmP$r8{u5Ca)is$6|>Ui;uUL1L| zPa^{!2shM#@0hSDj*VwvnN>iHYc|q1IELQ-VNmwvjW^($N}cOiuq?ZfDT3$N@acMm z8*RXIOcfnFFi@BX&$Wr>(ire#129dyz$94kouxA1#s=(bY#~XnxfSr2sshsY0S36P z3$xG`@;vySyEFzE*BH|T$cL)H^+3ufGHAkJOJx9>UJPGySn&*8-*U<{@I>(vRe*7( z871(+VP0PaVmnMg7^O>70dfFgl);y>;AIrN7{Vz3;3^$7|Ak}RIOwj?lu6wA^P(g zNHDAa?YFzm8ivufyhex6`23Y;09PGEs1D!AiKMoP=&< zESO6Yr_8WOPbfa0Vn6sih~cs4QzUwxjEx{h(nvt(41e1DB1%e<&j4S%qJb!5`$|_m z^xKOUM!%UfIEqV3XJuUo4g^`2ATof+B!>hCkdF+ZiCLp7)k}#FUXl|fkrAQj`9#-O zMgR$22y9$;JDz%a4>D8cp@~uP1Zlkba#8e=PX~9XH;aM3p(EE8D^ST zm%DIe;F=#Pi<&pxN#R&cT|=_AX{8b@^gw*X*hFk3FhFtcN+e}8xD-7S?^CutC7Lsd z#+nMWG*-e88qyP4w0FIWlkMk_n;67&W+W)o7pzPFdg;1uWM==-_M+yE+ed~6pD3@a zMzXv*KYWsifSjlSEKiw_;gU;aY^I4M1&v~HlB2TBKvh{1MTQm_QTLGZeJSiccm`wX zNjQ!T$F{+w1#4Y*h>XH)RO^HhJ8iJqRp*q??J*SK~a%G(U_@%PE|3CgkmB= z$8?_1HR!53JX}_pYMq?vU?iQz<*^JVGShHf2d<+yBiyzvz_T#c|8HconKJ;}WDT5{ zF35l~(X_E1knPLr>g(!S?j%vVGGK&E=m~I5fTE5M>5X7Tv?K?}t_PyHT>C*c%H zJVgs0naZTPFw}oxS^}T222OV2e?Y@k;7;~uwese(x#_7dS5%bI=CLX-nCk!+023;5 zt}Amq9CTd|hF+1*wRqSAlbq-0gwMHSQv#-Q!k$9#Uis!Q$SP0-k z*XtNb4ZRPr&r|kQ-!ITW3~#dEArnWbm9{36nqIwpr5a>a1zis*LgvkgF#DQ_wj3<1 zK-4zsO?`iKpc6fvXWU@PB=OxKd~gP06T>tQ>G6@_2OC>%MR8dT35^9O^jTGiOhl~{ ziU)D_7RxqMICXeG9Ls*(8an+45Ej8eG!IRueb-$#n(A+DUArDaD?%d5dKe>9YJl@C z6t)jy_2KHoH3!EJJcsni$WbtC^QKbXq8e}~FG^9`aM+rj`if46p8g8tI{dZZLeu8R^237_djWa**6ugOFP-mPwQAF6QOuJ73&cycWp+dH899X) zcJ9FV#lAzDQSq2>j^m~<;O9ocjq+E_iSaGtlc}=SyFLT%$T0gJT-SrmB@XP{iE~E| zr5G2R-OQy)084EkhO{$Tu9tL=_4PiYH`cP{4R^pN;mUyY(fQtSy!yMJ`EP`WE%T_@jc|y=_jR~eG-J5(SQOksyyQ6vJVdr z^wzg*ybq4xIQZO8G1PIUohtMwnRIcpLo2RXqa`b+HtqPi{OFgyA+_Sl3{O_JVG+Qw z2=JyacQP&U{py-3=?`6$654nD+<4cbBnyj#(q%1gc~bTa_w?*>9PK%}U*JQ`gZ~2F Wx`D8V2rwZ40000setSourceModel(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); }