diff --git a/src/library/librarymodel.cpp b/src/library/librarymodel.cpp index cd9f58efd..33a1efc7d 100644 --- a/src/library/librarymodel.cpp +++ b/src/library/librarymodel.cpp @@ -982,7 +982,7 @@ QMimeData* LibraryModel::mimeData(const QModelIndexList& indexes) const { } data->setUrls(urls); - data->name_for_new_playlist_ = LibraryView::GetNameForNewPlaylist(data->songs); + data->name_for_new_playlist_ = PlaylistManager::GetNameForNewPlaylist(data->songs); return data; } diff --git a/src/library/librarymodel.h b/src/library/librarymodel.h index 0d9c005cf..3e6f14e54 100644 --- a/src/library/librarymodel.h +++ b/src/library/librarymodel.h @@ -29,6 +29,7 @@ #include "core/simpletreemodel.h" #include "core/song.h" #include "engines/engine_fwd.h" +#include "playlist/playlistmanager.h" #include "smartplaylists/generator_fwd.h" #include diff --git a/src/library/libraryview.cpp b/src/library/libraryview.cpp index b842c3569..80fdf6169 100644 --- a/src/library/libraryview.cpp +++ b/src/library/libraryview.cpp @@ -547,43 +547,6 @@ void LibraryView::EditSmartPlaylistFinished() { library_->UpdateGenerator(context_menu_index_, wizard->CreateGenerator()); } -QString LibraryView::GetNameForNewPlaylist(const SongList& songs) { - if (songs.isEmpty()) { - return tr("Playlist"); - } - - QSet artists; - QSet albums; - - foreach(const Song& song, songs) { - artists << (song.artist().isEmpty() - ? tr("Unknown") - : song.artist()); - albums << (song.album().isEmpty() - ? tr("Unknown") - : song.album()); - - if(artists.size() > 1) { - break; - } - } - - bool various_artists = artists.size() > 1; - - QString result; - if(various_artists) { - result = tr("Various artists"); - } else { - result = artists.values().first(); - } - - if(!various_artists && albums.size() == 1) { - result += " - " + albums.toList().first(); - } - - return result; -} - void LibraryView::ShowInBrowser() { QStringList filenames; foreach (const Song& song, GetSelectedSongs()) { diff --git a/src/library/libraryview.h b/src/library/libraryview.h index 75fd73eb8..c2d54aed9 100644 --- a/src/library/libraryview.h +++ b/src/library/libraryview.h @@ -71,10 +71,6 @@ class LibraryView : public AutoExpandingTreeView { void keyboardSearch(const QString &search); void scrollTo(const QModelIndex& index, ScrollHint hint = EnsureVisible); - // Returns a pretty automatic name for playlist created from the given list of - // songs. - static QString GetNameForNewPlaylist(const SongList& songs); - public slots: void TotalSongCountUpdated(int count); void ReloadSettings(); diff --git a/src/playlist/playlist.cpp b/src/playlist/playlist.cpp index 1ca6a28dc..fac421fd0 100644 --- a/src/playlist/playlist.cpp +++ b/src/playlist/playlist.cpp @@ -810,7 +810,7 @@ void Playlist::InsertItems(const PlaylistItemList& itemsIn, int pos, bool play_n SongList songs; foreach(PlaylistItemPtr item, items) { - songs << item.get()->Metadata(); + songs << item->Metadata(); } QList vetoed; @@ -824,7 +824,7 @@ void Playlist::InsertItems(const PlaylistItemList& itemsIn, int pos, bool play_n QMutableListIterator it(items); while (it.hasNext()) { PlaylistItemPtr item = it.next(); - const Song& current = item.get()->Metadata(); + const Song& current = item->Metadata(); if(vetoed.contains(current)) { vetoed.removeOne(current); diff --git a/src/playlist/playlistcontainer.cpp b/src/playlist/playlistcontainer.cpp index 7266637db..d161c7e50 100644 --- a/src/playlist/playlistcontainer.cpp +++ b/src/playlist/playlistcontainer.cpp @@ -241,7 +241,7 @@ void PlaylistContainer::PlaylistRenamed(int id, const QString &new_name) { } void PlaylistContainer::NewPlaylist() { - manager_->New(PromptForPlaylistName()); + manager_->New(tr("Playlist")); } void PlaylistContainer::LoadPlaylist() { @@ -380,9 +380,3 @@ bool PlaylistContainer::eventFilter(QObject *objectWatched, QEvent *event) { } return QWidget::eventFilter(objectWatched, event); } - -QString PlaylistContainer::PromptForPlaylistName() { - return QInputDialog::getText(this, tr("New playlist"), - tr("Enter a name for the new playlist"), - QLineEdit::Normal, tr("Playlist")); -} diff --git a/src/playlist/playlistcontainer.h b/src/playlist/playlistcontainer.h index 7284b3ca2..99f5d45e3 100644 --- a/src/playlist/playlistcontainer.h +++ b/src/playlist/playlistcontainer.h @@ -44,8 +44,6 @@ public: QAction* load_playlist); void SetManager(PlaylistManager* manager); - QString PromptForPlaylistName(); - PlaylistView* view() const; bool eventFilter(QObject *objectWatched, QEvent *event); diff --git a/src/playlist/playlistmanager.cpp b/src/playlist/playlistmanager.cpp index 537b64b9e..eaf0ffd2a 100644 --- a/src/playlist/playlistmanager.cpp +++ b/src/playlist/playlistmanager.cpp @@ -347,3 +347,40 @@ void PlaylistManager::InvalidateDeletedSongs() { playlist->InvalidateDeletedSongs(); } } + +QString PlaylistManager::GetNameForNewPlaylist(const SongList& songs) { + if (songs.isEmpty()) { + return tr("Playlist"); + } + + QSet artists; + QSet albums; + + foreach(const Song& song, songs) { + artists << (song.artist().isEmpty() + ? tr("Unknown") + : song.artist()); + albums << (song.album().isEmpty() + ? tr("Unknown") + : song.album()); + + if(artists.size() > 1) { + break; + } + } + + bool various_artists = artists.size() > 1; + + QString result; + if(various_artists) { + result = tr("Various artists"); + } else { + result = artists.values().first(); + } + + if(!various_artists && albums.size() == 1) { + result += " - " + albums.toList().first(); + } + + return result; +} diff --git a/src/playlist/playlistmanager.h b/src/playlist/playlistmanager.h index 7fd327707..313f6dbea 100644 --- a/src/playlist/playlistmanager.h +++ b/src/playlist/playlistmanager.h @@ -138,6 +138,10 @@ public: // Grays out and reloads all deleted songs in all playlists. void InvalidateDeletedSongs(); + // Returns a pretty automatic name for playlist created from the given list of + // songs. + static QString GetNameForNewPlaylist(const SongList& songs); + const QItemSelection& selection(int id) const; const QItemSelection& current_selection() const { return selection(current_id()); } const QItemSelection& active_selection() const { return selection(active_id()); } diff --git a/src/translations/ar.po b/src/translations/ar.po index 069f9a8a2..bafbe7b4f 100644 --- a/src/translations/ar.po +++ b/src/translations/ar.po @@ -923,9 +923,6 @@ msgstr "" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/be.po b/src/translations/be.po index cdba7c5d5..d236515bd 100644 --- a/src/translations/be.po +++ b/src/translations/be.po @@ -937,9 +937,6 @@ msgstr "" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/bg.po b/src/translations/bg.po index c0ab62292..0b60081a9 100644 --- a/src/translations/bg.po +++ b/src/translations/bg.po @@ -946,9 +946,6 @@ msgstr "Разреши еквалазйзера" msgid "Enable shortcuts only when Clementine is focused" msgstr "Разреши бързите клавиши,само когато Клемнтин е активен прозорец" -msgid "Enter a name for the new playlist" -msgstr "Въведи име на новият плейлист" - msgid "Enter a new name for this playlist" msgstr "Въведете ново име за тази плейлиста" @@ -2913,6 +2910,9 @@ msgstr "Стоп" msgid "track %1" msgstr "песен %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Въведи име на новият плейлист" + #~ msgid "Couldn't load the last.fm radio station: %1" #~ msgstr "Не може да бъде заредена last.fm радио станция: %1" diff --git a/src/translations/br.po b/src/translations/br.po index af133a3e3..fbe240c20 100644 --- a/src/translations/br.po +++ b/src/translations/br.po @@ -940,9 +940,6 @@ msgstr "Aktivañ ar c'hevataler" msgid "Enable shortcuts only when Clementine is focused" msgstr "Aotren ar beradennoù pa vez enaouet prenestr Clementine nemetken" -msgid "Enter a name for the new playlist" -msgstr "Reiñ un anv d’ar roll-c’hoari nevez" - msgid "Enter a new name for this playlist" msgstr "Lakait un anv evit al listenn lenn" @@ -2856,6 +2853,9 @@ msgstr "" msgid "track %1" msgstr "" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Reiñ un anv d’ar roll-c’hoari nevez" + #~ msgid "Add as new playlist..." #~ msgstr "Oushpennañ evel ur playlist nevez..." diff --git a/src/translations/ca.po b/src/translations/ca.po index ca13adde1..d2f5a88b1 100644 --- a/src/translations/ca.po +++ b/src/translations/ca.po @@ -950,9 +950,6 @@ msgstr "Habilitar l'equalitzador" msgid "Enable shortcuts only when Clementine is focused" msgstr "Habilitar les dreceres només quan Clementine tengui el focus" -msgid "Enter a name for the new playlist" -msgstr "Introduïu un nom per la nova llista de reproducció" - msgid "Enter a new name for this playlist" msgstr "Introduïu un nom per aquesta llista de reproducció" @@ -2885,6 +2882,9 @@ msgstr "atura" msgid "track %1" msgstr "peça %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Introduïu un nom per la nova llista de reproducció" + #~ msgid "ASF" #~ msgstr "ASF" diff --git a/src/translations/cs.po b/src/translations/cs.po index a49e835f4..a42242609 100644 --- a/src/translations/cs.po +++ b/src/translations/cs.po @@ -947,9 +947,6 @@ msgstr "Povolit ekvalizér" msgid "Enable shortcuts only when Clementine is focused" msgstr "Povolit zkratky jen když je Clementine zaměřena" -msgid "Enter a name for the new playlist" -msgstr "Zadejte název pro nový seznam skladeb" - msgid "Enter a new name for this playlist" msgstr "Zadejte název pro tento seznam skladeb" @@ -2904,6 +2901,9 @@ msgstr "Zastavit" msgid "track %1" msgstr "Skladba %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Zadejte název pro nový seznam skladeb" + #~ msgid "&Show tray icon" #~ msgstr "Zobrazit ikonu v &systémovém panelu" diff --git a/src/translations/cy.po b/src/translations/cy.po index 63924e6ea..0aa1d3984 100644 --- a/src/translations/cy.po +++ b/src/translations/cy.po @@ -923,9 +923,6 @@ msgstr "" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/da.po b/src/translations/da.po index a925b254f..f60f9e6e8 100644 --- a/src/translations/da.po +++ b/src/translations/da.po @@ -924,9 +924,6 @@ msgstr "Aktivér equalizer" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/de.po b/src/translations/de.po index e3f11a6d5..d45deb3c3 100644 --- a/src/translations/de.po +++ b/src/translations/de.po @@ -949,9 +949,6 @@ msgstr "Equalizer aktivieren" msgid "Enable shortcuts only when Clementine is focused" msgstr "Tastenkürzel nur aktivieren, wenn Clementine fokussiert ist" -msgid "Enter a name for the new playlist" -msgstr "Name der neuen Wiedergabeliste" - msgid "Enter a new name for this playlist" msgstr "Neuer Name für diese Wiedergabeliste" @@ -2910,6 +2907,9 @@ msgstr "Anhalten" msgid "track %1" msgstr "Stück %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Name der neuen Wiedergabeliste" + #~ msgid "" #~ "The version of Clementine you've just updated to requires a full library " #~ "rescan because of the new features listed below:
    " diff --git a/src/translations/el.po b/src/translations/el.po index 824f019a2..aacc62295 100644 --- a/src/translations/el.po +++ b/src/translations/el.po @@ -960,9 +960,6 @@ msgid "Enable shortcuts only when Clementine is focused" msgstr "" "Ενεργοποίηση των συντομεύσεων μόνο όταν ο Clementine είναι στο προσκήνιο" -msgid "Enter a name for the new playlist" -msgstr "Εισάγετε ένα όνομα για την νέα λίστα αναπαραγωγής" - msgid "Enter a new name for this playlist" msgstr "Εισαγωγή νέου ονόματος για την λίστα αναπαραγωγής" @@ -2937,6 +2934,9 @@ msgstr "διακοπή" msgid "track %1" msgstr "κομμάτι %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Εισάγετε ένα όνομα για την νέα λίστα αναπαραγωγής" + #~ msgid "&Show tray icon" #~ msgstr "&Εμφάνιση εικονιδίου συστήματος" diff --git a/src/translations/en.po b/src/translations/en.po index 2659c0b86..221a4483d 100644 --- a/src/translations/en.po +++ b/src/translations/en.po @@ -923,9 +923,6 @@ msgstr "" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/en_CA.po b/src/translations/en_CA.po index 1d520d2b7..3a232214e 100644 --- a/src/translations/en_CA.po +++ b/src/translations/en_CA.po @@ -925,9 +925,6 @@ msgstr "Enable equalizer" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "Enter a name for the new playlist" - msgid "Enter a new name for this playlist" msgstr "Enter a new name for this playlist" @@ -2836,6 +2833,9 @@ msgstr "" msgid "track %1" msgstr "track %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Enter a name for the new playlist" + #~ msgid "Unknown audio engine \"%1\". Choices are:" #~ msgstr "Unknown audio engine \"%1\". Choices are:" diff --git a/src/translations/en_GB.po b/src/translations/en_GB.po index 3ece05a56..998ae5bef 100644 --- a/src/translations/en_GB.po +++ b/src/translations/en_GB.po @@ -923,9 +923,6 @@ msgstr "Enable equalizer" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/eo.po b/src/translations/eo.po index fa32031df..707f30d4f 100644 --- a/src/translations/eo.po +++ b/src/translations/eo.po @@ -923,9 +923,6 @@ msgstr "" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/es.po b/src/translations/es.po index 823696efe..f6b95176c 100644 --- a/src/translations/es.po +++ b/src/translations/es.po @@ -957,9 +957,6 @@ msgstr "Habilitar el ecualizador" msgid "Enable shortcuts only when Clementine is focused" msgstr "Activar atajos solo cuando Clementine tenga el foco" -msgid "Enter a name for the new playlist" -msgstr "Ingrese un nombre para la nueva lista de reproducción" - msgid "Enter a new name for this playlist" msgstr "Ingrese un nuevo nombre para esta lista de reproducción" @@ -2928,6 +2925,9 @@ msgstr "detener" msgid "track %1" msgstr "Pista %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Ingrese un nombre para la nueva lista de reproducción" + #~ msgid "&Show tray icon" #~ msgstr "&Mostrar icono de la bandeja" diff --git a/src/translations/et.po b/src/translations/et.po index 2919a9377..5858d4e07 100644 --- a/src/translations/et.po +++ b/src/translations/et.po @@ -923,9 +923,6 @@ msgstr "Luba ekvalaiser" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "Sisesta uuele esitusnimekirjale nimi" - msgid "Enter a new name for this playlist" msgstr "" @@ -2833,6 +2830,9 @@ msgstr "peata" msgid "track %1" msgstr "" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Sisesta uuele esitusnimekirjale nimi" + #~ msgid "Hide %1" #~ msgstr "Peida %1" diff --git a/src/translations/eu.po b/src/translations/eu.po index 1c5c55d3d..07fe338d8 100644 --- a/src/translations/eu.po +++ b/src/translations/eu.po @@ -923,9 +923,6 @@ msgstr "" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/fi.po b/src/translations/fi.po index b2bae4892..3ca399db1 100644 --- a/src/translations/fi.po +++ b/src/translations/fi.po @@ -928,9 +928,6 @@ msgstr "Käytä taajuuskorjainta" msgid "Enable shortcuts only when Clementine is focused" msgstr "Käytä pikanäppäimiä vain Clementinen ollessa avoinna" -msgid "Enter a name for the new playlist" -msgstr "Kirjoita uuden soittolistan nimi" - msgid "Enter a new name for this playlist" msgstr "Anna uusi nimi tälle soittolistalle" @@ -2857,6 +2854,9 @@ msgstr "pysäytä" msgid "track %1" msgstr "kappale %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Kirjoita uuden soittolistan nimi" + #~ msgid "Hide %1" #~ msgstr "Piilota %1" diff --git a/src/translations/fr.po b/src/translations/fr.po index 61d67c44a..846493aab 100644 --- a/src/translations/fr.po +++ b/src/translations/fr.po @@ -959,9 +959,6 @@ msgstr "" "Autoriser les raccourcis uniquement lorsque la fenêtre de Clementine est " "active" -msgid "Enter a name for the new playlist" -msgstr "Saisissez un nom pour la nouvelle liste de lecture" - msgid "Enter a new name for this playlist" msgstr "Saisissez un nom pour la liste de lecture" @@ -2937,6 +2934,9 @@ msgstr "stop" msgid "track %1" msgstr "piste %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Saisissez un nom pour la nouvelle liste de lecture" + #~ msgid "&Show tray icon" #~ msgstr "&Afficher l'icône" diff --git a/src/translations/gl.po b/src/translations/gl.po index 598f74014..b7d4f63fc 100644 --- a/src/translations/gl.po +++ b/src/translations/gl.po @@ -931,9 +931,6 @@ msgstr "" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/he.po b/src/translations/he.po index f25989bbd..c680f52ff 100644 --- a/src/translations/he.po +++ b/src/translations/he.po @@ -938,9 +938,6 @@ msgstr "אפשור אקולייזר" msgid "Enable shortcuts only when Clementine is focused" msgstr "אפשר קיצורי מקלדת רק כאשר Clementine נמצא בפוקוס" -msgid "Enter a name for the new playlist" -msgstr "הזן שם עבור רשימת ההשמעה החדשה" - msgid "Enter a new name for this playlist" msgstr "הזן שם חדש לרשימת ההשמעה הזו" @@ -2869,6 +2866,9 @@ msgstr "הפסקה" msgid "track %1" msgstr "רצועה %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "הזן שם עבור רשימת ההשמעה החדשה" + #~ msgid "Add as new playlist..." #~ msgstr "הוספה כרשימת השמעה חדשה..." diff --git a/src/translations/hi.po b/src/translations/hi.po index 9898d34b0..69d60d7de 100644 --- a/src/translations/hi.po +++ b/src/translations/hi.po @@ -923,9 +923,6 @@ msgstr "" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/hr.po b/src/translations/hr.po index eaa99b650..92fb654bf 100644 --- a/src/translations/hr.po +++ b/src/translations/hr.po @@ -950,9 +950,6 @@ msgstr "Omogući ekvilajzer" msgid "Enable shortcuts only when Clementine is focused" msgstr "Omogući prečac samo ako je Clementine fokusiran" -msgid "Enter a name for the new playlist" -msgstr "Unesite naziv za novi popis izvođenja" - msgid "Enter a new name for this playlist" msgstr "Unesite novi naziv za popis izvođenja" @@ -2904,6 +2901,9 @@ msgstr "" msgid "track %1" msgstr "pjesma %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Unesite naziv za novi popis izvođenja" + #~ msgid "Editing %n tracks" #~ msgstr "uređivanje %n pjesama" diff --git a/src/translations/hu.po b/src/translations/hu.po index bf9d51522..0a5164de8 100644 --- a/src/translations/hu.po +++ b/src/translations/hu.po @@ -949,9 +949,6 @@ msgid "Enable shortcuts only when Clementine is focused" msgstr "" "Gyorsbillentyűk engedélyezése csak akkor, ha a Clementine fókuszba kerül" -msgid "Enter a name for the new playlist" -msgstr "Adjon nevet az új lejátszási listának" - msgid "Enter a new name for this playlist" msgstr "Adjon meg új nevet ennek a lejátszási listának" @@ -2909,6 +2906,9 @@ msgstr "leállítás" msgid "track %1" msgstr "%1. szám" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Adjon nevet az új lejátszási listának" + #~ msgid "ASF" #~ msgstr "ASF" diff --git a/src/translations/is.po b/src/translations/is.po index fe706c8c6..3cbabd2e9 100644 --- a/src/translations/is.po +++ b/src/translations/is.po @@ -923,9 +923,6 @@ msgstr "" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/it.po b/src/translations/it.po index 06d296ae0..26fe85856 100644 --- a/src/translations/it.po +++ b/src/translations/it.po @@ -952,9 +952,6 @@ msgstr "Abilita equalizzatore" msgid "Enable shortcuts only when Clementine is focused" msgstr "Abilita le scorciatoie solo quando Clementine è in primo piano" -msgid "Enter a name for the new playlist" -msgstr "Inserisci un nome per la nuova scaletta" - msgid "Enter a new name for this playlist" msgstr "Inserisci un nuovo nome per questa scaletta" @@ -2924,6 +2921,9 @@ msgstr "ferma" msgid "track %1" msgstr "traccia %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Inserisci un nome per la nuova scaletta" + #~ msgid "Hide..." #~ msgstr "Nascondi..." diff --git a/src/translations/ja.po b/src/translations/ja.po index efc119455..57e2116ac 100644 --- a/src/translations/ja.po +++ b/src/translations/ja.po @@ -940,9 +940,6 @@ msgstr "イコライザーを有効にする" msgid "Enable shortcuts only when Clementine is focused" msgstr "Clementine にフォーカスがあるときのみショートカットを有効にする" -msgid "Enter a name for the new playlist" -msgstr "新しいプレイリストの名前を入力します" - msgid "Enter a new name for this playlist" msgstr "このプレイリストの名前を入力します" @@ -2883,6 +2880,9 @@ msgstr "停止" msgid "track %1" msgstr "トラック %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "新しいプレイリストの名前を入力します" + #~ msgid "Add as new playlist..." #~ msgstr "新しいプレイリストとして追加..." diff --git a/src/translations/kk.po b/src/translations/kk.po index 2d3097b3a..37ad93965 100644 --- a/src/translations/kk.po +++ b/src/translations/kk.po @@ -923,9 +923,6 @@ msgstr "" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/lt.po b/src/translations/lt.po index b3763edcd..f312ac071 100644 --- a/src/translations/lt.po +++ b/src/translations/lt.po @@ -947,9 +947,6 @@ msgstr "Įjungti glodintuvą" msgid "Enable shortcuts only when Clementine is focused" msgstr "Įgalinti kombinacijas tik tada kai Clementine yra aktyvus" -msgid "Enter a name for the new playlist" -msgstr "Įveskite naujo grojaraščio pavadinimą" - msgid "Enter a new name for this playlist" msgstr "Įveskite naują pavadinimą šiam grojaraščiui" @@ -2896,6 +2893,9 @@ msgstr "stabdyti" msgid "track %1" msgstr "takelis %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Įveskite naujo grojaraščio pavadinimą" + #~ msgid "Double-clicking a song clears the playlist first" #~ msgstr "Išvalyti grojaraštį du kartus spragtelėjus ant dainos" diff --git a/src/translations/lv.po b/src/translations/lv.po index 3e3c9a7d5..e5f404d76 100644 --- a/src/translations/lv.po +++ b/src/translations/lv.po @@ -923,9 +923,6 @@ msgstr "" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/nb.po b/src/translations/nb.po index 66d98ecda..bb86ec3b9 100644 --- a/src/translations/nb.po +++ b/src/translations/nb.po @@ -934,9 +934,6 @@ msgstr "Slå på equalizer" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/nl.po b/src/translations/nl.po index 4c78a253b..d29e3d053 100644 --- a/src/translations/nl.po +++ b/src/translations/nl.po @@ -951,9 +951,6 @@ msgstr "Equalizer inschakelen" msgid "Enable shortcuts only when Clementine is focused" msgstr "Sneltoetsen alleen inschakelen wanneer Clementine de focus heeft" -msgid "Enter a name for the new playlist" -msgstr "Voer een naam in voor de nieuwe afspeellijst" - msgid "Enter a new name for this playlist" msgstr "Voer een nieuwe naam in voor deze afspeellijst" @@ -2922,6 +2919,9 @@ msgstr "stoppen" msgid "track %1" msgstr "track %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Voer een naam in voor de nieuwe afspeellijst" + #~ msgid "ASF" #~ msgstr "ASF" diff --git a/src/translations/oc.po b/src/translations/oc.po index 992c54aaa..c0cb7747f 100644 --- a/src/translations/oc.po +++ b/src/translations/oc.po @@ -923,9 +923,6 @@ msgstr "" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/pa.po b/src/translations/pa.po index 035236425..9b5e68313 100644 --- a/src/translations/pa.po +++ b/src/translations/pa.po @@ -923,9 +923,6 @@ msgstr "" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/pl.po b/src/translations/pl.po index 831eb8785..a738052f2 100644 --- a/src/translations/pl.po +++ b/src/translations/pl.po @@ -948,9 +948,6 @@ msgstr "Włącz korektor dźwięku" msgid "Enable shortcuts only when Clementine is focused" msgstr "Włącz skróty tylko, gdy Clementine jest aktywny" -msgid "Enter a name for the new playlist" -msgstr "Wprowadź nazwę nowej listy odtwarzania" - msgid "Enter a new name for this playlist" msgstr "Wpisz nową nazwę dla listy odtwarzania" @@ -2910,6 +2907,9 @@ msgstr "zatrzymaj" msgid "track %1" msgstr "utwór %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Wprowadź nazwę nowej listy odtwarzania" + #~ msgid "&Show tray icon" #~ msgstr "&Pokaż ikonę w trayu" diff --git a/src/translations/pt.po b/src/translations/pt.po index 218674216..3896c2c45 100644 --- a/src/translations/pt.po +++ b/src/translations/pt.po @@ -951,9 +951,6 @@ msgstr "Ativar equalizador" msgid "Enable shortcuts only when Clementine is focused" msgstr "Apenas ativar os atalhos se o Clementine estiver realçado" -msgid "Enter a name for the new playlist" -msgstr "Indique o nome para a lista de reprodução" - msgid "Enter a new name for this playlist" msgstr "Indique o nome para esta lista de reprodução" @@ -2918,6 +2915,9 @@ msgstr "parar" msgid "track %1" msgstr "música %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Indique o nome para a lista de reprodução" + #~ msgid "My Neighbourhood" #~ msgstr "Os meus vizinhos" diff --git a/src/translations/pt_BR.po b/src/translations/pt_BR.po index 23da21e9e..f55303662 100644 --- a/src/translations/pt_BR.po +++ b/src/translations/pt_BR.po @@ -943,9 +943,6 @@ msgstr "Habilitar equalizador" msgid "Enable shortcuts only when Clementine is focused" msgstr "Habilitar atalhos só quando o Clementine tiver foco" -msgid "Enter a name for the new playlist" -msgstr "Digite um nome para a nova lista de reprodução" - msgid "Enter a new name for this playlist" msgstr "Digite um novo nome para esta lista" @@ -2902,6 +2899,9 @@ msgstr "parar" msgid "track %1" msgstr "faixa %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Digite um nome para a nova lista de reprodução" + #~ msgid "Unknown audio engine \"%1\". Choices are:" #~ msgstr "Mecanismo de áudio \"%1\" desconhecido. Escolha:" diff --git a/src/translations/ro.po b/src/translations/ro.po index 4fe3dcac2..a8b0441aa 100644 --- a/src/translations/ro.po +++ b/src/translations/ro.po @@ -927,9 +927,6 @@ msgstr "" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/ru.po b/src/translations/ru.po index 39b7a869c..15db6a960 100644 --- a/src/translations/ru.po +++ b/src/translations/ru.po @@ -943,9 +943,6 @@ msgstr "Включить эквалайзер" msgid "Enable shortcuts only when Clementine is focused" msgstr "Разрешить горячие клавиши только когда окно программы активно" -msgid "Enter a name for the new playlist" -msgstr "Введите имя для списка воспроизведения" - msgid "Enter a new name for this playlist" msgstr "Введите новое имя для этого списка воспроизведения" @@ -2896,6 +2893,9 @@ msgstr "Остановить" msgid "track %1" msgstr "композиция %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Введите имя для списка воспроизведения" + #~ msgid "Hide..." #~ msgstr "Скрыть..." diff --git a/src/translations/sk.po b/src/translations/sk.po index 0a4915149..9a20b0d94 100644 --- a/src/translations/sk.po +++ b/src/translations/sk.po @@ -944,9 +944,6 @@ msgstr "Povoliť ekvalizér" msgid "Enable shortcuts only when Clementine is focused" msgstr "Povoliť skratky len keď je Clementine zameraný" -msgid "Enter a name for the new playlist" -msgstr "Zadajte názov pre nový playlist" - msgid "Enter a new name for this playlist" msgstr "Zadajte nový názov pre tento playlist" @@ -2901,6 +2898,9 @@ msgstr "zastaviť" msgid "track %1" msgstr "skladba %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Zadajte názov pre nový playlist" + #~ msgid "&Show tray icon" #~ msgstr "&Zobraziť tray ikonu" diff --git a/src/translations/sl.po b/src/translations/sl.po index 414fc0d9b..dbdb3df40 100644 --- a/src/translations/sl.po +++ b/src/translations/sl.po @@ -946,9 +946,6 @@ msgstr "Omogoči izenačevalnik" msgid "Enable shortcuts only when Clementine is focused" msgstr "Omogoči bližnjice le, ko je Clementine v žarišču" -msgid "Enter a name for the new playlist" -msgstr "Vnesite ime za nov seznam predvajanja" - msgid "Enter a new name for this playlist" msgstr "Vnesite novo ime za ta seznam predvajanja" @@ -2901,6 +2898,9 @@ msgstr "zaustavi" msgid "track %1" msgstr "skladba %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Vnesite ime za nov seznam predvajanja" + #~ msgid "ASF" #~ msgstr "ASF" diff --git a/src/translations/sr.po b/src/translations/sr.po index 02e801816..98cacf963 100644 --- a/src/translations/sr.po +++ b/src/translations/sr.po @@ -925,9 +925,6 @@ msgstr "Укључи еквилајзер" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "Упишите име нове листе нумера" - msgid "Enter a new name for this playlist" msgstr "Унеси нови назив листе нумера" @@ -2838,6 +2835,9 @@ msgstr "Заустави" msgid "track %1" msgstr "нумера %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Упишите име нове листе нумера" + #~ msgid "ASF" #~ msgstr "АСФ" diff --git a/src/translations/sv.po b/src/translations/sv.po index 96807e56e..b278d4a7a 100644 --- a/src/translations/sv.po +++ b/src/translations/sv.po @@ -949,9 +949,6 @@ msgstr "Aktivera equalizer" msgid "Enable shortcuts only when Clementine is focused" msgstr "Aktivera endast snabbknappar när Clementine är fokuserat" -msgid "Enter a name for the new playlist" -msgstr "Ange ett namn för den nya spellistan" - msgid "Enter a new name for this playlist" msgstr "Ange ett nytt namn för denna spellista" @@ -2899,6 +2896,9 @@ msgstr "stoppa" msgid "track %1" msgstr "spår %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Ange ett namn för den nya spellistan" + #~ msgid "Hide %1" #~ msgstr "Dölj %1" diff --git a/src/translations/tr.po b/src/translations/tr.po index 610852abf..0d445679a 100644 --- a/src/translations/tr.po +++ b/src/translations/tr.po @@ -943,9 +943,6 @@ msgstr "Ekolayzırı etkinleştir" msgid "Enable shortcuts only when Clementine is focused" msgstr "Kısayolları sadece Clementine odaktayken etkinleştir" -msgid "Enter a name for the new playlist" -msgstr "Yeni çalma listesi için isim girin" - msgid "Enter a new name for this playlist" msgstr "Bu çalma listesi için yeni bir isim gir" @@ -2895,6 +2892,9 @@ msgstr "durdur" msgid "track %1" msgstr "parça %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Yeni çalma listesi için isim girin" + #~ msgid "Hide %1" #~ msgstr "Gizle %1" diff --git a/src/translations/translations.pot b/src/translations/translations.pot index fe03d24d7..e346b0b59 100644 --- a/src/translations/translations.pot +++ b/src/translations/translations.pot @@ -913,9 +913,6 @@ msgstr "" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "" - msgid "Enter a new name for this playlist" msgstr "" diff --git a/src/translations/uk.po b/src/translations/uk.po index bb6d13953..9a5d26ec3 100644 --- a/src/translations/uk.po +++ b/src/translations/uk.po @@ -946,9 +946,6 @@ msgstr "Увімкнути еквалайзер" msgid "Enable shortcuts only when Clementine is focused" msgstr "Використовувати глобальні скорочення лише коли Clementine у фокусі" -msgid "Enter a name for the new playlist" -msgstr "Введіть назву нового списку відтворення" - msgid "Enter a new name for this playlist" msgstr "Введіть нову назву для цього списку відтворення" @@ -2896,6 +2893,9 @@ msgstr "зупинити" msgid "track %1" msgstr "доріжка %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Введіть назву нового списку відтворення" + #~ msgid "Unknown audio engine \"%1\". Choices are:" #~ msgstr "Невідомий аудіо рушій \"%1\". Варіанти:" diff --git a/src/translations/vi.po b/src/translations/vi.po index 203cf5261..194e445ae 100644 --- a/src/translations/vi.po +++ b/src/translations/vi.po @@ -944,9 +944,6 @@ msgstr "Bật bộ cân chỉnh âm" msgid "Enable shortcuts only when Clementine is focused" msgstr "Bật các phím tắt chỉ khi cửa sổ Clementine đang được chọn" -msgid "Enter a name for the new playlist" -msgstr "Nhập tên cho danh sách mới" - msgid "Enter a new name for this playlist" msgstr "Nhập tên mới cho danh sách này" @@ -2899,6 +2896,9 @@ msgstr "stop" msgid "track %1" msgstr "track %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "Nhập tên cho danh sách mới" + #~ msgid "Generating audio fingerprint and fetching results..." #~ msgstr "Tạo dấu hiệu cho âm thanh và lấy kết quả..." diff --git a/src/translations/zh_CN.po b/src/translations/zh_CN.po index 086af7d69..a270825b5 100644 --- a/src/translations/zh_CN.po +++ b/src/translations/zh_CN.po @@ -925,9 +925,6 @@ msgstr "启用均衡器" msgid "Enable shortcuts only when Clementine is focused" msgstr "仅当 Clementine 在焦点时启用快捷键" -msgid "Enter a name for the new playlist" -msgstr "输入新播放列表的名称" - msgid "Enter a new name for this playlist" msgstr "输入播放列表的新名称" @@ -2834,6 +2831,9 @@ msgstr "停止" msgid "track %1" msgstr "音轨 %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "输入新播放列表的名称" + #~ msgid "Select engine" #~ msgstr "选择引擎" diff --git a/src/translations/zh_TW.po b/src/translations/zh_TW.po index eb158b41c..96e01bfd0 100644 --- a/src/translations/zh_TW.po +++ b/src/translations/zh_TW.po @@ -927,9 +927,6 @@ msgstr "啟用等化器" msgid "Enable shortcuts only when Clementine is focused" msgstr "" -msgid "Enter a name for the new playlist" -msgstr "輸入新播放清單的名稱" - msgid "Enter a new name for this playlist" msgstr "為這個播放清單輸入新的名稱" @@ -2838,6 +2835,9 @@ msgstr "" msgid "track %1" msgstr "歌曲 %1" +#~ msgid "Enter a name for the new playlist" +#~ msgstr "輸入新播放清單的名稱" + #~ msgid "Help" #~ msgstr "說明" diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index 8b59a47f3..65cac7558 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -1096,12 +1096,17 @@ void MainWindow::AddToPlaylist(QAction* action) { items << playlists_->current()->item_at(row); } + SongList songs; + foreach(PlaylistItemPtr item, items) { + songs << item->Metadata(); + } + //we're creating a new playlist if (destination == -1) { //save the current playlist to reactivate it int current_id = playlists_->current_id(); - //ask for the name - playlists_->New(ui_->playlist->PromptForPlaylistName()); + //get the name from selection + playlists_->New(playlists_->GetNameForNewPlaylist(songs)); if (playlists_->current()->id() != current_id) { //I'm sure the new playlist was created and is selected, so I can just insert items playlists_->current()->InsertItems(items);