diff --git a/data/data.qrc b/data/data.qrc index 0a8a8c1f9..080d345bc 100644 --- a/data/data.qrc +++ b/data/data.qrc @@ -50,7 +50,6 @@ icons/22x22/application-exit.png icons/22x22/applications-internet.png icons/22x22/configure.png - icons/22x22/configure-shortcuts.png icons/22x22/document-open.png icons/22x22/document-open-folder.png icons/22x22/document-open-remote.png @@ -92,7 +91,6 @@ icons/32x32/application-exit.png icons/32x32/applications-internet.png icons/32x32/configure.png - icons/32x32/configure-shortcuts.png icons/32x32/document-open.png icons/32x32/document-open-folder.png icons/32x32/document-open-remote.png @@ -134,7 +132,6 @@ icons/48x48/application-exit.png icons/48x48/applications-internet.png icons/48x48/configure.png - icons/48x48/configure-shortcuts.png icons/48x48/document-open.png icons/48x48/document-open-folder.png icons/48x48/document-open-remote.png @@ -186,5 +183,8 @@ icons/48x48/view-fullscreen.png schema-12.sql schema-13.sql + icons/22x22/input-keyboard.png + icons/32x32/input-keyboard.png + icons/48x48/input-keyboard.png diff --git a/data/icons/22x22/configure-shortcuts.png b/data/icons/22x22/configure-shortcuts.png deleted file mode 100644 index 391ba80cc..000000000 Binary files a/data/icons/22x22/configure-shortcuts.png and /dev/null differ diff --git a/data/icons/22x22/input-keyboard.png b/data/icons/22x22/input-keyboard.png new file mode 100644 index 000000000..d28c96276 Binary files /dev/null and b/data/icons/22x22/input-keyboard.png differ diff --git a/data/icons/32x32/configure-shortcuts.png b/data/icons/32x32/configure-shortcuts.png deleted file mode 100644 index 1d8a3407f..000000000 Binary files a/data/icons/32x32/configure-shortcuts.png and /dev/null differ diff --git a/data/icons/32x32/input-keyboard.png b/data/icons/32x32/input-keyboard.png new file mode 100644 index 000000000..eff45df7c Binary files /dev/null and b/data/icons/32x32/input-keyboard.png differ diff --git a/data/icons/48x48/configure-shortcuts.png b/data/icons/48x48/configure-shortcuts.png deleted file mode 100644 index 59ec430ae..000000000 Binary files a/data/icons/48x48/configure-shortcuts.png and /dev/null differ diff --git a/data/icons/48x48/input-keyboard.png b/data/icons/48x48/input-keyboard.png new file mode 100644 index 000000000..7d7e37771 Binary files /dev/null and b/data/icons/48x48/input-keyboard.png differ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 13eaf68ab..f55e3ed44 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -116,7 +116,7 @@ set(SOURCES ui/edittagdialog.cpp ui/equalizer.cpp ui/globalshortcutgrabber.cpp - ui/globalshortcutsdialog.cpp + ui/globalshortcutsconfig.cpp ui/iconloader.cpp ui/mainwindow.cpp ui/qtsystemtrayicon.cpp @@ -220,7 +220,7 @@ set(HEADERS ui/edittagdialog.h ui/equalizer.h ui/globalshortcutgrabber.h - ui/globalshortcutsdialog.h + ui/globalshortcutsconfig.h ui/mainwindow.h ui/qtsystemtrayicon.h ui/settingsdialog.h @@ -268,7 +268,7 @@ set(UI ui/edittagdialog.ui ui/equalizer.ui ui/globalshortcutgrabber.ui - ui/globalshortcutsdialog.ui + ui/globalshortcutsconfig.ui ui/mainwindow.ui ui/settingsdialog.ui diff --git a/src/translations/ar.po b/src/translations/ar.po index 8246c39c1..bf609fcb0 100644 --- a/src/translations/ar.po +++ b/src/translations/ar.po @@ -1262,7 +1262,7 @@ msgstr "" msgid "F2" msgstr "" -msgid "Configure Clementine..." +msgid "Preferences..." msgstr "" msgid "Ctrl+P" @@ -1310,9 +1310,6 @@ msgstr "" msgid "Add folder..." msgstr "" -msgid "Configure global shortcuts..." -msgstr "" - msgid "Jump to the currently playing track" msgstr "" @@ -1349,9 +1346,6 @@ msgstr "" msgid "Music" msgstr "" -msgid "Settings" -msgstr "" - msgid "Help" msgstr "" @@ -1367,6 +1361,9 @@ msgstr "" msgid "Behavior" msgstr "" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "" diff --git a/src/translations/cs.po b/src/translations/cs.po index bc05c7b4b..ddf790255 100644 --- a/src/translations/cs.po +++ b/src/translations/cs.po @@ -1266,8 +1266,8 @@ msgstr "Uprav tag..." msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Nastavit Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1314,9 +1314,6 @@ msgstr "Odstranit z playlistu" msgid "Add folder..." msgstr "" -msgid "Configure global shortcuts..." -msgstr "" - msgid "Jump to the currently playing track" msgstr "" @@ -1353,9 +1350,6 @@ msgstr "Internet" msgid "Music" msgstr "Hudba" -msgid "Settings" -msgstr "Nastavení" - msgid "Help" msgstr "Nápověda" @@ -1371,6 +1365,9 @@ msgstr "Přehrávání" msgid "Behavior" msgstr "Chování" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Upozornění" @@ -1530,6 +1527,12 @@ msgstr "" msgid "Delay between visualizations" msgstr "" +#~ msgid "Settings" +#~ msgstr "Nastavení" + +#~ msgid "Configure Clementine..." +#~ msgstr "Nastavit Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Načítá se podpora audia" diff --git a/src/translations/da.po b/src/translations/da.po index a985b5938..747f27bd4 100644 --- a/src/translations/da.po +++ b/src/translations/da.po @@ -1269,8 +1269,8 @@ msgstr "Redigér mærke..." msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Indstil Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1317,9 +1317,6 @@ msgstr "Fjern fra spilleliste" msgid "Add folder..." msgstr "" -msgid "Configure global shortcuts..." -msgstr "" - msgid "Jump to the currently playing track" msgstr "" @@ -1356,9 +1353,6 @@ msgstr "" msgid "Music" msgstr "Musik" -msgid "Settings" -msgstr "Indstillinger" - msgid "Help" msgstr "Hjælp" @@ -1374,6 +1368,9 @@ msgstr "Afspilning" msgid "Behavior" msgstr "Opførsel" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Bekendtgørelser" @@ -1533,6 +1530,12 @@ msgstr "" msgid "Delay between visualizations" msgstr "" +#~ msgid "Settings" +#~ msgstr "Indstillinger" + +#~ msgid "Configure Clementine..." +#~ msgstr "Indstil Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Indlæser lydmotor" diff --git a/src/translations/de.po b/src/translations/de.po index 9a9bdece5..18c7f8626 100644 --- a/src/translations/de.po +++ b/src/translations/de.po @@ -1268,8 +1268,8 @@ msgstr "Tag bearbeiten..." msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Clementine einrichten..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1316,9 +1316,6 @@ msgstr "Aus der Wiedergabeliste entfernen" msgid "Add folder..." msgstr "Ordner hinzufügen..." -msgid "Configure global shortcuts..." -msgstr "Tastenkürzel einrichten..." - msgid "Jump to the currently playing track" msgstr "Zum aktuellen Stück springen" @@ -1355,9 +1352,6 @@ msgstr "Internet" msgid "Music" msgstr "Musik" -msgid "Settings" -msgstr "Einstellungen" - msgid "Help" msgstr "Hilfe" @@ -1373,6 +1367,9 @@ msgstr "Wiedergabe" msgid "Behavior" msgstr "Verhalten" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Benachrichtigungen" @@ -1534,6 +1531,15 @@ msgstr "Von der Liste wählen" msgid "Delay between visualizations" msgstr "" +#~ msgid "Configure global shortcuts..." +#~ msgstr "Tastenkürzel einrichten..." + +#~ msgid "Settings" +#~ msgstr "Einstellungen" + +#~ msgid "Configure Clementine..." +#~ msgstr "Clementine einrichten..." + #~ msgid "Loading audio engine" #~ msgstr "Audio Engine wird geladen" diff --git a/src/translations/el.po b/src/translations/el.po index 17bc884aa..7893470d6 100644 --- a/src/translations/el.po +++ b/src/translations/el.po @@ -1272,8 +1272,8 @@ msgstr "Τροποποίηση ετικέτας..." msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Παραμετροποίηση του Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1320,9 +1320,6 @@ msgstr "Αφαίρεση από την λίστα" msgid "Add folder..." msgstr "Προσθήκη φακέλου" -msgid "Configure global shortcuts..." -msgstr "Ρύθμιση καθολικών συντομεύσεων..." - msgid "Jump to the currently playing track" msgstr "Μετάβαση στο τρέχον κομμάτι που παίζει" @@ -1359,9 +1356,6 @@ msgstr "Διαδίκτυο" msgid "Music" msgstr "Μουσική" -msgid "Settings" -msgstr "Ρυθμίσεις" - msgid "Help" msgstr "Βοήθεια" @@ -1377,6 +1371,9 @@ msgstr "Αναπαραγωγή" msgid "Behavior" msgstr "Συμπεριφορά" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Ειδοποιήσεις" @@ -1536,6 +1533,15 @@ msgstr "Επιλογή από τη λίστα" msgid "Delay between visualizations" msgstr "" +#~ msgid "Configure global shortcuts..." +#~ msgstr "Ρύθμιση καθολικών συντομεύσεων..." + +#~ msgid "Settings" +#~ msgstr "Ρυθμίσεις" + +#~ msgid "Configure Clementine..." +#~ msgstr "Παραμετροποίηση του Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Φόρτωμα της μηχανής ήχου" diff --git a/src/translations/en_CA.po b/src/translations/en_CA.po index 05dca8233..b2f424007 100644 --- a/src/translations/en_CA.po +++ b/src/translations/en_CA.po @@ -1267,8 +1267,8 @@ msgstr "Edit tag..." msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Configure Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1315,9 +1315,6 @@ msgstr "Remove from playlist" msgid "Add folder..." msgstr "Add folder..." -msgid "Configure global shortcuts..." -msgstr "Configure global shortcuts..." - msgid "Jump to the currently playing track" msgstr "Jump to the currently playing track" @@ -1354,9 +1351,6 @@ msgstr "Internet" msgid "Music" msgstr "Music" -msgid "Settings" -msgstr "Settings" - msgid "Help" msgstr "Help" @@ -1372,6 +1366,9 @@ msgstr "Playback" msgid "Behavior" msgstr "Behaviour" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Notifications" @@ -1531,6 +1528,15 @@ msgstr "" msgid "Delay between visualizations" msgstr "Delay between visualisations" +#~ msgid "Configure global shortcuts..." +#~ msgstr "Configure global shortcuts..." + +#~ msgid "Settings" +#~ msgstr "Settings" + +#~ msgid "Configure Clementine..." +#~ msgstr "Configure Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Loading audio engine" diff --git a/src/translations/en_GB.po b/src/translations/en_GB.po index b88504e8f..4dbbe588a 100644 --- a/src/translations/en_GB.po +++ b/src/translations/en_GB.po @@ -1264,8 +1264,8 @@ msgstr "Edit tag..." msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Configure Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1312,9 +1312,6 @@ msgstr "Remove from playlist" msgid "Add folder..." msgstr "" -msgid "Configure global shortcuts..." -msgstr "" - msgid "Jump to the currently playing track" msgstr "" @@ -1351,9 +1348,6 @@ msgstr "" msgid "Music" msgstr "Music" -msgid "Settings" -msgstr "Settings" - msgid "Help" msgstr "Help" @@ -1369,6 +1363,9 @@ msgstr "Playback" msgid "Behavior" msgstr "Behaviour" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Notifications" @@ -1528,6 +1525,12 @@ msgstr "" msgid "Delay between visualizations" msgstr "Delay between visualisations" +#~ msgid "Settings" +#~ msgstr "Settings" + +#~ msgid "Configure Clementine..." +#~ msgstr "Configure Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Loading audio engine" diff --git a/src/translations/es.po b/src/translations/es.po index d7b3d1a72..2ba644efa 100644 --- a/src/translations/es.po +++ b/src/translations/es.po @@ -1276,8 +1276,8 @@ msgstr "Editar etiqueta..." msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Configurar Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1324,9 +1324,6 @@ msgstr "Eliminar de la lista de reproducción" msgid "Add folder..." msgstr "Añadir carpeta..." -msgid "Configure global shortcuts..." -msgstr "Configurar combinaciones de teclas globales" - msgid "Jump to the currently playing track" msgstr "Ir a la pista actualmente reproduciéndose" @@ -1363,9 +1360,6 @@ msgstr "Internet" msgid "Music" msgstr "Música" -msgid "Settings" -msgstr "Preferencias" - msgid "Help" msgstr "Ayuda" @@ -1381,6 +1375,9 @@ msgstr "Reproducción" msgid "Behavior" msgstr "Comportamiento" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Notificaciones" @@ -1542,6 +1539,15 @@ msgstr "Elegir de la lista" msgid "Delay between visualizations" msgstr "" +#~ msgid "Configure global shortcuts..." +#~ msgstr "Configurar combinaciones de teclas globales" + +#~ msgid "Settings" +#~ msgstr "Preferencias" + +#~ msgid "Configure Clementine..." +#~ msgstr "Configurar Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Cargando motor de sonido" diff --git a/src/translations/fi.po b/src/translations/fi.po index cda83a1f8..4aa210b31 100644 --- a/src/translations/fi.po +++ b/src/translations/fi.po @@ -1262,7 +1262,7 @@ msgstr "" msgid "F2" msgstr "" -msgid "Configure Clementine..." +msgid "Preferences..." msgstr "" msgid "Ctrl+P" @@ -1310,9 +1310,6 @@ msgstr "" msgid "Add folder..." msgstr "" -msgid "Configure global shortcuts..." -msgstr "" - msgid "Jump to the currently playing track" msgstr "" @@ -1349,9 +1346,6 @@ msgstr "" msgid "Music" msgstr "" -msgid "Settings" -msgstr "" - msgid "Help" msgstr "" @@ -1367,6 +1361,9 @@ msgstr "" msgid "Behavior" msgstr "" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "" diff --git a/src/translations/fr.po b/src/translations/fr.po index 214bf72b5..b76ee267e 100644 --- a/src/translations/fr.po +++ b/src/translations/fr.po @@ -1272,8 +1272,8 @@ msgstr "Modifier la tag..." msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Configurer Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1320,9 +1320,6 @@ msgstr "Supprimer de la liste de lecture" msgid "Add folder..." msgstr "" -msgid "Configure global shortcuts..." -msgstr "" - msgid "Jump to the currently playing track" msgstr "" @@ -1359,9 +1356,6 @@ msgstr "" msgid "Music" msgstr "Musique" -msgid "Settings" -msgstr "Configuration" - msgid "Help" msgstr "Aide" @@ -1377,6 +1371,9 @@ msgstr "Lecture sonore" msgid "Behavior" msgstr "" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Notifications" @@ -1538,6 +1535,12 @@ msgstr "" msgid "Delay between visualizations" msgstr "" +#~ msgid "Settings" +#~ msgstr "Configuration" + +#~ msgid "Configure Clementine..." +#~ msgstr "Configurer Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Chargement du moteur audio" diff --git a/src/translations/gl.po b/src/translations/gl.po index 2ba87a6d5..5336fb2ec 100644 --- a/src/translations/gl.po +++ b/src/translations/gl.po @@ -1264,7 +1264,7 @@ msgstr "" msgid "F2" msgstr "" -msgid "Configure Clementine..." +msgid "Preferences..." msgstr "" msgid "Ctrl+P" @@ -1312,9 +1312,6 @@ msgstr "" msgid "Add folder..." msgstr "" -msgid "Configure global shortcuts..." -msgstr "" - msgid "Jump to the currently playing track" msgstr "" @@ -1351,9 +1348,6 @@ msgstr "" msgid "Music" msgstr "" -msgid "Settings" -msgstr "" - msgid "Help" msgstr "" @@ -1369,6 +1363,9 @@ msgstr "" msgid "Behavior" msgstr "" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "" diff --git a/src/translations/it.po b/src/translations/it.po index 4c856f143..7638b9392 100644 --- a/src/translations/it.po +++ b/src/translations/it.po @@ -1273,8 +1273,8 @@ msgstr "Modifica tag..." msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Configura Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1321,9 +1321,6 @@ msgstr "Rimuovi dalla scaletta" msgid "Add folder..." msgstr "Aggiungi cartella..." -msgid "Configure global shortcuts..." -msgstr "Configura le scorciatoie globali..." - msgid "Jump to the currently playing track" msgstr "Salta alla traccia in riproduzione" @@ -1360,9 +1357,6 @@ msgstr "Internet" msgid "Music" msgstr "Musica" -msgid "Settings" -msgstr "Impostazioni" - msgid "Help" msgstr "Aiuto" @@ -1378,6 +1372,9 @@ msgstr "Riproduzione" msgid "Behavior" msgstr "Comportamento" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Notifiche" @@ -1539,6 +1536,15 @@ msgstr "Scegli dall'elenco" msgid "Delay between visualizations" msgstr "" +#~ msgid "Configure global shortcuts..." +#~ msgstr "Configura le scorciatoie globali..." + +#~ msgid "Settings" +#~ msgstr "Impostazioni" + +#~ msgid "Configure Clementine..." +#~ msgstr "Configura Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Caricamento motore audio" diff --git a/src/translations/kk.po b/src/translations/kk.po index 3870f02e0..a0a013c67 100644 --- a/src/translations/kk.po +++ b/src/translations/kk.po @@ -1264,7 +1264,7 @@ msgstr "" msgid "F2" msgstr "" -msgid "Configure Clementine..." +msgid "Preferences..." msgstr "" msgid "Ctrl+P" @@ -1312,9 +1312,6 @@ msgstr "" msgid "Add folder..." msgstr "" -msgid "Configure global shortcuts..." -msgstr "" - msgid "Jump to the currently playing track" msgstr "" @@ -1351,9 +1348,6 @@ msgstr "" msgid "Music" msgstr "" -msgid "Settings" -msgstr "" - msgid "Help" msgstr "" @@ -1369,6 +1363,9 @@ msgstr "" msgid "Behavior" msgstr "" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "" diff --git a/src/translations/nb.po b/src/translations/nb.po index b8cd28e4c..5e69d6c55 100644 --- a/src/translations/nb.po +++ b/src/translations/nb.po @@ -1266,8 +1266,8 @@ msgstr "Endre merkelapp..." msgid "F2" msgstr "" -msgid "Configure Clementine..." -msgstr "Konfigurér Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1314,9 +1314,6 @@ msgstr "Fjern fra spillelisten" msgid "Add folder..." msgstr "" -msgid "Configure global shortcuts..." -msgstr "" - msgid "Jump to the currently playing track" msgstr "" @@ -1353,9 +1350,6 @@ msgstr "" msgid "Music" msgstr "Musikk" -msgid "Settings" -msgstr "Innstillinger" - msgid "Help" msgstr "Hjelp" @@ -1371,6 +1365,9 @@ msgstr "Avspilling" msgid "Behavior" msgstr "" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Meldinger" @@ -1530,6 +1527,12 @@ msgstr "" msgid "Delay between visualizations" msgstr "" +#~ msgid "Settings" +#~ msgstr "Innstillinger" + +#~ msgid "Configure Clementine..." +#~ msgstr "Konfigurér Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Laster lydmotor" diff --git a/src/translations/oc.po b/src/translations/oc.po index 8508f016d..fc8f0f936 100644 --- a/src/translations/oc.po +++ b/src/translations/oc.po @@ -1262,8 +1262,8 @@ msgstr "" msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Configurar Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1310,9 +1310,6 @@ msgstr "" msgid "Add folder..." msgstr "" -msgid "Configure global shortcuts..." -msgstr "" - msgid "Jump to the currently playing track" msgstr "" @@ -1349,9 +1346,6 @@ msgstr "Sus Internet" msgid "Music" msgstr "Musica" -msgid "Settings" -msgstr "Paramètres" - msgid "Help" msgstr "Ajuda" @@ -1367,6 +1361,9 @@ msgstr "Sortida" msgid "Behavior" msgstr "Compòrtament" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Notificacions" @@ -1526,5 +1523,11 @@ msgstr "" msgid "Delay between visualizations" msgstr "" +#~ msgid "Settings" +#~ msgstr "Paramètres" + +#~ msgid "Configure Clementine..." +#~ msgstr "Configurar Clementine..." + #~ msgid "Options" #~ msgstr "Opcions" diff --git a/src/translations/pl.po b/src/translations/pl.po index 7966cf920..e34890ab5 100644 --- a/src/translations/pl.po +++ b/src/translations/pl.po @@ -1264,8 +1264,8 @@ msgstr "Edytuj znacznik..." msgid "F2" msgstr "" -msgid "Configure Clementine..." -msgstr "Konfiguruj Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1312,9 +1312,6 @@ msgstr "Usuń z playlisty" msgid "Add folder..." msgstr "" -msgid "Configure global shortcuts..." -msgstr "" - msgid "Jump to the currently playing track" msgstr "" @@ -1351,9 +1348,6 @@ msgstr "" msgid "Music" msgstr "Muzyka" -msgid "Settings" -msgstr "Ustawienia" - msgid "Help" msgstr "Pomoc" @@ -1369,6 +1363,9 @@ msgstr "Odtwarzanie" msgid "Behavior" msgstr "" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Powiadomienia" @@ -1528,6 +1525,12 @@ msgstr "" msgid "Delay between visualizations" msgstr "" +#~ msgid "Settings" +#~ msgstr "Ustawienia" + +#~ msgid "Configure Clementine..." +#~ msgstr "Konfiguruj Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Ładowanie silnika dźwięku" diff --git a/src/translations/pt.po b/src/translations/pt.po index 42b0b6205..a8d1c9c2c 100644 --- a/src/translations/pt.po +++ b/src/translations/pt.po @@ -1268,8 +1268,8 @@ msgstr "Editar a marca..." msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Configurar Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1316,9 +1316,6 @@ msgstr "Remover da lista de reprodução" msgid "Add folder..." msgstr "Adicionar pasta..." -msgid "Configure global shortcuts..." -msgstr "Configurar atalhos globais..." - msgid "Jump to the currently playing track" msgstr "Ir para a faixa de reprodução actual" @@ -1355,9 +1352,6 @@ msgstr "Internet" msgid "Music" msgstr "Música" -msgid "Settings" -msgstr "Definições" - msgid "Help" msgstr "Ajuda" @@ -1373,6 +1367,9 @@ msgstr "Reprodução" msgid "Behavior" msgstr "Comportamento" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Notificações" @@ -1533,6 +1530,15 @@ msgstr "Escolher da lista" msgid "Delay between visualizations" msgstr "" +#~ msgid "Configure global shortcuts..." +#~ msgstr "Configurar atalhos globais..." + +#~ msgid "Settings" +#~ msgstr "Definições" + +#~ msgid "Configure Clementine..." +#~ msgstr "Configurar Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Carregando o sistema de áudio" diff --git a/src/translations/pt_BR.po b/src/translations/pt_BR.po index 828a499af..6f9e7a0c5 100644 --- a/src/translations/pt_BR.po +++ b/src/translations/pt_BR.po @@ -1272,8 +1272,8 @@ msgstr "Editar Marcador" msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Cnfigurar Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1320,9 +1320,6 @@ msgstr "Remover da lista de reprodução" msgid "Add folder..." msgstr "Adicionar pasta..." -msgid "Configure global shortcuts..." -msgstr "Configurar atalhos globais..." - msgid "Jump to the currently playing track" msgstr "Pular para a faixa em execução" @@ -1359,9 +1356,6 @@ msgstr "Internet" msgid "Music" msgstr "Música" -msgid "Settings" -msgstr "Configurações" - msgid "Help" msgstr "Ajuda" @@ -1377,6 +1371,9 @@ msgstr "Reproduzir" msgid "Behavior" msgstr "Comportamento" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Notificações" @@ -1536,6 +1533,15 @@ msgstr "Escolher da lista" msgid "Delay between visualizations" msgstr "" +#~ msgid "Configure global shortcuts..." +#~ msgstr "Configurar atalhos globais..." + +#~ msgid "Settings" +#~ msgstr "Configurações" + +#~ msgid "Configure Clementine..." +#~ msgstr "Cnfigurar Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Carregando mecanismo de áudio" diff --git a/src/translations/ro.po b/src/translations/ro.po index 669fb60ac..d182dfd29 100644 --- a/src/translations/ro.po +++ b/src/translations/ro.po @@ -1263,8 +1263,8 @@ msgstr "" msgid "F2" msgstr "" -msgid "Configure Clementine..." -msgstr "Configurează Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1311,9 +1311,6 @@ msgstr "Elimină din lista de redare" msgid "Add folder..." msgstr "" -msgid "Configure global shortcuts..." -msgstr "" - msgid "Jump to the currently playing track" msgstr "" @@ -1350,9 +1347,6 @@ msgstr "" msgid "Music" msgstr "Muzică" -msgid "Settings" -msgstr "Setări" - msgid "Help" msgstr "Ajutor" @@ -1368,6 +1362,9 @@ msgstr "Redare" msgid "Behavior" msgstr "Comportament" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Notificări" @@ -1527,6 +1524,12 @@ msgstr "" msgid "Delay between visualizations" msgstr "" +#~ msgid "Settings" +#~ msgstr "Setări" + +#~ msgid "Configure Clementine..." +#~ msgstr "Configurează Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Se încarcă motorul audio" diff --git a/src/translations/ru.po b/src/translations/ru.po index d72327f96..dfa74bf17 100644 --- a/src/translations/ru.po +++ b/src/translations/ru.po @@ -1268,8 +1268,8 @@ msgstr "Редактировать тег..." msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Настроить Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1316,9 +1316,6 @@ msgstr "Удалить из списка воспроизведения" msgid "Add folder..." msgstr "Добавить каталог..." -msgid "Configure global shortcuts..." -msgstr "Настройка глобальных горячих клавиш..." - msgid "Jump to the currently playing track" msgstr "Перейти к текущей композиции" @@ -1355,9 +1352,6 @@ msgstr "Интернет" msgid "Music" msgstr "Музыка" -msgid "Settings" -msgstr "Настройки" - msgid "Help" msgstr "Помощь" @@ -1373,6 +1367,9 @@ msgstr "Воспроизведение" msgid "Behavior" msgstr "Поведение" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Уведомления" @@ -1533,6 +1530,15 @@ msgstr "Выбор из списка" msgid "Delay between visualizations" msgstr "" +#~ msgid "Configure global shortcuts..." +#~ msgstr "Настройка глобальных горячих клавиш..." + +#~ msgid "Settings" +#~ msgstr "Настройки" + +#~ msgid "Configure Clementine..." +#~ msgstr "Настроить Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Загрузка движка аудио" diff --git a/src/translations/sk.po b/src/translations/sk.po index a52480046..8dcee775f 100644 --- a/src/translations/sk.po +++ b/src/translations/sk.po @@ -1269,8 +1269,8 @@ msgstr "Upraviť tag..." msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Nastaviť Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1317,9 +1317,6 @@ msgstr "Odstrániť z playlistu" msgid "Add folder..." msgstr "Pridať priečinok..." -msgid "Configure global shortcuts..." -msgstr "Nastaviť globálne skratky..." - msgid "Jump to the currently playing track" msgstr "Skočiť na práve prehrávanú skladbu" @@ -1356,9 +1353,6 @@ msgstr "Internet" msgid "Music" msgstr "Hudba" -msgid "Settings" -msgstr "Nastavenia" - msgid "Help" msgstr "Nápoveda" @@ -1374,6 +1368,9 @@ msgstr "Prehrávanie" msgid "Behavior" msgstr "Správanie" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Notifikácie" @@ -1533,6 +1530,15 @@ msgstr "Vybrať zo zoznamu" msgid "Delay between visualizations" msgstr "" +#~ msgid "Configure global shortcuts..." +#~ msgstr "Nastaviť globálne skratky..." + +#~ msgid "Settings" +#~ msgstr "Nastavenia" + +#~ msgid "Configure Clementine..." +#~ msgstr "Nastaviť Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Načítava sa zvukový engine" diff --git a/src/translations/sv.po b/src/translations/sv.po index d09586a06..bd3d049fd 100644 --- a/src/translations/sv.po +++ b/src/translations/sv.po @@ -1269,8 +1269,8 @@ msgstr "Redigera tagg..." msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Ställ in Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1317,9 +1317,6 @@ msgstr "Ta bort från spellista" msgid "Add folder..." msgstr "Lägg till mapp..." -msgid "Configure global shortcuts..." -msgstr "Ställ in globala genvägar..." - msgid "Jump to the currently playing track" msgstr "Hoppa till det spår som spelas för tillfället" @@ -1356,9 +1353,6 @@ msgstr "Internet" msgid "Music" msgstr "Musik" -msgid "Settings" -msgstr "Inställningar" - msgid "Help" msgstr "Hjälp" @@ -1374,6 +1368,9 @@ msgstr "Uppspelning" msgid "Behavior" msgstr "Beteende" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Underrättelser" @@ -1534,6 +1531,15 @@ msgstr "Välj från listan" msgid "Delay between visualizations" msgstr "" +#~ msgid "Configure global shortcuts..." +#~ msgstr "Ställ in globala genvägar..." + +#~ msgid "Settings" +#~ msgstr "Inställningar" + +#~ msgid "Configure Clementine..." +#~ msgstr "Ställ in Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Laddar audiomotor" diff --git a/src/translations/tr.po b/src/translations/tr.po index 510123555..b2a8de083 100644 --- a/src/translations/tr.po +++ b/src/translations/tr.po @@ -1264,7 +1264,7 @@ msgstr "" msgid "F2" msgstr "F2" -msgid "Configure Clementine..." +msgid "Preferences..." msgstr "" msgid "Ctrl+P" @@ -1312,9 +1312,6 @@ msgstr "" msgid "Add folder..." msgstr "" -msgid "Configure global shortcuts..." -msgstr "" - msgid "Jump to the currently playing track" msgstr "" @@ -1351,9 +1348,6 @@ msgstr "İnternet" msgid "Music" msgstr "Müzik" -msgid "Settings" -msgstr "Ayarlar" - msgid "Help" msgstr "Yardım" @@ -1369,6 +1363,9 @@ msgstr "" msgid "Behavior" msgstr "" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "" @@ -1528,6 +1525,9 @@ msgstr "" msgid "Delay between visualizations" msgstr "" +#~ msgid "Settings" +#~ msgstr "Ayarlar" + #~ msgid "Music (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)" #~ msgstr "Müzik (*.mp3 *.ogg *.flac *.mpc *.m4a *.aac *.wma)" diff --git a/src/translations/uk.po b/src/translations/uk.po index f9b920cfc..59486b91c 100644 --- a/src/translations/uk.po +++ b/src/translations/uk.po @@ -1269,8 +1269,8 @@ msgstr "Змінити позначку..." msgid "F2" msgstr "F2" -msgid "Configure Clementine..." -msgstr "Налаштувати Clementine..." +msgid "Preferences..." +msgstr "" msgid "Ctrl+P" msgstr "" @@ -1317,9 +1317,6 @@ msgstr "Вилучити зі списку відтворення" msgid "Add folder..." msgstr "Додати теку..." -msgid "Configure global shortcuts..." -msgstr "Налаштувати глобальні комбінації клавіш..." - msgid "Jump to the currently playing track" msgstr "Перейти до відтворюваної доріжки" @@ -1356,9 +1353,6 @@ msgstr "Інтернет" msgid "Music" msgstr "Музика" -msgid "Settings" -msgstr "Налаштування" - msgid "Help" msgstr "Довідка" @@ -1374,6 +1368,9 @@ msgstr "Відтворення" msgid "Behavior" msgstr "Поведінка" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "Сповіщення" @@ -1533,6 +1530,15 @@ msgstr "Вибрати зі списку" msgid "Delay between visualizations" msgstr "" +#~ msgid "Configure global shortcuts..." +#~ msgstr "Налаштувати глобальні комбінації клавіш..." + +#~ msgid "Settings" +#~ msgstr "Налаштування" + +#~ msgid "Configure Clementine..." +#~ msgstr "Налаштувати Clementine..." + #~ msgid "Loading audio engine" #~ msgstr "Завантаження аудіо-рушія" diff --git a/src/translations/zh_CN.po b/src/translations/zh_CN.po index 46e6e7245..636516bdc 100644 --- a/src/translations/zh_CN.po +++ b/src/translations/zh_CN.po @@ -1262,7 +1262,7 @@ msgstr "" msgid "F2" msgstr "" -msgid "Configure Clementine..." +msgid "Preferences..." msgstr "" msgid "Ctrl+P" @@ -1310,9 +1310,6 @@ msgstr "" msgid "Add folder..." msgstr "" -msgid "Configure global shortcuts..." -msgstr "" - msgid "Jump to the currently playing track" msgstr "" @@ -1349,9 +1346,6 @@ msgstr "" msgid "Music" msgstr "" -msgid "Settings" -msgstr "" - msgid "Help" msgstr "" @@ -1367,6 +1361,9 @@ msgstr "" msgid "Behavior" msgstr "" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "" diff --git a/src/translations/zh_TW.po b/src/translations/zh_TW.po index d2ddbadda..418970f11 100644 --- a/src/translations/zh_TW.po +++ b/src/translations/zh_TW.po @@ -1262,7 +1262,7 @@ msgstr "" msgid "F2" msgstr "" -msgid "Configure Clementine..." +msgid "Preferences..." msgstr "" msgid "Ctrl+P" @@ -1310,9 +1310,6 @@ msgstr "從撥放清單移除" msgid "Add folder..." msgstr "" -msgid "Configure global shortcuts..." -msgstr "" - msgid "Jump to the currently playing track" msgstr "" @@ -1349,9 +1346,6 @@ msgstr "" msgid "Music" msgstr "" -msgid "Settings" -msgstr "" - msgid "Help" msgstr "" @@ -1367,6 +1361,9 @@ msgstr "" msgid "Behavior" msgstr "" +msgid "Global Shortcuts" +msgstr "" + msgid "Notifications" msgstr "" diff --git a/src/ui/globalshortcutsdialog.cpp b/src/ui/globalshortcutsconfig.cpp similarity index 78% rename from src/ui/globalshortcutsdialog.cpp rename to src/ui/globalshortcutsconfig.cpp index da1d1602f..4e5c68ee1 100644 --- a/src/ui/globalshortcutsdialog.cpp +++ b/src/ui/globalshortcutsconfig.cpp @@ -15,8 +15,8 @@ */ #include "globalshortcutgrabber.h" -#include "globalshortcutsdialog.h" -#include "ui_globalshortcutsdialog.h" +#include "globalshortcutsconfig.h" +#include "ui_globalshortcutsconfig.h" #include "core/globalshortcuts.h" #include @@ -26,23 +26,35 @@ #include #include -GlobalShortcutsDialog::GlobalShortcutsDialog(GlobalShortcuts* manager, - QWidget* parent) - : QDialog(parent), - ui_(new Ui_GlobalShortcutsDialog), - manager_(manager), +GlobalShortcutsConfig::GlobalShortcutsConfig(QWidget* parent) + : QWidget(parent), + ui_(new Ui_GlobalShortcutsConfig), + manager_(NULL), grabber_(new GlobalShortcutGrabber) { ui_->setupUi(this); ui_->shortcut_options->setEnabled(false); ui_->list->header()->setResizeMode(QHeaderView::ResizeToContents); + settings_.beginGroup(GlobalShortcuts::kSettingsGroup); + + connect(ui_->list, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), SLOT(ItemClicked(QTreeWidgetItem*))); + connect(ui_->radio_none, SIGNAL(clicked()), SLOT(NoneClicked())); + connect(ui_->radio_default, SIGNAL(clicked()), SLOT(DefaultClicked())); + connect(ui_->radio_custom, SIGNAL(clicked()), SLOT(ChangeClicked())); + connect(ui_->change, SIGNAL(clicked()), SLOT(ChangeClicked())); + connect(ui_->gnome_open, SIGNAL(clicked()), SLOT(OpenGnomeKeybindingProperties())); +} + +void GlobalShortcutsConfig::SetManager(GlobalShortcuts *manager) { + manager_ = manager; + + connect(ui_->mac_open, SIGNAL(clicked()), manager_, SLOT(ShowMacAccessibilityDialog())); + if (!manager->IsGsdAvailable()) { ui_->gnome_container->hide(); } - settings_.beginGroup(GlobalShortcuts::kSettingsGroup); - foreach (const GlobalShortcuts::Shortcut& s, manager_->shortcuts().values()) { Shortcut shortcut; shortcut.s = s; @@ -55,64 +67,45 @@ GlobalShortcutsDialog::GlobalShortcutsDialog(GlobalShortcuts* manager, } ui_->list->sortItems(0, Qt::AscendingOrder); - - connect(ui_->button_box->button(QDialogButtonBox::Reset), SIGNAL(clicked()), SLOT(ResetAll())); - connect(ui_->list, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), SLOT(ItemClicked(QTreeWidgetItem*))); - connect(ui_->radio_none, SIGNAL(clicked()), SLOT(NoneClicked())); - connect(ui_->radio_default, SIGNAL(clicked()), SLOT(DefaultClicked())); - connect(ui_->radio_custom, SIGNAL(clicked()), SLOT(ChangeClicked())); - connect(ui_->change, SIGNAL(clicked()), SLOT(ChangeClicked())); - connect(ui_->gnome_open, SIGNAL(clicked()), SLOT(OpenGnomeKeybindingProperties())); - connect(ui_->mac_open, SIGNAL(clicked()), manager_, SLOT(ShowMacAccessibilityDialog())); - ItemClicked(ui_->list->topLevelItem(0)); } -GlobalShortcutsDialog::~GlobalShortcutsDialog() { +GlobalShortcutsConfig::~GlobalShortcutsConfig() { delete ui_; } -void GlobalShortcutsDialog::showEvent(QShowEvent*) { +void GlobalShortcutsConfig::Load() { foreach (const Shortcut& s, shortcuts_.values()) { SetShortcut(s.s.id, s.s.action->shortcut()); } bool use_gnome = settings_.value("use_gnome", true).toBool(); - if (ui_->gnome_container->isVisible()) { + if (ui_->gnome_container->isVisibleTo(this)) { ui_->gnome_checkbox->setChecked(use_gnome); } ui_->mac_container->setVisible(!manager_->IsMacAccessibilityEnabled()); } -void GlobalShortcutsDialog::ResetAll() { - foreach (const QString& id, shortcuts_.keys()) { - SetShortcut(id, shortcuts_[id].s.default_key); - } -} - -void GlobalShortcutsDialog::SetShortcut(const QString& id, const QKeySequence& key) { +void GlobalShortcutsConfig::SetShortcut(const QString& id, const QKeySequence& key) { Shortcut& shortcut = shortcuts_[id]; shortcut.key = key; shortcut.item->setText(1, key.toString(QKeySequence::NativeText)); } -void GlobalShortcutsDialog::accept() { - Save(); - QDialog::accept(); -} - -void GlobalShortcutsDialog::Save() { +void GlobalShortcutsConfig::Save() { foreach (const Shortcut& s, shortcuts_.values()) { s.s.action->setShortcut(s.key); settings_.setValue(s.s.id, s.key.toString()); } settings_.setValue("use_gnome", ui_->gnome_checkbox->isChecked()); + + manager_->ReloadSettings(); } -void GlobalShortcutsDialog::ItemClicked(QTreeWidgetItem* item) { +void GlobalShortcutsConfig::ItemClicked(QTreeWidgetItem* item) { current_id_ = item->data(0, Qt::UserRole).toString(); Shortcut& shortcut = shortcuts_[current_id_]; @@ -128,15 +121,15 @@ void GlobalShortcutsDialog::ItemClicked(QTreeWidgetItem* item) { ui_->radio_custom->setChecked(true); } -void GlobalShortcutsDialog::NoneClicked() { +void GlobalShortcutsConfig::NoneClicked() { SetShortcut(current_id_, QKeySequence()); } -void GlobalShortcutsDialog::DefaultClicked() { +void GlobalShortcutsConfig::DefaultClicked() { SetShortcut(current_id_, shortcuts_[current_id_].s.default_key); } -void GlobalShortcutsDialog::ChangeClicked() { +void GlobalShortcutsConfig::ChangeClicked() { QKeySequence key = grabber_->GetKey(shortcuts_[current_id_].s.action->text()); if (key.isEmpty()) return; @@ -145,7 +138,7 @@ void GlobalShortcutsDialog::ChangeClicked() { SetShortcut(current_id_, key); } -void GlobalShortcutsDialog::OpenGnomeKeybindingProperties() { +void GlobalShortcutsConfig::OpenGnomeKeybindingProperties() { if (!QProcess::startDetached("gnome-keybinding-properties")) { QMessageBox::warning(this, "Error", tr("The \"%1\" command could not be started.") diff --git a/src/ui/globalshortcutsdialog.h b/src/ui/globalshortcutsconfig.h similarity index 76% rename from src/ui/globalshortcutsdialog.h rename to src/ui/globalshortcutsconfig.h index fcc903cb3..8c212d3e9 100644 --- a/src/ui/globalshortcutsdialog.h +++ b/src/ui/globalshortcutsconfig.h @@ -14,10 +14,10 @@ along with Clementine. If not, see . */ -#ifndef GLOBALSHORTCUTSDIALOG_H -#define GLOBALSHORTCUTSDIALOG_H +#ifndef GLOBALSHORTCUTSCONFIG_H +#define GLOBALSHORTCUTSCONFIG_H -#include +#include #include #include @@ -27,25 +27,22 @@ class QTreeWidgetItem; -class Ui_GlobalShortcutsDialog; +class Ui_GlobalShortcutsConfig; class GlobalShortcutGrabber; -class GlobalShortcutsDialog : public QDialog { +class GlobalShortcutsConfig : public QWidget { Q_OBJECT public: - GlobalShortcutsDialog(GlobalShortcuts* manager, QWidget* parent = 0); - ~GlobalShortcutsDialog(); + GlobalShortcutsConfig(QWidget* parent = 0); + ~GlobalShortcutsConfig(); - protected: - // QWidget - void showEvent(QShowEvent *); + void SetManager(GlobalShortcuts* manager); + + void Load(); + void Save(); private slots: - void accept(); - - void ResetAll(); - void ItemClicked(QTreeWidgetItem*); void NoneClicked(); void DefaultClicked(); @@ -53,8 +50,6 @@ class GlobalShortcutsDialog : public QDialog { void OpenGnomeKeybindingProperties(); - void Save(); - private: struct Shortcut { GlobalShortcuts::Shortcut s; @@ -65,7 +60,7 @@ class GlobalShortcutsDialog : public QDialog { void SetShortcut(const QString& id, const QKeySequence& key); private: - Ui_GlobalShortcutsDialog* ui_; + Ui_GlobalShortcutsConfig* ui_; GlobalShortcuts* manager_; boost::scoped_ptr grabber_; @@ -76,4 +71,4 @@ class GlobalShortcutsDialog : public QDialog { QString current_id_; }; -#endif // GLOBALSHORTCUTSDIALOG_H +#endif // GLOBALSHORTCUTSCONFIG_H diff --git a/src/ui/globalshortcutsdialog.ui b/src/ui/globalshortcutsconfig.ui similarity index 82% rename from src/ui/globalshortcutsdialog.ui rename to src/ui/globalshortcutsconfig.ui index c6901b70a..017740712 100644 --- a/src/ui/globalshortcutsdialog.ui +++ b/src/ui/globalshortcutsconfig.ui @@ -1,7 +1,7 @@ - GlobalShortcutsDialog - + GlobalShortcutsConfig + 0 @@ -167,19 +167,6 @@ - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset - - - false - - - @@ -188,44 +175,11 @@ radio_default radio_custom change - button_box - - button_box - accepted() - GlobalShortcutsDialog - accept() - - - 358 - 368 - - - 333 - 346 - - - - - button_box - rejected() - GlobalShortcutsDialog - reject() - - - 436 - 374 - - - 440 - 391 - - - gnome_checkbox toggled(bool) diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index f7fe1eee9..80f5ab186 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -49,7 +49,6 @@ #include "ui/albumcovermanager.h" #include "ui/edittagdialog.h" #include "ui/equalizer.h" -#include "ui/globalshortcutsdialog.h" #include "ui/iconloader.h" #include "ui/qtsystemtrayicon.h" #ifdef Q_OS_DARWIN @@ -121,7 +120,6 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg cover_manager_(NULL), equalizer_(new Equalizer), transcode_dialog_(new TranscodeDialog), - global_shortcuts_dialog_(new GlobalShortcutsDialog(global_shortcuts_)), error_dialog_(new ErrorDialog), #ifdef ENABLE_VISUALISATIONS visualisation_(new VisualisationContainer), @@ -194,7 +192,6 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg ui_->action_add_stream->setIcon(IconLoader::Load("document-open-remote")); ui_->action_clear_playlist->setIcon(IconLoader::Load("edit-clear-list")); ui_->action_configure->setIcon(IconLoader::Load("configure")); - ui_->action_configure_global_shortcuts->setIcon(IconLoader::Load("configure-shortcuts")); ui_->action_cover_manager->setIcon(IconLoader::Load("download")); ui_->action_edit_track->setIcon(IconLoader::Load("edit-rename")); ui_->action_equalizer->setIcon(IconLoader::Load("view-media-equalizer")); @@ -252,7 +249,6 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg connect(ui_->action_cover_manager, SIGNAL(triggered()), cover_manager_.get(), SLOT(show())); connect(ui_->action_equalizer, SIGNAL(triggered()), equalizer_.get(), SLOT(show())); connect(ui_->action_transcode, SIGNAL(triggered()), transcode_dialog_.get(), SLOT(show())); - connect(ui_->action_configure_global_shortcuts, SIGNAL(triggered()), global_shortcuts_dialog_.get(), SLOT(show())); connect(ui_->action_jump, SIGNAL(triggered()), ui_->playlist->view(), SLOT(JumpToCurrentlyPlayingTrack())); connect(ui_->action_update_library, SIGNAL(triggered()), library_, SLOT(IncrementalScan())); connect(ui_->action_rain, SIGNAL(toggled(bool)), player_, SLOT(MakeItRain(bool))); @@ -408,14 +404,8 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg // Force this menu to be the app "Preferences". ui_->action_configure->setMenuRole(QAction::PreferencesRole); - // Force this menu into the "Clementine" menu. - ui_->action_configure_global_shortcuts->setMenuRole(QAction::ApplicationSpecificRole); // Force this menu to be the app "About". ui_->action_about->setMenuRole(QAction::AboutRole); - - if (QSysInfo::MacintoshVersion != QSysInfo::MV_SNOWLEOPARD) { - ui_->action_configure_global_shortcuts->setEnabled(false); - } #endif // Global shortcuts @@ -431,7 +421,7 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg connect(global_shortcuts_, SIGNAL(Mute()), player_, SLOT(Mute())); connect(global_shortcuts_, SIGNAL(SeekForward()), player_, SLOT(SeekForward())); connect(global_shortcuts_, SIGNAL(SeekBackward()), player_, SLOT(SeekBackward())); - connect(global_shortcuts_dialog_.get(), SIGNAL(accepted()), global_shortcuts_, SLOT(ReloadSettings())); + settings_dialog_->SetGlobalShortcutManager(global_shortcuts_); // Settings connect(settings_dialog_.get(), SIGNAL(accepted()), SLOT(ReloadSettings())); diff --git a/src/ui/mainwindow.h b/src/ui/mainwindow.h index 9c4be1b52..841903408 100644 --- a/src/ui/mainwindow.h +++ b/src/ui/mainwindow.h @@ -38,7 +38,6 @@ class EditTagDialog; class Equalizer; class ErrorDialog; class GlobalShortcuts; -class GlobalShortcutsDialog; class GroupByDialog; class Library; class MultiLoadingIndicator; @@ -181,7 +180,6 @@ class MainWindow : public QMainWindow, public PlatformInterface { boost::scoped_ptr cover_manager_; boost::scoped_ptr equalizer_; boost::scoped_ptr transcode_dialog_; - boost::scoped_ptr global_shortcuts_dialog_; boost::scoped_ptr error_dialog_; #ifdef ENABLE_VISUALISATIONS diff --git a/src/ui/mainwindow.ui b/src/ui/mainwindow.ui index f4a19df3b..99c8e34b3 100644 --- a/src/ui/mainwindow.ui +++ b/src/ui/mainwindow.ui @@ -89,9 +89,6 @@ false - - false - @@ -518,13 +515,6 @@ - - - Settings - - - - Help @@ -547,11 +537,12 @@ + + - @@ -675,7 +666,7 @@ - Configure Clementine... + Preferences... Ctrl+P @@ -761,11 +752,6 @@ Add folder... - - - Configure global shortcuts... - - Jump to the currently playing track diff --git a/src/ui/settingsdialog.cpp b/src/ui/settingsdialog.cpp index 347ca39a4..8e985cc13 100644 --- a/src/ui/settingsdialog.cpp +++ b/src/ui/settingsdialog.cpp @@ -43,9 +43,10 @@ SettingsDialog::SettingsDialog(QWidget* parent) QImage(":nocover.png")); // Icons - ui_->list->item(0)->setIcon(IconLoader::Load("media-playback-start")); // Playback - ui_->list->item(2)->setIcon(IconLoader::Load("help-hint")); // Notifications - ui_->list->item(3)->setIcon(IconLoader::Load("folder-sound")); // Library + ui_->list->item(Page_Playback)->setIcon(IconLoader::Load("media-playback-start")); + ui_->list->item(Page_GlobalShortcuts)->setIcon(IconLoader::Load("input-keyboard")); + ui_->list->item(Page_Notifications)->setIcon(IconLoader::Load("help-hint")); + ui_->list->item(Page_Library)->setIcon(IconLoader::Load("folder-sound")); // Playback connect(ui_->fading_cross, SIGNAL(toggled(bool)), SLOT(FadingOptionsChanged())); @@ -63,12 +64,19 @@ SettingsDialog::SettingsDialog(QWidget* parent) // Behaviour connect(ui_->b_show_tray_icon_, SIGNAL(toggled(bool)), SLOT(ShowTrayIconToggled(bool))); + // Global shortcuts +#ifdef Q_OS_MAC + if (QSysInfo::MacintoshVersion != QSysInfo::MV_SNOWLEOPARD) { + ui_->list->item(Page_GlobalShortcuts)->setFlags(Qt::NoItemFlags); + } +#endif + // Last.fm connect(ui_->lastfm, SIGNAL(ValidationComplete(bool)), SLOT(LastFMValidationComplete(bool))); // List box connect(ui_->list, SIGNAL(currentTextChanged(QString)), SLOT(CurrentTextChanged(QString))); - ui_->list->setCurrentRow(0); + ui_->list->setCurrentRow(Page_Playback); // Notifications ui_->notifications_bg_preset->setItemData(0, QColor(OSDPretty::kPresetBlue), Qt::DecorationRole); @@ -94,7 +102,7 @@ SettingsDialog::SettingsDialog(QWidget* parent) ui_->list->setMinimumWidth(ui_->list->sizeHintForColumn(0)); #ifdef Q_OS_DARWIN - ui_->list->item(1)->setHidden(true); // Hide "Behaviour" on mac. + ui_->list->item(Page_Behaviour)->setHidden(true); // Hide "Behaviour" on mac. #endif } @@ -111,6 +119,10 @@ void SettingsDialog::SetLibraryDirectoryModel(LibraryDirectoryModel* model) { ui_->library_config->SetModel(model); } +void SettingsDialog::SetGlobalShortcutManager(GlobalShortcuts *manager) { + ui_->global_shortcuts->SetManager(manager); +} + void SettingsDialog::LastFMValidationComplete(bool success) { ui_->buttonBox->setEnabled(true); @@ -183,6 +195,7 @@ void SettingsDialog::accept() { ui_->library_config->Save(); ui_->magnatune->Save(); + ui_->global_shortcuts->Save(); QDialog::accept(); } @@ -209,6 +222,9 @@ void SettingsDialog::showEvent(QShowEvent*) { // Magnatune ui_->magnatune->Load(); + // Global Shortcuts + ui_->global_shortcuts->Load(); + // Playback s.beginGroup(Engine::Base::kSettingsGroup); ui_->fading_out->setChecked(s.value("FadeoutEnabled", true).toBool()); diff --git a/src/ui/settingsdialog.h b/src/ui/settingsdialog.h index a2dbc804f..d8e62d8a8 100644 --- a/src/ui/settingsdialog.h +++ b/src/ui/settingsdialog.h @@ -21,6 +21,7 @@ #include "config.h" +class GlobalShortcuts; class LibraryDirectoryModel; class OSDPretty; class Ui_SettingsDialog; @@ -39,6 +40,7 @@ class SettingsDialog : public QDialog { enum Page { Page_Playback = 0, Page_Behaviour, + Page_GlobalShortcuts, Page_Notifications, Page_Library, Page_Lastfm, @@ -46,6 +48,7 @@ class SettingsDialog : public QDialog { }; void SetLibraryDirectoryModel(LibraryDirectoryModel* model); + void SetGlobalShortcutManager(GlobalShortcuts* manager); #ifdef HAVE_GSTREAMER void SetGstEngine(const GstEngine* engine); #endif diff --git a/src/ui/settingsdialog.ui b/src/ui/settingsdialog.ui index 9a48aed47..61a618e78 100644 --- a/src/ui/settingsdialog.ui +++ b/src/ui/settingsdialog.ui @@ -11,7 +11,7 @@ - Settings + Preferences @@ -64,6 +64,11 @@ :/icon.png:/icon.png + + + Global Shortcuts + + Notifications @@ -109,7 +114,7 @@ - 5 + 2 @@ -409,6 +414,19 @@ + + + + 0 + + + 0 + + + + + + @@ -670,6 +688,12 @@
radio/magnatuneconfig.h
1 + + GlobalShortcutsConfig + QWidget +
ui/globalshortcutsconfig.h
+ 1 +
list