From 617bf301e3be32d86076010e6f08062b0a6757e7 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 10 Feb 2012 15:22:31 +0000 Subject: added possibility to add files from command line to specific playlist git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2590 90c681e8-e032-0410-971d-27865f9a5e38 --- src/app/builtincommandlineoption.cpp | 9 +++++ src/app/translations/qmmp_cs.ts | 26 ++++++------- src/app/translations/qmmp_de.ts | 26 ++++++------- src/app/translations/qmmp_es.ts | 26 ++++++------- src/app/translations/qmmp_hu.ts | 26 ++++++------- src/app/translations/qmmp_it.ts | 26 ++++++------- src/app/translations/qmmp_ja.ts | 26 ++++++------- src/app/translations/qmmp_lt.ts | 26 ++++++------- src/app/translations/qmmp_nl.ts | 26 ++++++------- src/app/translations/qmmp_pl_PL.ts | 26 ++++++------- src/app/translations/qmmp_pt_BR.ts | 26 ++++++------- src/app/translations/qmmp_ru.ts | 26 ++++++------- src/app/translations/qmmp_sk.ts | 26 ++++++------- src/app/translations/qmmp_tr.ts | 26 ++++++------- src/app/translations/qmmp_uk_UA.ts | 26 ++++++------- src/app/translations/qmmp_zh_CN.ts | 26 ++++++------- src/app/translations/qmmp_zh_TW.ts | 26 ++++++------- src/plugins/Ui/skinned/forms/shortcutdialog.ui | 2 +- src/plugins/Ui/skinned/forms/skinnedsettings.ui | 2 +- src/qmmpui/configdialog.cpp | 5 +++ src/qmmpui/forms/configdialog.ui | 46 +++++++++++++++-------- src/qmmpui/playlistmanager.cpp | 7 ++++ src/qmmpui/playlistmanager.h | 4 ++ src/qmmpui/qmmpuisettings.cpp | 20 ++++++++++ src/qmmpui/qmmpuisettings.h | 26 +++++++++---- src/qmmpui/translations/libqmmpui_cs.ts | 50 ++++++++++++++----------- src/qmmpui/translations/libqmmpui_de.ts | 50 ++++++++++++++----------- src/qmmpui/translations/libqmmpui_es.ts | 50 ++++++++++++++----------- src/qmmpui/translations/libqmmpui_it.ts | 50 ++++++++++++++----------- src/qmmpui/translations/libqmmpui_ja.ts | 50 ++++++++++++++----------- src/qmmpui/translations/libqmmpui_lt.ts | 50 ++++++++++++++----------- src/qmmpui/translations/libqmmpui_nl.ts | 50 ++++++++++++++----------- src/qmmpui/translations/libqmmpui_pl_PL.ts | 50 ++++++++++++++----------- src/qmmpui/translations/libqmmpui_pt_BR.ts | 50 ++++++++++++++----------- src/qmmpui/translations/libqmmpui_ru.ts | 50 ++++++++++++++----------- src/qmmpui/translations/libqmmpui_sk.ts | 50 ++++++++++++++----------- src/qmmpui/translations/libqmmpui_tr.ts | 50 ++++++++++++++----------- src/qmmpui/translations/libqmmpui_uk_UA.ts | 50 ++++++++++++++----------- src/qmmpui/translations/libqmmpui_zh_CN.ts | 50 ++++++++++++++----------- src/qmmpui/translations/libqmmpui_zh_TW.ts | 50 ++++++++++++++----------- 40 files changed, 740 insertions(+), 547 deletions(-) diff --git a/src/app/builtincommandlineoption.cpp b/src/app/builtincommandlineoption.cpp index 6f8fae9c4..e5f5ed826 100644 --- a/src/app/builtincommandlineoption.cpp +++ b/src/app/builtincommandlineoption.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "builtincommandlineoption.h" @@ -93,6 +94,14 @@ void BuiltinCommandLineOption::executeCommand(const QString &option_string, else full_path_list << cwd + "/" + s; } + //default playlist + QmmpUiSettings *settings = QmmpUiSettings::instance(); + if(settings->useDefaultPlayList()) + { + if(!pl_manager->playListNames().contains(settings->defaultPlayListName())) + pl_manager->createPlayList(settings->defaultPlayListName()); + pl_manager->selectPlayList(settings->defaultPlayListName()); + } pl_manager->activatePlayList(pl_manager->selectedPlayList()); if(option_string.isEmpty()) //clear playlist if option is empty { diff --git a/src/app/translations/qmmp_cs.ts b/src/app/translations/qmmp_cs.ts index 4611b4ede..8eb0b25e2 100644 --- a/src/app/translations/qmmp_cs.ts +++ b/src/app/translations/qmmp_cs.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Skip forward in playlist Přejít vpřed v seznamu skladeb - + Skip backwards in playlist Přejít zpět v seznamu skladeb - + Start playing current song Spustit přehrávání aktuální skladby - + Don't clear the playlist Nevyprazdňovat seznam skladeb - + Pause current song Pozastavit aktuální skladbu - + Pause if playing, play otherwise Pozastavit, přehrává-li se, jinak přehrávat - + Stop current song Zastavit aktuální skladbu - + Display Jump to File dialog Zobrazit dialog Přeskočit na soubor - + Quit application - + Set playback volume (example: qmmp --volume 20) Nastavit hlasitost přehrávání (příklad: qmmp --volume 20) - + Show/hide application Zobrazit/skrýt aplikaci - + Display Add File dialog Zobrazit dialog Přidat soubor - + Display Add Directory dialog Zobrazit dialog Přidat adresář diff --git a/src/app/translations/qmmp_de.ts b/src/app/translations/qmmp_de.ts index 952bcc1f7..3d120cbe4 100644 --- a/src/app/translations/qmmp_de.ts +++ b/src/app/translations/qmmp_de.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Skip forward in playlist Nächsten Titel in Wiedergabeliste abspielen - + Skip backwards in playlist Vorherigen Titel in Wiedergabeliste abspielen - + Start playing current song Aktuellen Titel abspielen - + Don't clear the playlist Titel an Wiedergabeliste anhängen - + Pause current song Aktuellen Titel anhalten - + Pause if playing, play otherwise Wiedergabe anhalten oder fortsetzen - + Stop current song Aktuellen Titel stoppen - + Display Jump to File dialog „Springe zu Titel“-Dialog anzeigen - + Quit application Anwendung beenden - + Set playback volume (example: qmmp --volume 20) Lautstärke der Wiedergabe einstellen (Beispiel: qmmp --volume 20) - + Show/hide application Anwendung ein-/ausblenden - + Display Add File dialog „Datei hinzufügen“-Dialog anzeigen - + Display Add Directory dialog „Verzeichnis hinzufügen“-Dialog anzeigen diff --git a/src/app/translations/qmmp_es.ts b/src/app/translations/qmmp_es.ts index 21d19a84d..60bf0f645 100644 --- a/src/app/translations/qmmp_es.ts +++ b/src/app/translations/qmmp_es.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Skip forward in playlist Avanzar en la lista de reproducción - + Skip backwards in playlist Retroceder en la lista de reproducción - + Start playing current song Empezar reproduciendo la canción actual - + Don't clear the playlist No limpiar la lista de reproducción - + Pause current song Pausar la canción actual - + Pause if playing, play otherwise Pausar si se está reproduciendo, o viceversa - + Stop current song Detener la canción actual - + Display Jump to File dialog Mostrar el diálogo Saltar a archivo - + Quit application - + Set playback volume (example: qmmp --volume 20) Cambiar el volumen de reproducción (ejemplo: qmmp --volume 20) - + Show/hide application Mostrar/ocultar aplicación - + Display Add File dialog Mostrar el diálogo Añadir archivo - + Display Add Directory dialog Mostrar el diálogo Añadir directorio diff --git a/src/app/translations/qmmp_hu.ts b/src/app/translations/qmmp_hu.ts index dec1a8aac..c38e0072c 100644 --- a/src/app/translations/qmmp_hu.ts +++ b/src/app/translations/qmmp_hu.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Don't clear the playlist Ne töröld a lejátszási listát - + Start playing current song Aktuális szám lejátszásának indítása - + Pause current song Aktuális szám szüneteltetése - + Pause if playing, play otherwise Szünet ha lejátszás van, különben lejátszás - + Stop current song Aktuális szám megállítása - + Display Jump to File dialog Számra ugrás ablak mutatása - + Quit application - + Set playback volume (example: qmmp --volume 20) Lejátszási hangerő beállítása (pl.: qmmp --volume 20) - + Skip forward in playlist Lejátszási lista következő számának kihagyása - + Skip backwards in playlist Lejátszási lista előző számainak kihagyása - + Show/hide application Alkalmazás mutatása/elrejtése - + Display Add File dialog Fájl hozzáadása ablak mutatása - + Display Add Directory dialog Könyvtár hozzáadása ablak mutatása diff --git a/src/app/translations/qmmp_it.ts b/src/app/translations/qmmp_it.ts index 28cbda36a..cf4a84ed6 100644 --- a/src/app/translations/qmmp_it.ts +++ b/src/app/translations/qmmp_it.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Skip forward in playlist Scorri in avanti lista dei brani - + Skip backwards in playlist Scorri indietro la lista dei brani - + Start playing current song Inizia il brano scelto - + Don't clear the playlist Non ripulire la lista esecuzione - + Pause current song Sospendi il brano in esecuzione - + Pause if playing, play otherwise Sospendi il brano se in esecuzione; lo riprende se in pausa - + Stop current song Arresta il brano in esecuzione - + Display Jump to File dialog Mostra il menu «Vai al brano» - + Quit application - + Set playback volume (example: qmmp --volume 20) - + Show/hide application Mostra/nascondi Qmmp - + Display Add File dialog Mostra il menu «Aggiungi brani» - + Display Add Directory dialog Mostra il menu «Aggiungi cartella» diff --git a/src/app/translations/qmmp_ja.ts b/src/app/translations/qmmp_ja.ts index 0e79bf0cc..ab923a4a6 100644 --- a/src/app/translations/qmmp_ja.ts +++ b/src/app/translations/qmmp_ja.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Don't clear the playlist プレイリストをクリアしない - + Start playing current song 今の曲から再生を開始 - + Pause current song 今の曲で一時停止 - + Pause if playing, play otherwise 再生中なら一時停止、一時停止しておれば再生 - + Stop current song 今の曲で終止 - + Display Jump to File dialog 「ファイルを指定して即刻再生」ダイアログを表示 - + Quit application アプリケーションを終了 - + Set playback volume (example: qmmp --volume 20) 音量設定 (例: qmmp --volume 20) - + Skip forward in playlist プレイリストでの次の曲にスキップ - + Skip backwards in playlist プレイリストで前の曲にスキップ - + Show/hide application アプリケーションウィンドウを表示/非表示 - + Display Add File dialog 「ファイル追加」ダイアログを表示 - + Display Add Directory dialog 「ディレクトリ追加」ダイアログを表示 diff --git a/src/app/translations/qmmp_lt.ts b/src/app/translations/qmmp_lt.ts index b47fc8e38..c3c779c79 100644 --- a/src/app/translations/qmmp_lt.ts +++ b/src/app/translations/qmmp_lt.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Skip forward in playlist Eiti prie sekančio elemento - + Skip backwards in playlist Eiti prie ankstesnio elemento - + Start playing current song Groti dainą - + Don't clear the playlist Neišvalyti sąrašo - + Pause current song Pristabdyti dainą - + Pause if playing, play otherwise Pristabdyti/Groti - + Stop current song Sustabdyti dainą - + Display Jump to File dialog Parodyti langą bylos pasirinkimui - + Quit application - + Set playback volume (example: qmmp --volume 20) Nustatyti grojimo garsą (pvz: qmmp --volume 20) - + Show/hide application Parodyti/Slėpti programą - + Display Add File dialog Parodyti langą bylų pridėjimui - + Display Add Directory dialog Parodyti langą aplanko pridėjimui diff --git a/src/app/translations/qmmp_nl.ts b/src/app/translations/qmmp_nl.ts index 5b26ad810..9a9b71c39 100644 --- a/src/app/translations/qmmp_nl.ts +++ b/src/app/translations/qmmp_nl.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Skip forward in playlist Naar voren springen in afspeellijstb - + Skip backwards in playlist Naar achteren springen in afspeellijst - + Start playing current song Begin met afspelen van huidig nummer - + Don't clear the playlist Niet de afspellijst leeghalen - + Pause current song Pauzeer huidig nummer - + Pause if playing, play otherwise Pauzeer als er wordt gespeeld, anders spelen - + Stop current song Stop huidig nummer - + Display Jump to File dialog Toon Ga Naar Bestandsdialoog - + Quit application - + Set playback volume (example: qmmp --volume 20) Zet afspeelvolume (voorbeeld: qmmp --volume 20) - + Show/hide application Toon/verberg programma - + Display Add File dialog Toon venster om bestanden toe te voegen - + Display Add Directory dialog Toon venster om mappen toe te voegen diff --git a/src/app/translations/qmmp_pl_PL.ts b/src/app/translations/qmmp_pl_PL.ts index 9e33e7bad..901b876c5 100644 --- a/src/app/translations/qmmp_pl_PL.ts +++ b/src/app/translations/qmmp_pl_PL.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Skip forward in playlist Przeskocz do przodu na liście odtwarzania - + Skip backwards in playlist Przeskocz do tyłu na liście odtwarzania - + Start playing current song Zacznij odtwarzać bieżący utwór - + Don't clear the playlist Nie czyść listy - + Pause current song Wstrzymaj bieżący utwór - + Pause if playing, play otherwise Wstrzymaj jeśli odtwarza, odtwarzaj w przeciwnym wypadku - + Stop current song Zatrzymaj bieżący utwór - + Display Jump to File dialog Wyświetl okno dialogowe Skocz do - + Quit application Zamknij program - + Set playback volume (example: qmmp --volume 20) Ustaw głośność odtwarzania (np: qmmp --volume 20) - + Show/hide application Pokaż/ukryj aplikację - + Display Add File dialog Wyświetl okno dialogowe dodawania plików - + Display Add Directory dialog Wyświetl okno dialogowe dodawania katalogów diff --git a/src/app/translations/qmmp_pt_BR.ts b/src/app/translations/qmmp_pt_BR.ts index 9eaecc381..dad8f95bd 100644 --- a/src/app/translations/qmmp_pt_BR.ts +++ b/src/app/translations/qmmp_pt_BR.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Skip forward in playlist - + Skip backwards in playlist - + Start playing current song - + Don't clear the playlist - + Pause current song - + Pause if playing, play otherwise - + Stop current song - + Display Jump to File dialog - + Quit application - + Set playback volume (example: qmmp --volume 20) - + Show/hide application - + Display Add File dialog - + Display Add Directory dialog diff --git a/src/app/translations/qmmp_ru.ts b/src/app/translations/qmmp_ru.ts index 9d6209fe7..337da0f5d 100644 --- a/src/app/translations/qmmp_ru.ts +++ b/src/app/translations/qmmp_ru.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Skip forward in playlist Перейти к следующему фрагменту - + Skip backwards in playlist Перейти к предыдущему фрагменту - + Start playing current song Воспроизвести текущую песню - + Don't clear the playlist Не очищать лист - + Pause current song Приостановить текущую песню - + Pause if playing, play otherwise Приостановить/воспроизвести - + Stop current song Остановить текущую песню - + Display Jump to File dialog Показать диалог перехода к файлу - + Quit application Завершить приложение - + Set playback volume (example: qmmp --volume 20) Установить громкость (пример: qmmp --volume 20) - + Show/hide application Показать/скрыть приложение - + Display Add File dialog Показать диалог добавления файлов - + Display Add Directory dialog Показать диалог добавления директорий diff --git a/src/app/translations/qmmp_sk.ts b/src/app/translations/qmmp_sk.ts index d5b6fc3c4..3f5173608 100644 --- a/src/app/translations/qmmp_sk.ts +++ b/src/app/translations/qmmp_sk.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Skip forward in playlist Posunúť sa v plaliste - + Skip backwards in playlist Vrátiť sa v playliste - + Start playing current song Začať prehrávanie súčasnej piesne - + Don't clear the playlist Nevyčisťovať playlist - + Pause current song Pozastaviť súčasnú pieseň - + Pause if playing, play otherwise Pozastaviť ak hrá, inak hrať - + Stop current song Zastaviť súčasnú pieseň - + Display Jump to File dialog Zobraziť dialóg Preskočiť na súbor - + Quit application Ukončiť program - + Set playback volume (example: qmmp --volume 20) Nastaviť hlasitosť prehrávania (napríklad: qmmp --volume 20) - + Show/hide application Zobraziť/skryť program - + Display Add File dialog Zobraziť dialóg Pridať súbor - + Display Add Directory dialog Zobraziť dialóg Pridať priečinok diff --git a/src/app/translations/qmmp_tr.ts b/src/app/translations/qmmp_tr.ts index ada9911ee..55a1983f8 100644 --- a/src/app/translations/qmmp_tr.ts +++ b/src/app/translations/qmmp_tr.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Skip forward in playlist İleri atla - + Skip backwards in playlist Geri atla - + Start playing current song Mevcut şarkıyı çalmaya başla - + Don't clear the playlist Çalma listesini temizleme - + Pause current song Mevcut şarkıyı duraklat - + Pause if playing, play otherwise Çalıyorsa duraklat, değilse oynat - + Stop current song Mevcut şarkıyı durdur - + Display Jump to File dialog Dosyaya atlama diyaloğunu göster - + Quit application - + Set playback volume (example: qmmp --volume 20) - + Show/hide application Uygulamayı göster/gizle - + Display Add File dialog Dosya ekleme diyaloğunu göster - + Display Add Directory dialog Dizin ekleme diyaloğunu göster diff --git a/src/app/translations/qmmp_uk_UA.ts b/src/app/translations/qmmp_uk_UA.ts index 96d7cc481..7d38e3cb7 100644 --- a/src/app/translations/qmmp_uk_UA.ts +++ b/src/app/translations/qmmp_uk_UA.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Skip forward in playlist Перейти до наступного фрагменту - + Skip backwards in playlist Перейти до попереднього фрагменту - + Start playing current song Грати поточну пісню - + Don't clear the playlist Не очищати список - + Pause current song Призупитини поточну пісню - + Pause if playing, play otherwise Призупинити/відтворити - + Stop current song Зупитини поточну пісню - + Display Jump to File dialog Показати діалог переходу до файла - + Quit application Закрити програму - + Set playback volume (example: qmmp --volume 20) Встановити гучність (приклад: qmmp --volume 20) - + Show/hide application Показати/сховати програму - + Display Add File dialog Показати діалог додавання файлів - + Display Add Directory dialog Показати діалог додавання тек diff --git a/src/app/translations/qmmp_zh_CN.ts b/src/app/translations/qmmp_zh_CN.ts index dff65c444..814b9953a 100644 --- a/src/app/translations/qmmp_zh_CN.ts +++ b/src/app/translations/qmmp_zh_CN.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Skip forward in playlist 跳到播放列表中的下一曲 - + Skip backwards in playlist 跳到播放列表中的上一曲 - + Start playing current song 开始播放当前曲目 - + Don't clear the playlist 不要清除这个播放列表 - + Pause current song 暂停当前曲目 - + Pause if playing, play otherwise 正在播放则暂停,相反处于暂停则播放 - + Stop current song 停止当前曲目 - + Display Jump to File dialog 显示跳到文件对话 - + Quit application - + Set playback volume (example: qmmp --volume 20) 设置回放音量 (例如:qmmp --volume 20) - + Show/hide application 显示/隐藏程序 - + Display Add File dialog 显示添加文件对话 - + Display Add Directory dialog 显示添加文件夹对话 diff --git a/src/app/translations/qmmp_zh_TW.ts b/src/app/translations/qmmp_zh_TW.ts index c1d8b8a34..3cd23493f 100644 --- a/src/app/translations/qmmp_zh_TW.ts +++ b/src/app/translations/qmmp_zh_TW.ts @@ -4,67 +4,67 @@ BuiltinCommandLineOption - + Skip forward in playlist 跳到播放清單中的下一曲 - + Skip backwards in playlist 跳到播放清單中的上一曲 - + Start playing current song 開始播放目前曲目 - + Don't clear the playlist 不要清除這個播放清單 - + Pause current song 暫停目前曲目 - + Pause if playing, play otherwise 正在播放則暫停,相反處於暫停則播放 - + Stop current song 停止目前曲目 - + Display Jump to File dialog 察看跳到文件對話 - + Quit application - + Set playback volume (example: qmmp --volume 20) 設置回放音量 (例如:qmmp --volume 20) - + Show/hide application 察看/隱藏程式 - + Display Add File dialog 察看添加文件對話 - + Display Add Directory dialog 察看添加目錄對話 diff --git a/src/plugins/Ui/skinned/forms/shortcutdialog.ui b/src/plugins/Ui/skinned/forms/shortcutdialog.ui index db1cf466e..581b87559 100644 --- a/src/plugins/Ui/skinned/forms/shortcutdialog.ui +++ b/src/plugins/Ui/skinned/forms/shortcutdialog.ui @@ -13,7 +13,7 @@ Change Shortcut - + 6 diff --git a/src/plugins/Ui/skinned/forms/skinnedsettings.ui b/src/plugins/Ui/skinned/forms/skinnedsettings.ui index 49857d4b4..1aa67ae2b 100644 --- a/src/plugins/Ui/skinned/forms/skinnedsettings.ui +++ b/src/plugins/Ui/skinned/forms/skinnedsettings.ui @@ -23,7 +23,7 @@ Skins - + diff --git a/src/qmmpui/configdialog.cpp b/src/qmmpui/configdialog.cpp index 61740f09b..70eb83715 100644 --- a/src/qmmpui/configdialog.cpp +++ b/src/qmmpui/configdialog.cpp @@ -107,6 +107,9 @@ void ConfigDialog::readSettings() //directory filters m_ui->dirRestrictLineEdit->setText(guis->restrictFilters().join(";").trimmed()); m_ui->dirExcludeLineEdit->setText(guis->excludeFilters().join(";").trimmed()); + //default playlist + m_ui->defaultPlayListCheckBox->setChecked(guis->useDefaultPlayList()); + m_ui->defaultPlayListLineEdit->setText(guis->defaultPlayListName()); } //proxy settings QmmpSettings *gs = QmmpSettings::instance(); @@ -323,6 +326,8 @@ void ConfigDialog::saveSettings() guis->setResumeOnStartup(m_ui->continuePlaybackCheckBox->isChecked()); guis->setRestrictFilters(m_ui->dirRestrictLineEdit->text()); guis->setExcludeFilters(m_ui->dirExcludeLineEdit->text()); + guis->setDefaultPlayList(m_ui->defaultPlayListLineEdit->text(), + m_ui->defaultPlayListCheckBox->isChecked()); guis->sync(); } diff --git a/src/qmmpui/forms/configdialog.ui b/src/qmmpui/forms/configdialog.ui index 391bc4dde..eab1e78a1 100644 --- a/src/qmmpui/forms/configdialog.ui +++ b/src/qmmpui/forms/configdialog.ui @@ -442,7 +442,7 @@ Playback - + @@ -458,14 +458,14 @@ - + Add files from command line to this playlist: - + @@ -982,12 +982,12 @@ setEnabled(bool) - 357 - 177 + 616 + 271 - 372 - 200 + 654 + 296 @@ -998,12 +998,12 @@ setEnabled(bool) - 327 - 179 + 586 + 271 - 354 - 228 + 654 + 321 @@ -1014,12 +1014,28 @@ setEnabled(bool) - 301 - 177 + 560 + 271 - 419 - 255 + 458 + 346 + + + + + defaultPlayListCheckBox + toggled(bool) + defaultPlayListLineEdit + setEnabled(bool) + + + 457 + 226 + + + 580 + 227 diff --git a/src/qmmpui/playlistmanager.cpp b/src/qmmpui/playlistmanager.cpp index 08f1f1ad1..474d268ac 100644 --- a/src/qmmpui/playlistmanager.cpp +++ b/src/qmmpui/playlistmanager.cpp @@ -110,6 +110,13 @@ void PlayListManager::selectPlayList(int i) selectPlayList(playListAt(i)); } +void PlayListManager::selectPlayList(const QString &name) +{ + int index = playListNames().indexOf(name); + if(index >= 0) + selectPlayList(playListAt(index)); +} + void PlayListManager::selectNextPlayList() { int i = m_models.indexOf(m_selected); diff --git a/src/qmmpui/playlistmanager.h b/src/qmmpui/playlistmanager.h index 16bf5a7c6..0e2279701 100644 --- a/src/qmmpui/playlistmanager.h +++ b/src/qmmpui/playlistmanager.h @@ -138,6 +138,10 @@ public slots: * Selects playlist with index \b index. */ void selectPlayList(int index); + /*! + * Selects playlist with name \b name. + */ + void selectPlayList(const QString &name); /*! * Selects next playlist if possible. */ diff --git a/src/qmmpui/qmmpuisettings.cpp b/src/qmmpui/qmmpuisettings.cpp index a6a3945c3..c5e6da069 100644 --- a/src/qmmpui/qmmpuisettings.cpp +++ b/src/qmmpui/qmmpuisettings.cpp @@ -37,6 +37,8 @@ QmmpUiSettings::QmmpUiSettings(QObject *parent) : QObject(parent) m_resume_on_startup = s.value("General/resume_on_startup", false).toBool(); m_restrict_filters = s.value("General/restrict_filters").toStringList(); m_exclude_filters = s.value("General/exclude_filters", QStringList() << "*.cue").toStringList(); + m_use_default_pl = s.value("General/use_default_pl", false).toBool(); + m_default_pl_name = s.value("General/default_pl_name", tr("Playlist")).toString(); } QmmpUiSettings::~QmmpUiSettings() @@ -116,6 +118,8 @@ void QmmpUiSettings::sync() s.setValue("General/resume_on_startup", m_resume_on_startup); s.setValue("General/restrict_filters", m_restrict_filters); s.setValue("General/exclude_filters", m_exclude_filters); + s.setValue("General/use_default_pl", m_use_default_pl); + s.setValue("General/default_pl_name", m_default_pl_name); } QStringList QmmpUiSettings::restrictFilters() const @@ -138,9 +142,25 @@ void QmmpUiSettings::setExcludeFilters(const QString &filters) m_exclude_filters = filters.trimmed().split(";", QString::SkipEmptyParts); } +bool QmmpUiSettings::useDefaultPlayList() const +{ + return m_use_default_pl; +} + +QString QmmpUiSettings::defaultPlayListName() const +{ + return m_default_pl_name; +} + QmmpUiSettings * QmmpUiSettings::instance() { if(!m_instance) return new QmmpUiSettings(qApp); return m_instance; } + +void QmmpUiSettings::setDefaultPlayList(const QString &name, bool enabled) +{ + m_use_default_pl = enabled; + m_default_pl_name = name; +} diff --git a/src/qmmpui/qmmpuisettings.h b/src/qmmpui/qmmpuisettings.h index ca517c7a9..5d5863b91 100644 --- a/src/qmmpui/qmmpuisettings.h +++ b/src/qmmpui/qmmpuisettings.h @@ -104,15 +104,24 @@ public: */ void setExcludeFilters(const QString &filters); /*! - * Returns a pointer to the QmmpUiSettings instance. + * Returns \b true if defaut playlist is enabled, othewise returns \b false. + * Default playlist receives files from command line. */ - static QmmpUiSettings* instance(); - -signals: + bool useDefaultPlayList() const; /*! - * Emitted when other settings (format, metadata, etc) have changed. + * Returns default playlist name. */ - //void settingsChanged(); + QString defaultPlayListName() const; + /*! + * Sets default playlist options. + * @param name Default playlist name. + * @param enabled Default playlist state (\b true - enabled, \b false - disabled). + */ + void setDefaultPlayList(const QString &name, bool enabled = true); + /*! + * Returns a pointer to the QmmpUiSettings instance. + */ + static QmmpUiSettings* instance(); public slots: /*! @@ -120,7 +129,6 @@ public slots: */ void sync(); - private: static QmmpUiSettings* m_instance; //playlist @@ -130,6 +138,10 @@ private: //general bool m_resume_on_startup; QStringList m_exclude_filters, m_restrict_filters; + //default playlist + bool m_use_default_pl; + QString m_default_pl_name; + }; diff --git a/src/qmmpui/translations/libqmmpui_cs.ts b/src/qmmpui/translations/libqmmpui_cs.ts index a4744fdf7..b9db7cd97 100644 --- a/src/qmmpui/translations/libqmmpui_cs.ts +++ b/src/qmmpui/translations/libqmmpui_cs.ts @@ -87,13 +87,13 @@ Soubor - + Artist Umělec - + Album Album @@ -108,72 +108,72 @@ Vypnuto - + Transports Protokoly - + Decoders Dekodéry - + Engines Přehrávače - + Title Název - + Track number Číslo stopy - + Two-digit track number Dvoumístné číslo stopy - + Disc number Číslo disku - + Condition Stav - + Composer Skladatel - + File name Název souboru - + File path Cesta k souboru - + Genre Žánr - + Year Rok - + Comment Poznámka @@ -389,17 +389,17 @@ Heslo: - + Visualization Vizualizace - + Effects Efekty - + General Obecné @@ -560,12 +560,20 @@ p, li { white-space: pre-wrap; } PlayListManager - - + + Playlist Seznam skladeb + + QmmpUiSettings + + + Playlist + Seznam skladeb + + QtFileDialogFactory diff --git a/src/qmmpui/translations/libqmmpui_de.ts b/src/qmmpui/translations/libqmmpui_de.ts index 450710ab2..c2d8e54da 100644 --- a/src/qmmpui/translations/libqmmpui_de.ts +++ b/src/qmmpui/translations/libqmmpui_de.ts @@ -87,13 +87,13 @@ Dateiname - + Artist Interpret - + Album Album @@ -108,72 +108,72 @@ Deaktiviert - + Transports Transporte - + Decoders Dekoder - + Engines - + Title Titel - + Track number Stücknummer - + Two-digit track number Zweistellige Stücknummer - + Disc number CD-Nummer - + Condition Zustand - + Genre Genre - + Composer Komponist - + File name Dateiname - + File path Dateipfad - + Year Jahr - + Comment Kommentar @@ -389,17 +389,17 @@ Passwort: - + Visualization Visualisierung - + Effects Effekte - + General Sonstige @@ -560,12 +560,20 @@ p, li { white-space: pre-wrap; } PlayListManager - - + + Playlist Wiedergabeliste + + QmmpUiSettings + + + Playlist + Wiedergabeliste + + QtFileDialogFactory diff --git a/src/qmmpui/translations/libqmmpui_es.ts b/src/qmmpui/translations/libqmmpui_es.ts index 3072d50a5..2a39f819d 100644 --- a/src/qmmpui/translations/libqmmpui_es.ts +++ b/src/qmmpui/translations/libqmmpui_es.ts @@ -87,13 +87,13 @@ Nombre del archivo - + Artist Intérprete - + Album Album @@ -108,72 +108,72 @@ Deshabilitado - + Transports Transportes - + Decoders Decodificadores - + Engines Motores - + Title Título - + Track number Número de pista - + Two-digit track number Número de pista con dos cifras - + Disc number Número de disco - + Condition Condición - + Genre Género - + Composer Compositor - + File name Nombre del archivo - + File path Ruta del archivo - + Year Año - + Comment Comentario @@ -242,17 +242,17 @@ Conectividad - + Visualization Visualización - + Effects Efectos - + General General @@ -560,12 +560,20 @@ p, li { white-space: pre-wrap; } PlayListManager - - + + Playlist Lista de reproducción + + QmmpUiSettings + + + Playlist + Lista de reproducción + + QtFileDialogFactory diff --git a/src/qmmpui/translations/libqmmpui_it.ts b/src/qmmpui/translations/libqmmpui_it.ts index 9eefbabf8..3bcdf5210 100644 --- a/src/qmmpui/translations/libqmmpui_it.ts +++ b/src/qmmpui/translations/libqmmpui_it.ts @@ -87,13 +87,13 @@ File - + Artist Interprete - + Album Album @@ -108,72 +108,72 @@ Disabilitato - + Transports Protocolli di trasporto - + Decoders Decodificatori - + Engines Meccanismi - + Title Titolo - + Track number Traccia n° - + Two-digit track number Traccia n° a due cifre - + Disc number Disco n° - + Condition Condizione - + Genre Genere - + Composer Compositore - + File name Nome file - + File path Percorso file - + Year Anno - + Comment Commento @@ -242,17 +242,17 @@ Connettività - + Visualization Visualizzazione - + Effects Effetti - + General Generale @@ -560,12 +560,20 @@ p, li { white-space: pre-wrap; } PlayListManager - - + + Playlist Lista esecuzione + + QmmpUiSettings + + + Playlist + + + QtFileDialogFactory diff --git a/src/qmmpui/translations/libqmmpui_ja.ts b/src/qmmpui/translations/libqmmpui_ja.ts index e10765027..10102b9c1 100644 --- a/src/qmmpui/translations/libqmmpui_ja.ts +++ b/src/qmmpui/translations/libqmmpui_ja.ts @@ -325,7 +325,7 @@ - + Album アルバム @@ -335,92 +335,92 @@ 無効 - + Transports 転送 - + Decoders デコーダー - + Engines エンジン - + Effects 音響効果 - + Visualization 視覚効果 - + General 一般 - + Artist アーティスト - + Title タイトル - + Track number トラック番号 - + Two-digit track number トラック番号 数字2桁 - + Genre ジャンル - + Comment コメント - + Composer 作曲者 - + Disc number ディスク番号 - + File name ファイル名 - + File path ファイルパス - + Year - + Condition 定番 @@ -560,12 +560,20 @@ p, li { white-space: pre-wrap; } PlayListManager - - + + Playlist プレイリスト + + QmmpUiSettings + + + Playlist + プレイリスト + + QtFileDialogFactory diff --git a/src/qmmpui/translations/libqmmpui_lt.ts b/src/qmmpui/translations/libqmmpui_lt.ts index 00edfd107..b4d058472 100644 --- a/src/qmmpui/translations/libqmmpui_lt.ts +++ b/src/qmmpui/translations/libqmmpui_lt.ts @@ -87,13 +87,13 @@ Bylos pavadinimas - + Artist Atlikėjas - + Album Albumas @@ -108,72 +108,72 @@ Išjungta - + Transports Transportas - + Decoders Dekoderiai - + Engines Varikliai - + Title Pavadinimas - + Track number Takelio numeris - + Two-digit track number Dviejų skaičių takelio numeris - + Disc number Disko numeris - + Condition Būklė - + Composer Autorius - + File name Bylos pavadinimas - + File path Bylos kelias - + Genre Žanras - + Year Metai - + Comment Komentaras @@ -242,17 +242,17 @@ Tinklas - + Visualization Vizualizacija - + Effects Efektai - + General Bendri @@ -561,12 +561,20 @@ p, li { white-space: pre-wrap; } PlayListManager - - + + Playlist Grojaraštis + + QmmpUiSettings + + + Playlist + Grojaraštis + + QtFileDialogFactory diff --git a/src/qmmpui/translations/libqmmpui_nl.ts b/src/qmmpui/translations/libqmmpui_nl.ts index e0d56f739..cedda09a3 100644 --- a/src/qmmpui/translations/libqmmpui_nl.ts +++ b/src/qmmpui/translations/libqmmpui_nl.ts @@ -87,13 +87,13 @@ Bestandsnaam - + Artist Artiest - + Album Album @@ -108,72 +108,72 @@ Uitgeschakeld - + Transports Protocols - + Decoders Decoders - + Engines Engines - + Title Naam - + Track number Liednummer - + Two-digit track number Twee-getal liednummer - + Disc number CD nummer - + Condition Staat - + Composer Componist - + File name Bestandsnaam - + File path Pad - + Genre Genre - + Year Jaar - + Comment Commentaar @@ -389,17 +389,17 @@ Proxy wachtwoord: - + Visualization Visualisatie - + Effects Effecten - + General Algemeen @@ -560,12 +560,20 @@ p, li { white-space: pre-wrap; } PlayListManager - - + + Playlist Afspeellijst + + QmmpUiSettings + + + Playlist + Afspeellijst + + QtFileDialogFactory diff --git a/src/qmmpui/translations/libqmmpui_pl_PL.ts b/src/qmmpui/translations/libqmmpui_pl_PL.ts index 6f0ab5c0a..5d637837a 100644 --- a/src/qmmpui/translations/libqmmpui_pl_PL.ts +++ b/src/qmmpui/translations/libqmmpui_pl_PL.ts @@ -87,13 +87,13 @@ Nazwa pliku - + Artist Artysta - + Album Album @@ -108,72 +108,72 @@ Wyłączone - + Transports Transporty - + Decoders Dekodery - + Engines Silniki - + Title Tytuł - + Track number Numer utworu - + Two-digit track number Dwuznakowy numer utworu - + Disc number Numer albumu - + Condition Warunek - + Genre Gatunek - + Composer Kompozytor - + File name Nazwa pliku - + File path Lokalizacja - + Year Rok - + Comment Komentarz @@ -242,17 +242,17 @@ Sieć - + Visualization Wizualizacje - + Effects Efekty - + General Ogólne @@ -556,12 +556,20 @@ p, li { white-space: pre-wrap; } PlayListManager - - + + Playlist Lista odtwarzania + + QmmpUiSettings + + + Playlist + Lista odtwarzania + + QtFileDialogFactory diff --git a/src/qmmpui/translations/libqmmpui_pt_BR.ts b/src/qmmpui/translations/libqmmpui_pt_BR.ts index 1a58e349e..1b56ba043 100644 --- a/src/qmmpui/translations/libqmmpui_pt_BR.ts +++ b/src/qmmpui/translations/libqmmpui_pt_BR.ts @@ -87,13 +87,13 @@ Nome do Arquivo - + Artist Artista - + Album Álbum @@ -108,72 +108,72 @@ - + Transports - + Decoders - + Engines - + Title Título - + Track number - + Two-digit track number - + Disc number - + Condition - + Genre Gênero - + Composer - + File name - + File path - + Year Ano - + Comment Comentário @@ -242,17 +242,17 @@ - + Visualization - + Effects - + General @@ -556,8 +556,16 @@ p, li { white-space: pre-wrap; } PlayListManager - - + + + Playlist + Lista de músicas + + + + QmmpUiSettings + + Playlist Lista de músicas diff --git a/src/qmmpui/translations/libqmmpui_ru.ts b/src/qmmpui/translations/libqmmpui_ru.ts index bca15818c..f73beb290 100644 --- a/src/qmmpui/translations/libqmmpui_ru.ts +++ b/src/qmmpui/translations/libqmmpui_ru.ts @@ -87,13 +87,13 @@ Имя файла - + Artist Исполнитель - + Album Альбом @@ -108,72 +108,72 @@ Отключено - + Transports Транспорты - + Decoders Декодеры - + Engines Внешние проигрыватели - + Title Название - + Track number Номер трека - + Two-digit track number 2-x разрядный номер трека - + Disc number Номер диска - + Condition Условие - + Genre Жанр - + Composer Композитор - + File name Имя файла - + File path Путь к файлу - + Year Год - + Comment Комментарий @@ -242,17 +242,17 @@ Сеть - + Visualization Визуализация - + Effects Эффекты - + General Общие @@ -556,12 +556,20 @@ p, li { white-space: pre-wrap; } PlayListManager - - + + Playlist Список + + QmmpUiSettings + + + Playlist + Список + + QtFileDialogFactory diff --git a/src/qmmpui/translations/libqmmpui_sk.ts b/src/qmmpui/translations/libqmmpui_sk.ts index 788b11d6a..ee189d8c6 100644 --- a/src/qmmpui/translations/libqmmpui_sk.ts +++ b/src/qmmpui/translations/libqmmpui_sk.ts @@ -87,13 +87,13 @@ Názov súboru - + Artist Interprét - + Album Album @@ -108,72 +108,72 @@ Zakázané - + Transports Protokoly - + Decoders Dekodéry - + Engines Prehrávače - + Title Názov - + Track number Číslo skladby - + Two-digit track number Dvojmiestne číslo skladby - + Disc number Číslo disku - + Condition Stav - + Composer Skladateľ - + File name Názov súboru - + File path Cesta k súboru - + Genre Žáner - + Year Rok - + Comment Poznámka @@ -389,17 +389,17 @@ Proxy heslo: - + Visualization Vizualizácie - + Effects Efekty - + General Všeobecné @@ -556,8 +556,16 @@ p, li { white-space: pre-wrap; } PlayListManager - - + + + Playlist + Playlist + + + + QmmpUiSettings + + Playlist Playlist diff --git a/src/qmmpui/translations/libqmmpui_tr.ts b/src/qmmpui/translations/libqmmpui_tr.ts index 619579c6e..6f80878d6 100644 --- a/src/qmmpui/translations/libqmmpui_tr.ts +++ b/src/qmmpui/translations/libqmmpui_tr.ts @@ -87,13 +87,13 @@ Dosya adı - + Artist Sanatçı - + Album Albüm @@ -108,72 +108,72 @@ - + Transports - + Decoders - + Engines - + Title Başlık - + Track number - + Two-digit track number - + Disc number - + Condition - + Genre Tarz - + Composer - + File name - + File path - + Year Yıl - + Comment Yorum @@ -242,17 +242,17 @@ Bağlanırlık - + Visualization Görsellik - + Effects Efektler - + General Genel @@ -556,8 +556,16 @@ p, li { white-space: pre-wrap; } PlayListManager - - + + + Playlist + Çalma Listesi + + + + QmmpUiSettings + + Playlist Çalma Listesi diff --git a/src/qmmpui/translations/libqmmpui_uk_UA.ts b/src/qmmpui/translations/libqmmpui_uk_UA.ts index 5d18ddfaf..414191846 100644 --- a/src/qmmpui/translations/libqmmpui_uk_UA.ts +++ b/src/qmmpui/translations/libqmmpui_uk_UA.ts @@ -87,13 +87,13 @@ Ім'я файлу - + Artist Виконавець - + Album Альбом @@ -108,72 +108,72 @@ Вимкнено - + Transports Транспорти - + Decoders Декодери - + Engines Зовнішні програвачі - + Title Назва - + Track number Номер треку - + Two-digit track number 2- розрядний номер трека - + Disc number Номер диску - + Condition Умова - + Genre Жанр - + Composer Композитор - + File name Ім'я файлу - + File path Шлях файлу - + Year Рік - + Comment Коментар @@ -242,17 +242,17 @@ Мережа - + Visualization Візуалізація - + Effects Ефекти - + General Загальне @@ -556,12 +556,20 @@ p, li { white-space: pre-wrap; } PlayListManager - - + + Playlist Список + + QmmpUiSettings + + + Playlist + Список + + QtFileDialogFactory diff --git a/src/qmmpui/translations/libqmmpui_zh_CN.ts b/src/qmmpui/translations/libqmmpui_zh_CN.ts index a0c54881f..bb08fc332 100644 --- a/src/qmmpui/translations/libqmmpui_zh_CN.ts +++ b/src/qmmpui/translations/libqmmpui_zh_CN.ts @@ -87,13 +87,13 @@ 文件名 - + Artist 艺术家 - + Album 专辑 @@ -108,72 +108,72 @@ - + Transports - + Decoders - + Engines - + Title 标题 - + Track number 音轨编号 - + Two-digit track number 两位数音轨编号 - + Disc number 光盘编号 - + Condition 条件 - + Genre 流派 - + Composer 作曲 - + File name 文件名 - + File path 文件路径 - + Year 年代 - + Comment 备注 @@ -242,17 +242,17 @@ 连接 - + Visualization 可视化 - + Effects 特效 - + General 常规 @@ -556,12 +556,20 @@ p, li { white-space: pre-wrap; } PlayListManager - - + + Playlist 播放列表 + + QmmpUiSettings + + + Playlist + 播放列表 + + QtFileDialogFactory diff --git a/src/qmmpui/translations/libqmmpui_zh_TW.ts b/src/qmmpui/translations/libqmmpui_zh_TW.ts index 0619463ef..45c57e817 100644 --- a/src/qmmpui/translations/libqmmpui_zh_TW.ts +++ b/src/qmmpui/translations/libqmmpui_zh_TW.ts @@ -87,13 +87,13 @@ 檔名 - + Artist 藝術家 - + Album 專輯 @@ -108,72 +108,72 @@ - + Transports - + Decoders - + Engines - + Title 標題 - + Track number 音軌編號 - + Two-digit track number 兩位數音軌編號 - + Disc number 光槃編號 - + Condition 條件 - + Genre 流派 - + Composer 作曲 - + File name 文件名 - + File path 文件路徑 - + Year 年代 - + Comment 備註 @@ -242,17 +242,17 @@ 連線 - + Visualization 可視化 - + Effects 特效 - + General 常規 @@ -556,12 +556,20 @@ p, li { white-space: pre-wrap; } PlayListManager - - + + Playlist 播放清單 + + QmmpUiSettings + + + Playlist + 播放清單 + + QtFileDialogFactory -- cgit v1.2.3-13-gbd6f