Playlists get an automatic name, no more prompts. Fixes issue #423

This commit is contained in:
Andrea Decorte 2011-03-25 19:16:12 +00:00
parent 4fda021d16
commit ecda0ada4a
59 changed files with 146 additions and 202 deletions

View File

@ -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;
}

View File

@ -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 <boost/scoped_ptr.hpp>

View File

@ -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<QString> artists;
QSet<QString> 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()) {

View File

@ -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();

View File

@ -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<Song> vetoed;
@ -824,7 +824,7 @@ void Playlist::InsertItems(const PlaylistItemList& itemsIn, int pos, bool play_n
QMutableListIterator<PlaylistItemPtr> 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);

View File

@ -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"));
}

View File

@ -44,8 +44,6 @@ public:
QAction* load_playlist);
void SetManager(PlaylistManager* manager);
QString PromptForPlaylistName();
PlaylistView* view() const;
bool eventFilter(QObject *objectWatched, QEvent *event);

View File

@ -347,3 +347,40 @@ void PlaylistManager::InvalidateDeletedSongs() {
playlist->InvalidateDeletedSongs();
}
}
QString PlaylistManager::GetNameForNewPlaylist(const SongList& songs) {
if (songs.isEmpty()) {
return tr("Playlist");
}
QSet<QString> artists;
QSet<QString> 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;
}

View File

@ -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()); }

View File

@ -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 ""

View File

@ -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 ""

View File

@ -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"

View File

@ -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 dar roll-choari 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 dar roll-choari nevez"
#~ msgid "Add as new playlist..."
#~ msgstr "Oushpennañ evel ur playlist nevez..."

View File

@ -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"

View File

@ -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"

View File

@ -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 ""

View File

@ -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 ""

View File

@ -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:<ul>"

View File

@ -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 "&Εμφάνιση εικονιδίου συστήματος"

View File

@ -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 ""

View File

@ -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:"

View File

@ -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 ""

View File

@ -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 ""

View File

@ -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"

View File

@ -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"

View File

@ -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 ""

View File

@ -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"

View File

@ -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"

View File

@ -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 ""

View File

@ -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 "הוספה כרשימת השמעה חדשה..."

View File

@ -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 ""

View File

@ -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"

View File

@ -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"

View File

@ -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 ""

View File

@ -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..."

View File

@ -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 "新しいプレイリストとして追加..."

View File

@ -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 ""

View File

@ -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"

View File

@ -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 ""

View File

@ -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 ""

View File

@ -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"

View File

@ -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 ""

View File

@ -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 ""

View File

@ -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"

View File

@ -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"

View File

@ -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:"

View File

@ -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 ""

View File

@ -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 "Скрыть..."

View File

@ -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"

View File

@ -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"

View File

@ -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 "АСФ"

View File

@ -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"

View File

@ -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"

View File

@ -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 ""

View File

@ -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\". Варіанти:"

View File

@ -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ả..."

View File

@ -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 "选择引擎"

View File

@ -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 "說明"

View File

@ -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);