1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-31 11:35:24 +01:00

Add global shortcuts for repeat and shuffle modes. Fixes issue #955

This commit is contained in:
Andrea Decorte 2011-03-17 08:21:05 +00:00
parent f4f482a440
commit 4b6e2a8a62
58 changed files with 535 additions and 11 deletions

View File

@ -56,6 +56,8 @@ GlobalShortcuts::GlobalShortcuts(QObject *parent)
AddShortcut("seek_backward", tr("Seek backward"), SIGNAL(SeekBackward()));
AddShortcut("show_hide", tr("Show/Hide"), SIGNAL(ShowHide()));
AddShortcut("show_osd", tr("Show OSD"), SIGNAL(ShowOSD()));
AddShortcut("shuffle_mode", tr("Change shuffle mode"), SIGNAL(CycleShuffleMode()));
AddShortcut("repeat_mode", tr("Change repeat mode"), SIGNAL(CycleRepeatMode()));
AddRatingShortcut("rate_zero_star", tr("Rate the current song 0 stars"), rating_signals_mapper_, 0);
AddRatingShortcut("rate_one_star", tr("Rate the current song 1 star"), rating_signals_mapper_, 1);

View File

@ -69,6 +69,8 @@ signals:
void ShowHide();
void ShowOSD();
void RateCurrentSong(int);
void CycleShuffleMode();
void CycleRepeatMode();
private:
void AddShortcut(const QString& id, const QString& name, const char* signal,

View File

@ -178,3 +178,30 @@ PlaylistSequence::ShuffleMode PlaylistSequence::shuffle_mode() const {
PlaylistSequence::RepeatMode PlaylistSequence::repeat_mode() const {
return dynamic_ ? Repeat_Off : repeat_mode_;
}
//called from global shortcut
void PlaylistSequence::CycleShuffleMode() {
ShuffleMode mode = Shuffle_Off;
//we cycle through the shuffle modes
switch (shuffle_mode()) {
case Shuffle_Off: mode = Shuffle_All; break;
case Shuffle_All: mode = Shuffle_Album; break;
case Shuffle_Album: break;
}
SetShuffleMode(mode);
}
//called from global shortcut
void PlaylistSequence::CycleRepeatMode() {
RepeatMode mode = Repeat_Off;
//we cycle through the repeat modes
switch (repeat_mode()) {
case Repeat_Off: mode = Repeat_Track; break;
case Repeat_Track: mode = Repeat_Album; break;
case Repeat_Album: mode = Repeat_Playlist; break;
case Repeat_Playlist: break;
}
SetRepeatMode(mode);
}

View File

@ -58,6 +58,8 @@ class PlaylistSequence : public QWidget {
public slots:
void SetRepeatMode(PlaylistSequence::RepeatMode mode);
void SetShuffleMode(PlaylistSequence::ShuffleMode mode);
void CycleShuffleMode();
void CycleRepeatMode();
void SetUsingDynamicPlaylist(bool dynamic);
signals:

View File

@ -465,9 +465,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr ""
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2163,6 +2169,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -468,9 +468,15 @@ msgstr ""
msgid "Change font size..."
msgstr "Змяніць памер шрыфта..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Змяніць гарачую клавішу..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Змяніць мову"
@ -2177,6 +2183,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -472,9 +472,15 @@ msgstr "Смени обложката"
msgid "Change font size..."
msgstr "Смени размера на щрифта"
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Промяна на бърз клавиш..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Промяна на езика"
@ -2205,6 +2211,9 @@ msgstr "Показва светеща анимация на текущата п
msgid "Show a native desktop notification"
msgstr "Показване подразбираща се за системата нотификация"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Показване на нотификация,кога променя звука"

View File

@ -472,9 +472,15 @@ msgstr "Kemmañ golo an albom"
msgid "Change font size..."
msgstr "Kemmañ ment ar font..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Kemmañ ar berradenn"
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Kemmañ ar yezh"
@ -2187,6 +2193,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -478,9 +478,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Canviar combinació de tecles"
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Canviar l'idioma"
@ -2200,6 +2206,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr "Mostra una notificació nativa d'escriptori"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Mostra una notificació quan canvia el volum"

View File

@ -476,9 +476,15 @@ msgstr "Změnit obal"
msgid "Change font size..."
msgstr "Změnit velikost písma..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Změnit klávesovou zkratku..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Změnit jazyk"
@ -2202,6 +2208,9 @@ msgstr "Ukázat žhnoucí zvýraznění právě přehrávané skladby"
msgid "Show a native desktop notification"
msgstr "Používat systémová oznámení"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Ukázat oznámení při změně hlasitosti"

View File

@ -465,9 +465,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr ""
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2163,6 +2169,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -466,9 +466,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Ændrer smutvej..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2168,6 +2174,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr "Vis en native skrivebordsbekendtgørelse"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Vis en bekendtgørelse når jeg skifter lydstyrke"

View File

@ -477,9 +477,15 @@ msgstr "Cover ändern"
msgid "Change font size..."
msgstr "Schriftgröße ändern..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Tastenkürzel ändern..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Sprache ändern"
@ -2204,6 +2210,9 @@ msgstr "Leuchtende Animation für aktuelles Stück anzeigen"
msgid "Show a native desktop notification"
msgstr "Benachrichtigungen des Systems benutzen"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Zeige eine Benachrichtigung bei Lautstärkenänderung"

View File

@ -481,9 +481,15 @@ msgstr "Αλλαγή εξώφυλλου καλλιτέχνη"
msgid "Change font size..."
msgstr "Αλλαγή μεγέθους γραμματοσειράς..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Αλλαγή συντόμευσης..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Αλλαγή γλώσσας"
@ -2221,6 +2227,9 @@ msgstr "Εμφάνιση ενός φωτεινού σχεδίου στο τρέ
msgid "Show a native desktop notification"
msgstr "Εμφάνισε εγγενείς ειδοποιήσεις"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Εμφάνιση ειδοποίησης κατα την αλλαγή του ήχου"

View File

@ -465,9 +465,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr ""
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2163,6 +2169,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -465,9 +465,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Change shortcut..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2167,6 +2173,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr "Show a native desktop notification"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Show a notification when I change the volume"

View File

@ -465,9 +465,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr ""
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2164,6 +2170,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr "Show a native desktop notification"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Show a notification when I change the volume"

View File

@ -465,9 +465,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr ""
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2163,6 +2169,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -482,9 +482,15 @@ msgstr "Cambiar portada"
msgid "Change font size..."
msgstr "Cambiar tamaño de la letra"
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Cambiar combinación de teclas"
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Cambiar el idioma"
@ -2219,6 +2225,9 @@ msgstr "Mostrar una animación de brillo en la pista actual"
msgid "Show a native desktop notification"
msgstr "Mostrar la notificacion propia del escritorio"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Mostrar una notificación cuando cambio el volúmen"

View File

@ -465,9 +465,15 @@ msgstr ""
msgid "Change font size..."
msgstr "Muuda kirja suurust..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr ""
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Muuda keelt"
@ -2164,6 +2170,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -465,9 +465,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr ""
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2163,6 +2169,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -465,9 +465,15 @@ msgstr "Muuta kansikuvaa"
msgid "Change font size..."
msgstr "Muuta kirjasinkokoa..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Muuta pikanäppäin..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Vaihda kieltä"
@ -2174,6 +2180,9 @@ msgstr "Korosta soiva kappale hohtavalla animaatiolla"
msgid "Show a native desktop notification"
msgstr "Näytä järjestelmälle ominainen ilmoitus"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Näytä ilmoitus, kun muutan äänenvoimakkuutta"

View File

@ -484,9 +484,15 @@ msgstr "Changer la couverture de l'album"
msgid "Change font size..."
msgstr "Changer la taille de la police..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Changer le raccourci..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Changer la langue"
@ -2223,6 +2229,9 @@ msgstr "Mettre en surbrillance la piste en lecture"
msgid "Show a native desktop notification"
msgstr "Utiliser le système de notification du bureau"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Afficher une notification lorsque je change le volume"

View File

@ -469,9 +469,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Cambiar combinación de teclas"
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Cambiar o idioma"
@ -2172,6 +2178,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -471,9 +471,15 @@ msgstr "שינוי עטיפת האלבום"
msgid "Change font size..."
msgstr "שנה גודל גופן..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "שינוי קיצור הדרך..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "שנה את השפה"
@ -2183,6 +2189,9 @@ msgstr "אנימציה זוהרת על הרצועה הנוכחית"
msgid "Show a native desktop notification"
msgstr "הצגת התראות של שולחן העבודה"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "הצגת התראה בשינוי עוצמת השמע"

View File

@ -465,9 +465,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr ""
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2163,6 +2169,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -475,9 +475,15 @@ msgstr "Promijenite omot albuma"
msgid "Change font size..."
msgstr "Promijeni veličinu slova..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Promijeni prečac..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Promijeni jezik"
@ -2202,6 +2208,9 @@ msgstr "Prikaži sjajnu animaciju za trenutnu pjesmu"
msgid "Show a native desktop notification"
msgstr "Prikaži nativnu desktop obavijest"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Prikaži obavijest kada promijenite glasnoću zvuka"

View File

@ -473,9 +473,15 @@ msgstr "Albumborító módosítása"
msgid "Change font size..."
msgstr "Betűméret megváltoztatása..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Billentyűparancs módosítása..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Nyelv váltása"
@ -2206,6 +2212,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr "Rendszer alapértelmezett értesítés mutatása"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Hangerő változtatásakor értesítés megjelenítése"

View File

@ -465,9 +465,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr ""
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2163,6 +2169,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -480,9 +480,15 @@ msgstr "Cambia copertina"
msgid "Change font size..."
msgstr "Cambia dimensione dei caratteri..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Cambia la scorciatoia..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Cambia la lingua"
@ -2213,6 +2219,9 @@ msgstr "Mostra un'animazione luminosa sulla traccia corrente"
msgid "Show a native desktop notification"
msgstr "Mostra una notifica nativa del desktop"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Mostra una notifica quando regolo il volume"

View File

@ -471,9 +471,15 @@ msgstr "カバー アートの変更"
msgid "Change font size..."
msgstr "フォント サイズの変更..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "ショートカットの変更..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "言語の変更"
@ -2192,6 +2198,9 @@ msgstr "現在のトラックに揺らめきアニメーションを表示する
msgid "Show a native desktop notification"
msgstr "ネイティブなデスクトップ通知を表示する"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "音量の変更時に通知を表示する"

View File

@ -465,9 +465,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr ""
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2163,6 +2169,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -475,9 +475,15 @@ msgstr "Keisti viršelio paveikslėlį"
msgid "Change font size..."
msgstr "Keisti šrifto dydį..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Keisti konbinaciją..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Pakeisti programos kalbą"
@ -2202,6 +2208,9 @@ msgstr "Švytėjimo efektas ant dabar grojamo takelio"
msgid "Show a native desktop notification"
msgstr "Rodyti numatytą darbastalio pranešimą"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Rodyti pranešimą kai keičiu garsumą"

View File

@ -465,9 +465,15 @@ msgstr "Mainīt vāka attēlu"
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr ""
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2163,6 +2169,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -468,9 +468,15 @@ msgstr ""
msgid "Change font size..."
msgstr "Endre font størrelse..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Endre snarvei..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Endre språket"
@ -2175,6 +2181,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr "Vis en skrivebordsmelding som passer til ditt operativsystem"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Vis informasjonsvinsu når jeg endrer lydstyrke"

View File

@ -477,9 +477,15 @@ msgstr "verander albumhoes"
msgid "Change font size..."
msgstr "Verander lettertype"
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Sneltoets wijzigen"
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Wijzig de taal"
@ -2207,6 +2213,9 @@ msgstr "Toon een oplichtende animatie tijdens de huidige track"
msgid "Show a native desktop notification"
msgstr "Toon desktopeigen notificatie"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Notificatie weergeven als ik het volume wijzig"

View File

@ -465,9 +465,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr ""
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2163,6 +2169,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -465,9 +465,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr ""
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2163,6 +2169,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -474,9 +474,15 @@ msgstr "Zmień okładkę"
msgid "Change font size..."
msgstr "Zmień wielkość czcionki..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Zmień skrót..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Zmień język"
@ -2205,6 +2211,9 @@ msgstr "Pokaż animację podświetlenia aktualnie odtwarzanej ścieżki"
msgid "Show a native desktop notification"
msgstr "Pokaż natywne powiadomienia środowiska graficznego"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Pokaż powiadomienie, gdy zmieniam głośność"

View File

@ -476,9 +476,15 @@ msgstr "Alterar capa do álbum"
msgid "Change font size..."
msgstr "Alterar tamanho da letra..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Alterar atalho..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Alterar o idioma"
@ -2208,6 +2214,9 @@ msgstr "Mostrar uma animação brilhante na música atual"
msgid "Show a native desktop notification"
msgstr "Mostrar a notificação do ambiente de trabalho"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Mostrar uma notificação quando eu altero o volume"

View File

@ -474,9 +474,15 @@ msgstr "Alterar capa"
msgid "Change font size..."
msgstr "Mudar tamanho da letra"
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Mudar atalho..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Alterar idioma"
@ -2202,6 +2208,9 @@ msgstr "Mostrar animação na faixa atual"
msgid "Show a native desktop notification"
msgstr "Mostrar notificação nativa do sistema"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Mostrar notificação quando mudar o volume"

View File

@ -467,9 +467,15 @@ msgstr "Schimbă imaginea coperții"
msgid "Change font size..."
msgstr "Schimbă dimensiunea fontului..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Schimbă scurtătura..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Schimbă limba"
@ -2167,6 +2173,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Arată o notificare când schimb volumul"

View File

@ -472,9 +472,15 @@ msgstr "Выберите обложку"
msgid "Change font size..."
msgstr "Изменить размер шрифта…"
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Изменить горячую клавишу..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Сменить язык"
@ -2196,6 +2202,9 @@ msgstr "Подсвечивать проигрывающийся трек"
msgid "Show a native desktop notification"
msgstr "Показывать системные сообщения"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Показывать уведомление при смене громкости"

View File

@ -473,9 +473,15 @@ msgstr "Zmeniť obal albumu"
msgid "Change font size..."
msgstr "Zmeniť veľkosť písma..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Zmeniť skratku..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Zmeniť jazyk"
@ -2197,6 +2203,9 @@ msgstr "Zobraziť blikajúcu animáciu na súčasnej skladbe"
msgid "Show a native desktop notification"
msgstr "Zobrazovať natívne desktopové upozornenia"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Zobraziť upozornenie keď zmením hlasitosť"

View File

@ -472,9 +472,15 @@ msgstr "Spremeni ovitek albuma"
msgid "Change font size..."
msgstr "Spremeni velikost pisave ..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Spremeni bližnjico ..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Sprememba jezika"
@ -2199,6 +2205,9 @@ msgstr "Pokaži žarečo animacijo na trenutni skladbi"
msgid "Show a native desktop notification"
msgstr "Prikaži sistemsko obvestilo"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Pokaži obvestilo ob spremembi glasnosti"

View File

@ -465,9 +465,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Промени пречицу..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2167,6 +2173,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -475,9 +475,15 @@ msgstr "Ändra omslag"
msgid "Change font size..."
msgstr "Ändra typsnittsstorlek"
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Ändra snabbtangent..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Ändra språket"
@ -2200,6 +2206,9 @@ msgstr "Visa en lysande animation på det nuvarande spåret"
msgid "Show a native desktop notification"
msgstr "Visa en standardiserad skrivbordsnotifiering"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Visa en notifiering när jag ändrar volymen"

View File

@ -472,9 +472,15 @@ msgstr "Kapağı değiştir"
msgid "Change font size..."
msgstr "Yazı boyutunu değiştir..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Kısayolu değiştir..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Dili değiştir"
@ -535,8 +541,9 @@ msgid ""
"Clementine can be controlled remotely by an Android phone. To enable this "
"feature log in with the same Google account that is configured on your phone."
msgstr ""
"Clementine Android telefon tarafından uzaktan kontrol edilebilir. Bu özelliği "
"etkinleştirmek için telefonunuzda yapılandırılan Google hesabınızla oturum açın."
"Clementine Android telefon tarafından uzaktan kontrol edilebilir. Bu "
"özelliği etkinleştirmek için telefonunuzda yapılandırılan Google hesabınızla "
"oturum açın."
msgid "Clementine can show a message when the track changes."
msgstr "Parça değiştiğinde Clementine bir ileti gösterebilir."
@ -1229,7 +1236,8 @@ msgid "Ignore \"The\" in artist names"
msgstr "Sanatçı isimlerinde \"The\" kelimesini önemseme"
msgid "Images (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm)"
msgstr "Resimler (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm)"
msgstr ""
"Resimler (*.png *.jpg *.jpeg *.bmp *.gif *.xpm *.pbm *.pgm *.ppm *.xbm)"
msgid "Images (*.png *.jpg *.jpeg *.bmp *.xpm *.pbm *.ppm *.xbm)"
msgstr "Resimler (*.png *.jpg *.jpeg *.bmp *.xpm *.pbm *.ppm *.xbm)"
@ -2197,6 +2205,9 @@ msgstr "Mevcut parçada parlayan bir animasyon göster"
msgid "Show a native desktop notification"
msgstr "Masaüstü bildirimi göster"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Ses düzeyini değiştirdiğimde bir bildirim göster"
@ -2297,7 +2308,8 @@ msgid "Soft Rock"
msgstr "Hafif Rock"
msgid "Some files failed to install. The script may not work correctly."
msgstr "Bazı dosyaları yüklemede başarısız olundu. Betik düzgün çalışmayabilir."
msgstr ""
"Bazı dosyaları yüklemede başarısız olundu. Betik düzgün çalışmayabilir."
msgid "Song Information"
msgstr "Şarkı Bilgisi"
@ -2430,8 +2442,8 @@ msgid ""
"The version of Clementine you've just updated to requires a full library "
"rescan because of the new features listed below:<ul>"
msgstr ""
"Güncellediğiniz Clementine sürümü, aşağıda listelenen yeni özellikler nedeniyle "
"kitaplığınızın baştan taranmasını gerektiriyor:<ul>"
"Güncellediğiniz Clementine sürümü, aşağıda listelenen yeni özellikler "
"nedeniyle kitaplığınızın baştan taranmasını gerektiriyor:<ul>"
msgid "There was a problem fetching the metadata from Magnatune"
msgstr "Magnatude servisinden veri alınırken hata oluştu"
@ -2655,8 +2667,8 @@ msgid ""
"Warning: scripts have full access to your computer and your music. Only "
"install scripts that you trust."
msgstr ""
"Uyarı: betikler bilgisayarınızın ve müziklerinizin üzerinde tüm yetkiye sahiptir. "
"Sadece güvendiğiniz betikleri yükleyin."
"Uyarı: betikler bilgisayarınızın ve müziklerinizin üzerinde tüm yetkiye "
"sahiptir. Sadece güvendiğiniz betikleri yükleyin."
msgid "Wav"
msgstr "Wav"
@ -2772,8 +2784,9 @@ msgid ""
"for automatic tag fetching. Try installing the 'gstreamer-plugins-bad' "
"package."
msgstr ""
"Gstreamer kurulumunuzda 'ofa' eklentisi bulunmuyor. Bu eklenti otomatik etiket "
"getirmek için gereklidir. 'gstreamer-plugins-bad' paketini kurmayı deneyin."
"Gstreamer kurulumunuzda 'ofa' eklentisi bulunmuyor. Bu eklenti otomatik "
"etiket getirmek için gereklidir. 'gstreamer-plugins-bad' paketini kurmayı "
"deneyin."
msgid "Your library is empty!"
msgstr "Kütüphaneniz boş!"

View File

@ -455,9 +455,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr ""
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr ""
@ -2153,6 +2159,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr ""
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr ""

View File

@ -474,9 +474,15 @@ msgstr "Змінити обкладинку"
msgid "Change font size..."
msgstr "Змінити розмір шрифту..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Змінити комбінацію клавіш..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Змінити мову"
@ -2199,6 +2205,9 @@ msgstr "Показувати для поточної доріжки блимаю
msgid "Show a native desktop notification"
msgstr "Показувати системні повідомлення"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Показувати повідомлення, коли я змінюю гучність"

View File

@ -473,9 +473,15 @@ msgstr "Đổi ảnh bìa"
msgid "Change font size..."
msgstr "Đổi kích cỡ phông chữ..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "Đổi phím tắt..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "Đổi ngôn ngữ"
@ -2199,6 +2205,9 @@ msgstr "Hiển thị một hình ảnh rực rỡ cho track hiện thời"
msgid "Show a native desktop notification"
msgstr "Hiện một hộp thông báo trên màn hình"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "Hiện thông báo khi thay đổi âm lượng"

View File

@ -467,9 +467,15 @@ msgstr "更改封面"
msgid "Change font size..."
msgstr "更改字号..."
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "更改快捷键..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "更改语言"
@ -2165,6 +2171,9 @@ msgstr ""
msgid "Show a native desktop notification"
msgstr "使用原生桌面提示"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "改变音量是显示提示"

View File

@ -469,9 +469,15 @@ msgstr ""
msgid "Change font size..."
msgstr ""
msgid "Change repeat mode"
msgstr ""
msgid "Change shortcut..."
msgstr "更改快速鍵..."
msgid "Change shuffle mode"
msgstr ""
msgid "Change the language"
msgstr "變更語言"
@ -2167,6 +2173,9 @@ msgstr "顯示一發光動畫在目前播放歌曲上"
msgid "Show a native desktop notification"
msgstr "顯示一原生桌面通知"
msgid "Show a notification when I change the repeat/shuffle mode"
msgstr ""
msgid "Show a notification when I change the volume"
msgstr "當我改變音量時,顯示一個通知"

View File

@ -653,6 +653,12 @@ MainWindow::MainWindow(
// Load playlists
playlists_->Init(library_->backend(), playlist_backend_, ui_->playlist_sequence);
// We need to connect these global shortcuts here after the playlist have been initialized
connect(global_shortcuts_, SIGNAL(CycleShuffleMode()), player_->playlists()->sequence(), SLOT(CycleShuffleMode()));
connect(global_shortcuts_, SIGNAL(CycleRepeatMode()), player_->playlists()->sequence(), SLOT(CycleRepeatMode()));
connect(player_->playlists()->sequence(), SIGNAL(RepeatModeChanged(PlaylistSequence::RepeatMode)), osd_, SLOT(RepeatModeChanged(PlaylistSequence::RepeatMode)));
connect(player_->playlists()->sequence(), SIGNAL(ShuffleModeChanged(PlaylistSequence::ShuffleMode)), osd_, SLOT(ShuffleModeChanged(PlaylistSequence::ShuffleMode)));
// Load settings
settings_.beginGroup(kSettingsGroup);

View File

@ -398,6 +398,7 @@ void SettingsDialog::accept() {
s.setValue("Behaviour", int(osd_behaviour));
s.setValue("Timeout", ui_->notifications_duration->value() * 1000);
s.setValue("ShowOnVolumeChange", ui_->notifications_volume->isChecked());
s.setValue("ShowOnPlayModeChange", ui_->notifications_play_mode->isChecked());
s.setValue("ShowArt", ui_->notifications_art->isChecked());
s.endGroup();
@ -568,6 +569,7 @@ void SettingsDialog::showEvent(QShowEvent*) {
}
ui_->notifications_duration->setValue(s.value("Timeout", 5000).toInt() / 1000);
ui_->notifications_volume->setChecked(s.value("ShowOnVolumeChange", false).toBool());
ui_->notifications_play_mode->setChecked(s.value("ShowOnPlayModeChange", true).toBool());
ui_->notifications_art->setChecked(s.value("ShowArt", true).toBool());
s.endGroup();

View File

@ -120,7 +120,7 @@
<item>
<widget class="QStackedWidget" name="stacked_widget">
<property name="currentIndex">
<number>0</number>
<number>4</number>
</property>
<widget class="QWidget" name="playback_page">
<layout class="QVBoxLayout" name="verticalLayout_10">
@ -806,6 +806,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="notifications_play_mode">
<property name="text">
<string>Show a notification when I change the repeat/shuffle mode</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="notifications_art">
<property name="text">

View File

@ -37,6 +37,7 @@ OSD::OSD(SystemTrayIcon* tray_icon, QObject* parent)
behaviour_(Native),
show_on_volume_change_(false),
show_art_(true),
show_on_play_mode_change_(true),
force_show_next_(false),
ignore_next_stopped_(false),
pretty_popup_(new OSDPretty(OSDPretty::Mode_Popup)),
@ -68,6 +69,7 @@ void OSD::ReloadSettings() {
timeout_msec_ = s.value("Timeout", 5000).toInt();
show_on_volume_change_ = s.value("ShowOnVolumeChange", false).toBool();
show_art_ = s.value("ShowArt", true).toBool();
show_on_play_mode_change_ = s.value("ShowOnPlayModeChange", true).toBool();
if (!SupportsNativeNotifications() && behaviour_ == Native)
behaviour_ = Pretty;
@ -231,3 +233,28 @@ void OSD::WiiremoteCriticalBattery(int id, int live) {
}
#endif
void OSD::ShuffleModeChanged(PlaylistSequence::ShuffleMode mode) {
if (show_on_play_mode_change_) {
QString current_mode = QString();
switch (mode) {
case PlaylistSequence::Shuffle_Off: current_mode = tr("Don't shuffle"); break;
case PlaylistSequence::Shuffle_All: current_mode = tr("Shuffle all"); break;
case PlaylistSequence::Shuffle_Album: current_mode = tr("Shuffle by album"); break;
}
ShowMessage(QCoreApplication::applicationName(), current_mode);
}
}
void OSD::RepeatModeChanged(PlaylistSequence::RepeatMode mode) {
if (show_on_play_mode_change_) {
QString current_mode = QString();
switch (mode) {
case PlaylistSequence::Repeat_Off: current_mode = tr("Don't repeat"); break;
case PlaylistSequence::Repeat_Track: current_mode = tr("Repeat track"); break;
case PlaylistSequence::Repeat_Album: current_mode = tr("Repeat album"); break;
case PlaylistSequence::Repeat_Playlist: current_mode = tr("Repeat playlist"); break;
}
ShowMessage(QCoreApplication::applicationName(), current_mode);
}
}

View File

@ -27,6 +27,7 @@
#include "core/albumcoverloader.h"
#include "core/backgroundthread.h"
#include "core/song.h"
#include "playlist/playlistsequence.h"
class OrgFreedesktopNotificationsInterface;
class OSDPretty;
@ -72,6 +73,8 @@ class OSD : public QObject {
void PlaylistFinished();
void VolumeChanged(int value);
void MagnatuneDownloadFinished(const QStringList& albums);
void RepeatModeChanged(PlaylistSequence::RepeatMode mode);
void ShuffleModeChanged(PlaylistSequence::ShuffleMode mode);
#ifdef HAVE_WIIMOTEDEV
void WiiremoteActived(int id);
@ -114,6 +117,7 @@ class OSD : public QObject {
Behaviour behaviour_;
bool show_on_volume_change_;
bool show_art_;
bool show_on_play_mode_change_;
bool force_show_next_;
bool ignore_next_stopped_;