diff --git a/data/data.qrc b/data/data.qrc index 6b4581d2d..8f65f7ea8 100644 --- a/data/data.qrc +++ b/data/data.qrc @@ -274,5 +274,6 @@ providers/mtvmusic.png providers/cdbaby.png providers/echonest.png + lumberjacksong.txt diff --git a/data/lumberjacksong.txt b/data/lumberjacksong.txt new file mode 100644 index 000000000..b303f4693 --- /dev/null +++ b/data/lumberjacksong.txt @@ -0,0 +1,49 @@ +Leaping from tree to tree! As they float down the mighty rivers +of British Columbia! With my best girl by my side! +The Larch! +The Pine! +The Giant Redwood tree! +The Sequoia! +The Little Whopping Rule Tree! +We'd sing! Sing! Sing! + +Oh, I'm a lumberjack, and I'm okay, +I sleep all night and I work all day. + +CHORUS: He's a lumberjack, and he's okay, + He sleeps all night and he works all day. + +I cut down trees, I eat my lunch, +I go to the lavatree. +On Wednesdays I go shoppin' +And have buttered scones for tea. + +Mounties: He cuts down trees, he eats his lunch, + He goes to the lavatree. + On Wednesdays he goes shoppin' + And has buttered scones for tea. + +CHORUS + +I cut down trees, I skip and jump, +I like to press wild flowers. +I put on women's clothing, +And hang around in bars. + +Mounties: He cuts down trees, he skips and jumps, + He likes to press wild flowers. + He puts on women's clothing + And hangs around.... In bars??????? + +CHORUS + +I chop down trees, I wear high heels, +Suspenders and a bra. +I wish I'd been a girlie +Just like my dear papa. + +Mounties: He cuts down trees, he wears high heels + Suspenders and a .... a Bra???? + (mounties break off song, and begin insulting lumberjack) + +Girl: I thought you were so rugged! diff --git a/src/songinfo/songinfobase.cpp b/src/songinfo/songinfobase.cpp index 3510f63b4..0eaecd6e6 100644 --- a/src/songinfo/songinfobase.cpp +++ b/src/songinfo/songinfobase.cpp @@ -193,3 +193,13 @@ void SongInfoBase::SectionToggled(bool value) { s.beginGroup(kSettingsGroup); s.setValue(pane->data().id_, value); } + +void SongInfoBase::ReloadSettings() { + foreach (CollapsibleInfoPane* pane, sections_) { + QWidget* contents = pane->data().contents_; + if (!contents) + continue; + + QMetaObject::invokeMethod(contents, "ReloadSettings"); + } +} diff --git a/src/songinfo/songinfobase.h b/src/songinfo/songinfobase.h index 8dbf908b5..2b10a8368 100644 --- a/src/songinfo/songinfobase.h +++ b/src/songinfo/songinfobase.h @@ -42,7 +42,7 @@ public: public slots: void SongChanged(const Song& metadata); void SongFinished(); - virtual void ReloadSettings() {} + virtual void ReloadSettings(); protected: void showEvent(QShowEvent* e); diff --git a/src/songinfo/songinfoview.cpp b/src/songinfo/songinfoview.cpp index a839e24c4..94d5b9252 100644 --- a/src/songinfo/songinfoview.cpp +++ b/src/songinfo/songinfoview.cpp @@ -130,6 +130,8 @@ void SongInfoView::ReloadSettings() { provider->set_enabled(false); } } + + SongInfoBase::ReloadSettings(); } SongInfoProvider* SongInfoView::ProviderByName(const QString& name) const { diff --git a/src/translations/ar.po b/src/translations/ar.po index 1e955631e..615bef15a 100644 --- a/src/translations/ar.po +++ b/src/translations/ar.po @@ -20,6 +20,9 @@ msgstr "" msgid " ms" msgstr "" +msgid " pt" +msgstr "" + msgid " seconds" msgstr "" @@ -256,6 +259,9 @@ msgstr "" msgid "And:" msgstr "" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "" @@ -836,6 +842,9 @@ msgstr "المستوى الأول" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/bg.po b/src/translations/bg.po index b761ae6f4..1ea9089ae 100644 --- a/src/translations/bg.po +++ b/src/translations/bg.po @@ -21,6 +21,9 @@ msgstr "" msgid " ms" msgstr "" +msgid " pt" +msgstr "" + msgid " seconds" msgstr "" @@ -257,6 +260,9 @@ msgstr "" msgid "And:" msgstr "" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "" @@ -837,6 +843,9 @@ msgstr "" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/ca.po b/src/translations/ca.po index 5645d6cec..4ab9782f5 100644 --- a/src/translations/ca.po +++ b/src/translations/ca.po @@ -21,6 +21,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " segons" @@ -265,6 +268,9 @@ msgstr "Un error desconegut de last.fm ha ocorregut: %1" msgid "And:" msgstr "I:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Afegir fitxers/URLs a la llista de reproducció" @@ -857,6 +863,9 @@ msgstr "Primer nivell" msgid "Flac" msgstr "FLAC" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "Oblidar dispositiu" diff --git a/src/translations/cs.po b/src/translations/cs.po index ed65f910e..be9798ca4 100644 --- a/src/translations/cs.po +++ b/src/translations/cs.po @@ -22,6 +22,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " sekund" @@ -258,6 +261,9 @@ msgstr "" msgid "And:" msgstr "" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "" @@ -840,6 +846,9 @@ msgstr "První úroveň" msgid "Flac" msgstr "Flac" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/da.po b/src/translations/da.po index 17f953a71..ea2367835 100644 --- a/src/translations/da.po +++ b/src/translations/da.po @@ -22,6 +22,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " sekunder" @@ -258,6 +261,9 @@ msgstr "Der er sket en ukendt last.fm fejl: %1" msgid "And:" msgstr "Og:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Tilføj filer/URL'er til spillelisten" @@ -840,6 +846,9 @@ msgstr "Første niveau" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/de.po b/src/translations/de.po index 0ceaea099..fe9bf2354 100644 --- a/src/translations/de.po +++ b/src/translations/de.po @@ -22,6 +22,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " Sekunden" @@ -264,6 +267,9 @@ msgstr "Unbekannter Last.fm Fehler: %1" msgid "And:" msgstr "Und:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Dateien/URLs an die Wiedergabeliste anhängen" @@ -856,6 +862,9 @@ msgstr "Erste Stufe" msgid "Flac" msgstr "FLAC" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "Gerät vergessen" diff --git a/src/translations/el.po b/src/translations/el.po index 0d0a03f13..158195c27 100644 --- a/src/translations/el.po +++ b/src/translations/el.po @@ -23,6 +23,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " δευτερόλεπτα" @@ -265,6 +268,9 @@ msgstr "Προέκυψε ένα άγνωστο σφάλμα στο last.fm: %1" msgid "And:" msgstr "Και:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Προσάρτηση αρχείων/URLs στην λίστα αναπαραγωγής" @@ -861,6 +867,9 @@ msgstr "Πρώτο επίπεδο" msgid "Flac" msgstr "Flac" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "«Ξέχνα» την συσκευή" diff --git a/src/translations/en_CA.po b/src/translations/en_CA.po index bd04ef8d6..eb313c733 100644 --- a/src/translations/en_CA.po +++ b/src/translations/en_CA.po @@ -20,6 +20,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " seconds" @@ -256,6 +259,9 @@ msgstr "An unknown Last.fm error occurred: %1" msgid "And:" msgstr "" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Append files/URLs to the playlist" @@ -839,6 +845,9 @@ msgstr "First level" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/en_GB.po b/src/translations/en_GB.po index 05e06164d..c8fc2cbe1 100644 --- a/src/translations/en_GB.po +++ b/src/translations/en_GB.po @@ -20,6 +20,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " seconds" @@ -256,6 +259,9 @@ msgstr "" msgid "And:" msgstr "" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Append files/URLs to the playlist" @@ -837,6 +843,9 @@ msgstr "First level" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/es.po b/src/translations/es.po index 3fec11159..91f76f6ea 100644 --- a/src/translations/es.po +++ b/src/translations/es.po @@ -22,6 +22,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " segundos" @@ -265,6 +268,9 @@ msgstr "Un error desconocido de last.fm ha ocurrido: %1" msgid "And:" msgstr "Y:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Agregar archivos/URLs a la lista de reproducción" @@ -859,6 +865,9 @@ msgstr "Primer nivel" msgid "Flac" msgstr "Flac" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "Olvidar dispositivo" diff --git a/src/translations/fi.po b/src/translations/fi.po index 90993bdb0..4372ef6c8 100644 --- a/src/translations/fi.po +++ b/src/translations/fi.po @@ -21,6 +21,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " sekuntia" @@ -257,6 +260,9 @@ msgstr "Tuntematon last.fm-virhe: %1" msgid "And:" msgstr "" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "" @@ -837,6 +843,9 @@ msgstr "" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/fr.po b/src/translations/fr.po index b29d0a54a..0285ce2be 100644 --- a/src/translations/fr.po +++ b/src/translations/fr.po @@ -22,6 +22,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " secondes" @@ -268,6 +271,9 @@ msgstr "Une erreur inconnue de last.fm est survenue : %1" msgid "And:" msgstr "Et :" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Ajouter des fichiers/URLs à la liste de lecture" @@ -863,6 +869,9 @@ msgstr "Premier niveau" msgid "Flac" msgstr "Flac" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "Oublier ce périphérique" diff --git a/src/translations/gl.po b/src/translations/gl.po index 043b4f774..5f5ee90f7 100644 --- a/src/translations/gl.po +++ b/src/translations/gl.po @@ -21,6 +21,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " segundos" @@ -257,6 +260,9 @@ msgstr "Un erro descoñecido de last.fm aconteceu: %1" msgid "And:" msgstr "E:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Agregar arquivos/URLs á lista de reproducción" @@ -841,6 +847,9 @@ msgstr "" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/hu.po b/src/translations/hu.po index caff793c8..cc543b93a 100644 --- a/src/translations/hu.po +++ b/src/translations/hu.po @@ -21,6 +21,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " másodperc" @@ -262,6 +265,9 @@ msgstr "Ismeretlen Last.fm hiba történt: %1" msgid "And:" msgstr "És:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Fájlok/URL-ek hozzáadása a lejátszási listához" @@ -856,6 +862,9 @@ msgstr "Első szinten" msgid "Flac" msgstr "FLAC" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "Eszköz elfelejtése" diff --git a/src/translations/it.po b/src/translations/it.po index 0584f7640..d9ff91321 100644 --- a/src/translations/it.po +++ b/src/translations/it.po @@ -22,6 +22,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " secondi" @@ -269,6 +272,9 @@ msgstr "Si è verificato un errore di last.fm: %1" msgid "And:" msgstr "E:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Aggiungi file/URL alla scaletta" @@ -861,6 +867,9 @@ msgstr "Primo livello" msgid "Flac" msgstr "Flac" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "Elimina dispositivo" diff --git a/src/translations/kk.po b/src/translations/kk.po index 345df02b1..33e6e17a5 100644 --- a/src/translations/kk.po +++ b/src/translations/kk.po @@ -20,6 +20,9 @@ msgstr "" msgid " ms" msgstr "" +msgid " pt" +msgstr "" + msgid " seconds" msgstr "" @@ -256,6 +259,9 @@ msgstr "" msgid "And:" msgstr "" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "" @@ -836,6 +842,9 @@ msgstr "" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/lt.po b/src/translations/lt.po index f87fbeffb..d184f3cc9 100644 --- a/src/translations/lt.po +++ b/src/translations/lt.po @@ -21,6 +21,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " sekundžių" @@ -257,6 +260,9 @@ msgstr "" msgid "And:" msgstr "" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "" @@ -837,6 +843,9 @@ msgstr "" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/nb.po b/src/translations/nb.po index 4e1942bcb..0016feecc 100644 --- a/src/translations/nb.po +++ b/src/translations/nb.po @@ -21,6 +21,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " sekunder" @@ -257,6 +260,9 @@ msgstr "" msgid "And:" msgstr "" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "" @@ -838,6 +844,9 @@ msgstr "Første nivå" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/nl.po b/src/translations/nl.po index f77d8f665..78f63ad2f 100644 --- a/src/translations/nl.po +++ b/src/translations/nl.po @@ -21,6 +21,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " seconden" @@ -265,6 +268,9 @@ msgstr "Er is een onbekende last.fm fout opgetreden: %1" msgid "And:" msgstr "En:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Bestanden/URLs aan afspeellijst toevoegen" @@ -857,6 +863,9 @@ msgstr "Eerste niveau" msgid "Flac" msgstr "Flac" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "Apparaat vergeten" diff --git a/src/translations/oc.po b/src/translations/oc.po index a52a92166..ee54642d7 100644 --- a/src/translations/oc.po +++ b/src/translations/oc.po @@ -20,6 +20,9 @@ msgstr "" msgid " ms" msgstr " mseg" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " segondas" @@ -256,6 +259,9 @@ msgstr "" msgid "And:" msgstr "" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "" @@ -836,6 +842,9 @@ msgstr "Primièr nivèl" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/pl.po b/src/translations/pl.po index 5b3606a01..5eeacac97 100644 --- a/src/translations/pl.po +++ b/src/translations/pl.po @@ -22,6 +22,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " sekundy" @@ -265,6 +268,9 @@ msgstr "Wystąpił nieznany błąd last.fm: %1" msgid "And:" msgstr "I:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Dodaj pliki/adresy URL do listy odtwarzania" @@ -856,6 +862,9 @@ msgstr "Pierwszy poziom" msgid "Flac" msgstr "Flac" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "Zapomnij o urządzeniu" diff --git a/src/translations/pt.po b/src/translations/pt.po index 9d84dade1..a545cc465 100644 --- a/src/translations/pt.po +++ b/src/translations/pt.po @@ -23,6 +23,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " segundos" @@ -264,6 +267,9 @@ msgstr "Ocorreu um erro last.fm desconhecido: %1" msgid "And:" msgstr "E:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Colocar os ficheiros/URLs na lista de reprodução" @@ -857,6 +863,9 @@ msgstr "Primeiro nível" msgid "Flac" msgstr "Flac" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "Ignorar dispositivo" diff --git a/src/translations/pt_BR.po b/src/translations/pt_BR.po index 8cbd62a99..c601b3429 100644 --- a/src/translations/pt_BR.po +++ b/src/translations/pt_BR.po @@ -21,6 +21,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " segundos" @@ -262,6 +265,9 @@ msgstr "Ocorreu um erro desconhecido no Last.fm %1" msgid "And:" msgstr "E:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Acrescentar arquivos/sites para a lista de reprodução" @@ -850,6 +856,9 @@ msgstr "Primeiro nível" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/ro.po b/src/translations/ro.po index a511ba3da..7dcd1024f 100644 --- a/src/translations/ro.po +++ b/src/translations/ro.po @@ -20,6 +20,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " secunde" @@ -256,6 +259,9 @@ msgstr "" msgid "And:" msgstr "" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "" @@ -836,6 +842,9 @@ msgstr "Primul nivel" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/ru.po b/src/translations/ru.po index 7ec1d9f6a..4a4717d4a 100644 --- a/src/translations/ru.po +++ b/src/translations/ru.po @@ -20,6 +20,9 @@ msgstr "" msgid " ms" msgstr " мс" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " секунд" @@ -260,6 +263,9 @@ msgstr "Неизвестная ошибка last.fm: %1" msgid "And:" msgstr "И:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Добавить файлы/URLs в список воспроизведения" @@ -850,6 +856,9 @@ msgstr "Первый уровень" msgid "Flac" msgstr "FLAC" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "\"Забыть\" устройство" diff --git a/src/translations/sk.po b/src/translations/sk.po index 605f69641..2ffd2378c 100644 --- a/src/translations/sk.po +++ b/src/translations/sk.po @@ -22,6 +22,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " sekundy" @@ -262,6 +265,9 @@ msgstr "Vyskytla sa neznáma last.fm chyba: %1" msgid "And:" msgstr "A:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Pridať súbory/URLy do playlistu" @@ -854,6 +860,9 @@ msgstr "Prvá úroveň" msgid "Flac" msgstr "Flac" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "Zabudnúť na zariadenie" diff --git a/src/translations/sl.po b/src/translations/sl.po index 3369efe05..8eb8bdfe8 100644 --- a/src/translations/sl.po +++ b/src/translations/sl.po @@ -21,6 +21,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " sekund" @@ -261,6 +264,9 @@ msgstr "Zgodila se je neznana napaka last.fm: %1" msgid "And:" msgstr "In:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Pripni datoteke/povezave seznamu predvajanja" @@ -853,6 +859,9 @@ msgstr "Prva raven" msgid "Flac" msgstr "FLAC" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "Pozabi napravo" diff --git a/src/translations/sr.po b/src/translations/sr.po index 3565eafb2..b695e61b5 100644 --- a/src/translations/sr.po +++ b/src/translations/sr.po @@ -21,6 +21,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " секунди" @@ -257,6 +260,9 @@ msgstr "Непозната ЛастФМ грешка: %1" msgid "And:" msgstr "И:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Додај нумере/УРЛ токове у листу нумера" @@ -840,6 +846,9 @@ msgstr "Први ниво" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "Заборави уређај" diff --git a/src/translations/sv.po b/src/translations/sv.po index 29c395f0d..8b54e1b09 100644 --- a/src/translations/sv.po +++ b/src/translations/sv.po @@ -21,6 +21,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " sekunder" @@ -257,6 +260,9 @@ msgstr "Ett okänt last.fm fel inträffade: %1" msgid "And:" msgstr "Och:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Lägg till filer/webbadresser till spellistan" @@ -843,6 +849,9 @@ msgstr "Första nivån" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "Glöm enhet" diff --git a/src/translations/tr.po b/src/translations/tr.po index 7da4250a9..ee584f7a2 100644 --- a/src/translations/tr.po +++ b/src/translations/tr.po @@ -21,6 +21,9 @@ msgstr "" msgid " ms" msgstr " ms" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " saniye" @@ -261,6 +264,9 @@ msgstr "Bilinmeyen bir last.fm hatası oluştu: %1" msgid "And:" msgstr "Ve:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Çalma listesine dosya/URL ekle" @@ -853,6 +859,9 @@ msgstr "İlk Seviye" msgid "Flac" msgstr "Flac" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "Aygıtı unut" diff --git a/src/translations/translations.pot b/src/translations/translations.pot index a66266f64..d7cc76c47 100644 --- a/src/translations/translations.pot +++ b/src/translations/translations.pot @@ -11,6 +11,9 @@ msgstr "" msgid " ms" msgstr "" +msgid " pt" +msgstr "" + msgid " seconds" msgstr "" @@ -247,6 +250,9 @@ msgstr "" msgid "And:" msgstr "" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "" @@ -827,6 +833,9 @@ msgstr "" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/uk.po b/src/translations/uk.po index 8ccfb3a7c..145601eb1 100644 --- a/src/translations/uk.po +++ b/src/translations/uk.po @@ -21,6 +21,9 @@ msgstr "" msgid " ms" msgstr " мс" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " секунд" @@ -261,6 +264,9 @@ msgstr "Виникла невідома помилка last.fm: %1" msgid "And:" msgstr "Та:" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "Додати файли/адреси до списку відтворення" @@ -852,6 +858,9 @@ msgstr "Перший рівень" msgid "Flac" msgstr "Flac" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "Забути пристрій" diff --git a/src/translations/zh_CN.po b/src/translations/zh_CN.po index 05690f540..6228e720a 100644 --- a/src/translations/zh_CN.po +++ b/src/translations/zh_CN.po @@ -20,6 +20,9 @@ msgstr "" msgid " ms" msgstr "" +msgid " pt" +msgstr "" + msgid " seconds" msgstr "" @@ -256,6 +259,9 @@ msgstr "" msgid "And:" msgstr "" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "添加文件/URL 到播放列表" @@ -836,6 +842,9 @@ msgstr "" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/translations/zh_TW.po b/src/translations/zh_TW.po index 83e82f8ee..b8c6e9a50 100644 --- a/src/translations/zh_TW.po +++ b/src/translations/zh_TW.po @@ -21,6 +21,9 @@ msgstr "" msgid " ms" msgstr " 毫秒" +msgid " pt" +msgstr "" + msgid " seconds" msgstr " 秒" @@ -261,6 +264,9 @@ msgstr "一個未知的last.fm錯誤出現: %1" msgid "And:" msgstr "" +msgid "Appearance" +msgstr "" + msgid "Append files/URLs to the playlist" msgstr "附加檔案或URL到播放清單" @@ -841,6 +847,9 @@ msgstr "第一層次" msgid "Flac" msgstr "" +msgid "Font size" +msgstr "" + msgid "Forget device" msgstr "" diff --git a/src/ui/settingsdialog.cpp b/src/ui/settingsdialog.cpp index a31337976..941bb3471 100644 --- a/src/ui/settingsdialog.cpp +++ b/src/ui/settingsdialog.cpp @@ -21,6 +21,7 @@ #include "ui_settingsdialog.h" #include "engines/enginebase.h" #include "playlist/playlistview.h" +#include "widgets/autosizedtextedit.h" #include "widgets/osd.h" #include "widgets/osdpretty.h" @@ -36,6 +37,7 @@ #include #include +#include #include #include @@ -116,6 +118,13 @@ SettingsDialog::SettingsDialog(QWidget* parent) qStableSort(names); ui_->language->addItems(names); + // Song info + QFile song_info_preview(":/lumberjacksong.txt"); + song_info_preview.open(QIODevice::ReadOnly); + ui_->song_info_font_preview->setText(QString::fromUtf8(song_info_preview.readAll())); + + connect(ui_->song_info_font_size, SIGNAL(valueChanged(double)), SLOT(SongInfoFontSizeChanged(double))); + // Global shortcuts #ifdef Q_OS_MAC if (QSysInfo::MacintoshVersion != QSysInfo::MV_SNOWLEOPARD) { @@ -233,7 +242,11 @@ void SettingsDialog::accept() { s.endGroup(); #endif - // Lyrics + // Song info + s.beginGroup(AutoSizedTextEdit::kSettingsGroup); + s.setValue("font_size", ui_->song_info_font_preview->font().pointSizeF()); + s.endGroup(); + ui_->lyric_settings->Save(); // Wii remotes @@ -323,7 +336,12 @@ void SettingsDialog::showEvent(QShowEvent*) { ui_->language->setCurrentIndex(ui_->language->findText(name)); s.endGroup(); - // Lyrics + // Song Info + s.beginGroup(AutoSizedTextEdit::kSettingsGroup); + ui_->song_info_font_size->setValue( + s.value("font_size", AutoSizedTextEdit::kDefaultFontSize).toReal()); + s.endGroup(); + ui_->lyric_settings->Load(); // Last.fm @@ -515,3 +533,10 @@ void SettingsDialog::OpenAtPage(Page page) { void SettingsDialog::SetSongInfoView(SongInfoView* view) { ui_->lyric_settings->SetSongInfoView(view); } + +void SettingsDialog::SongInfoFontSizeChanged(qreal value) { + QFont font; + font.setPointSizeF(value); + + ui_->song_info_font_preview->setFont(font); +} diff --git a/src/ui/settingsdialog.h b/src/ui/settingsdialog.h index e959392eb..eceac9ad6 100644 --- a/src/ui/settingsdialog.h +++ b/src/ui/settingsdialog.h @@ -85,6 +85,8 @@ class SettingsDialog : public QDialog { void FadingOptionsChanged(); void RgPreampChanged(int value); + void SongInfoFontSizeChanged(double value); + private: #ifdef ENABLE_WIIMOTEDEV WiimotedevShortcutsConfig* wiimotedev_config_; diff --git a/src/ui/settingsdialog.ui b/src/ui/settingsdialog.ui index e21571790..787bd5844 100644 --- a/src/ui/settingsdialog.ui +++ b/src/ui/settingsdialog.ui @@ -119,7 +119,7 @@ - 0 + 2 @@ -361,7 +361,7 @@ - true + false ms @@ -478,7 +478,68 @@ - + + + + + + 0 + 0 + + + + Appearance + + + + + + Font size + + + + + + + pt + + + 1 + + + 5.000000000000000 + + + 50.000000000000000 + + + 0.500000000000000 + + + + + + + Preview + + + + + + + + 16777215 + 100 + + + + true + + + + + + diff --git a/src/widgets/autosizedtextedit.cpp b/src/widgets/autosizedtextedit.cpp index 7fed645f6..e712d2810 100644 --- a/src/widgets/autosizedtextedit.cpp +++ b/src/widgets/autosizedtextedit.cpp @@ -16,8 +16,13 @@ #include "autosizedtextedit.h" +#include +#include #include +const qreal AutoSizedTextEdit::kDefaultFontSize = 8.5; +const char* AutoSizedTextEdit::kSettingsGroup = "SongInfo"; + AutoSizedTextEdit::AutoSizedTextEdit(QWidget* parent) : QTextBrowser(parent), last_width_(-1) @@ -26,10 +31,17 @@ AutoSizedTextEdit::AutoSizedTextEdit(QWidget* parent) setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setOpenExternalLinks(true); + ReloadSettings(); +} - QFont f(font()); - f.setPointSizeF(8.5); - document()->setDefaultFont(f); +void AutoSizedTextEdit::ReloadSettings() { + QSettings s; + s.beginGroup(kSettingsGroup); + + qreal size = s.value("font_size", kDefaultFontSize).toReal(); + QFont font; + font.setPointSizeF(size); + document()->setDefaultFont(font); } void AutoSizedTextEdit::resizeEvent(QResizeEvent* e) { diff --git a/src/widgets/autosizedtextedit.h b/src/widgets/autosizedtextedit.h index 2db1aa4b4..94f0f75dd 100644 --- a/src/widgets/autosizedtextedit.h +++ b/src/widgets/autosizedtextedit.h @@ -25,8 +25,14 @@ class AutoSizedTextEdit : public QTextBrowser { public: AutoSizedTextEdit(QWidget* parent = 0); + static const qreal kDefaultFontSize; + static const char* kSettingsGroup; + QSize sizeHint() const; +public slots: + void ReloadSettings(); + protected: void resizeEvent(QResizeEvent* e); void wheelEvent(QWheelEvent* e);