diff --git a/src/translations/ar.po b/src/translations/ar.po index 15a99472f..bcad1d164 100644 --- a/src/translations/ar.po +++ b/src/translations/ar.po @@ -642,9 +642,6 @@ msgstr "" msgid "Drag to reposition" msgstr "" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "" diff --git a/src/translations/bg.po b/src/translations/bg.po index 455b86cf6..b521432f3 100644 --- a/src/translations/bg.po +++ b/src/translations/bg.po @@ -642,9 +642,6 @@ msgstr "" msgid "Drag to reposition" msgstr "" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "" diff --git a/src/translations/ca.po b/src/translations/ca.po index bef1c165c..3d1ba0b91 100644 --- a/src/translations/ca.po +++ b/src/translations/ca.po @@ -654,9 +654,6 @@ msgstr "Descarregant el catàleg de Magnatune" msgid "Drag to reposition" msgstr "Arrossegueu per canviar de posició" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Editar etiqueta \"%1\"..." diff --git a/src/translations/cs.po b/src/translations/cs.po index cbc969f08..125045135 100644 --- a/src/translations/cs.po +++ b/src/translations/cs.po @@ -643,9 +643,6 @@ msgstr "" msgid "Drag to reposition" msgstr "Přemístit přetažením" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Upravit tag\"%1\"..." diff --git a/src/translations/da.po b/src/translations/da.po index 157c742b1..67bb7c5f7 100644 --- a/src/translations/da.po +++ b/src/translations/da.po @@ -643,9 +643,6 @@ msgstr "" msgid "Drag to reposition" msgstr "Træk for at skifte position" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Redigér mærke \"%1\"..." diff --git a/src/translations/de.po b/src/translations/de.po index 0ed707d74..e5c88c9bd 100644 --- a/src/translations/de.po +++ b/src/translations/de.po @@ -653,9 +653,6 @@ msgstr "Magnatune-Katalog wird geladen" msgid "Drag to reposition" msgstr "Klicken und ziehen um die Position zu ändern" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "%1 bearbeiten" diff --git a/src/translations/el.po b/src/translations/el.po index 423b0fae6..7bfe3510e 100644 --- a/src/translations/el.po +++ b/src/translations/el.po @@ -655,9 +655,6 @@ msgstr "Μεταφόρτωση καταλόγου του Magnatune" msgid "Drag to reposition" msgstr "Σύρετε για μετακίνηση" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Τροποποίηση ετικέτας \"%1\"..." diff --git a/src/translations/en_CA.po b/src/translations/en_CA.po index 99433d64f..b65da9e00 100644 --- a/src/translations/en_CA.po +++ b/src/translations/en_CA.po @@ -644,9 +644,6 @@ msgstr "Downloading Magnatune catalogue" msgid "Drag to reposition" msgstr "Drag to reposition" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Edit tag \"%1\"..." diff --git a/src/translations/en_GB.po b/src/translations/en_GB.po index 9a8e80184..453566934 100644 --- a/src/translations/en_GB.po +++ b/src/translations/en_GB.po @@ -642,9 +642,6 @@ msgstr "" msgid "Drag to reposition" msgstr "Drag to reposition" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Edit tag \"%1\"..." diff --git a/src/translations/es.po b/src/translations/es.po index 1ce8356af..714be06ca 100644 --- a/src/translations/es.po +++ b/src/translations/es.po @@ -655,9 +655,6 @@ msgstr "Descargando el catálogo de Magnatune" msgid "Drag to reposition" msgstr "Arrastrar para reposicionar" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Editar etiqueta \"%1\"..." diff --git a/src/translations/fi.po b/src/translations/fi.po index a47da652b..fd5d1708e 100644 --- a/src/translations/fi.po +++ b/src/translations/fi.po @@ -642,9 +642,6 @@ msgstr "" msgid "Drag to reposition" msgstr "" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "" diff --git a/src/translations/fr.po b/src/translations/fr.po index 9936100fd..fde27a2d5 100644 --- a/src/translations/fr.po +++ b/src/translations/fr.po @@ -647,9 +647,6 @@ msgstr "Téléchargement du catalogue Magnatune" msgid "Drag to reposition" msgstr "Déplacer pour repositionner" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Modifer le tag « %1 »..." diff --git a/src/translations/gl.po b/src/translations/gl.po index 8b0f487aa..6b30d1f14 100644 --- a/src/translations/gl.po +++ b/src/translations/gl.po @@ -642,9 +642,6 @@ msgstr "" msgid "Drag to reposition" msgstr "Arraste para posicionar" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Editar a tag \"%1\"..." diff --git a/src/translations/hu.po b/src/translations/hu.po index dcf32576f..e8607c228 100644 --- a/src/translations/hu.po +++ b/src/translations/hu.po @@ -651,9 +651,6 @@ msgstr "Magnatune katalógus letöltése" msgid "Drag to reposition" msgstr "Fogja meg az áthelyezéshez" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "\"%1\" címke módosítása..." diff --git a/src/translations/it.po b/src/translations/it.po index b9ee46a91..86dbb6ff1 100644 --- a/src/translations/it.po +++ b/src/translations/it.po @@ -658,9 +658,6 @@ msgstr "Scaricamento catalogo Magnatune" msgid "Drag to reposition" msgstr "Trascina per riposizionare" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Modifica tag \"%1\"..." diff --git a/src/translations/kk.po b/src/translations/kk.po index b3ef3fc46..1c7204767 100644 --- a/src/translations/kk.po +++ b/src/translations/kk.po @@ -642,9 +642,6 @@ msgstr "" msgid "Drag to reposition" msgstr "" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "" diff --git a/src/translations/lt.po b/src/translations/lt.po index d37d2c245..5cf59bcab 100644 --- a/src/translations/lt.po +++ b/src/translations/lt.po @@ -642,9 +642,6 @@ msgstr "" msgid "Drag to reposition" msgstr "" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "" diff --git a/src/translations/nb.po b/src/translations/nb.po index 6f5b3cf6c..7cf21fae3 100644 --- a/src/translations/nb.po +++ b/src/translations/nb.po @@ -642,9 +642,6 @@ msgstr "" msgid "Drag to reposition" msgstr "Dra for å endre posisjon" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Endre merkelapp \"%1\"..." diff --git a/src/translations/nl.po b/src/translations/nl.po index 7870c2969..8ff9c5aa8 100644 --- a/src/translations/nl.po +++ b/src/translations/nl.po @@ -650,9 +650,6 @@ msgstr "Magnatune catalogus wordt gedownload" msgid "Drag to reposition" msgstr "Sleep om te verplaatsen" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Tag \"%1\" bewerken..." diff --git a/src/translations/oc.po b/src/translations/oc.po index aec61b784..40f21e9c5 100644 --- a/src/translations/oc.po +++ b/src/translations/oc.po @@ -642,9 +642,6 @@ msgstr "" msgid "Drag to reposition" msgstr "" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "" diff --git a/src/translations/pl.po b/src/translations/pl.po index 4864f6e9f..181148b68 100644 --- a/src/translations/pl.po +++ b/src/translations/pl.po @@ -648,9 +648,6 @@ msgstr "Pobieranie katalogu Magnatune" msgid "Drag to reposition" msgstr "Przeciągnij aby zmienić pozycję" -msgid "Edit action" -msgstr "Edytuj akcje" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Edytuj znacznik \"%1\"..." @@ -1977,6 +1974,9 @@ msgstr "zatrzymaj" msgid "track %1" msgstr "utwór %1" +#~ msgid "Edit action" +#~ msgstr "Edytuj akcje" + #~ msgid "Keep buttons for %1 second" #~ msgstr "Przytrzymaj klawisze przez %1 sekunde" diff --git a/src/translations/pt.po b/src/translations/pt.po index 1d0a9095f..4b2a7ce30 100644 --- a/src/translations/pt.po +++ b/src/translations/pt.po @@ -652,9 +652,6 @@ msgstr "Transferindo Catálogo Magnatune" msgid "Drag to reposition" msgstr "Arraste para posicionar" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Editar marca \"%1\"..." diff --git a/src/translations/pt_BR.po b/src/translations/pt_BR.po index 184e99b4e..cc12a95a6 100644 --- a/src/translations/pt_BR.po +++ b/src/translations/pt_BR.po @@ -647,9 +647,6 @@ msgstr "Baixando catálogo da Magnatune" msgid "Drag to reposition" msgstr "Arraste para reposicionar" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Editar marcador \"%1\"..." diff --git a/src/translations/ro.po b/src/translations/ro.po index 386af07c5..49da5873d 100644 --- a/src/translations/ro.po +++ b/src/translations/ro.po @@ -642,9 +642,6 @@ msgstr "" msgid "Drag to reposition" msgstr "Trage pentru a repoziționa" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "" diff --git a/src/translations/ru.po b/src/translations/ru.po index 8240879bf..5fe414bb5 100644 --- a/src/translations/ru.po +++ b/src/translations/ru.po @@ -649,9 +649,6 @@ msgstr "Скачать каталог Magnatune" msgid "Drag to reposition" msgstr "Тащите для перемещения" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Редактировать тег \"%1\"..." diff --git a/src/translations/sk.po b/src/translations/sk.po index 5a7b591f9..389155791 100644 --- a/src/translations/sk.po +++ b/src/translations/sk.po @@ -651,9 +651,6 @@ msgstr "Sťahovanie Magnatune katalógu" msgid "Drag to reposition" msgstr "Pretiahnite na iné miesto" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Upraviť tag \"%1\"..." diff --git a/src/translations/sl.po b/src/translations/sl.po index ec303f2a0..6080a356e 100644 --- a/src/translations/sl.po +++ b/src/translations/sl.po @@ -650,9 +650,6 @@ msgstr "Poteka prenos Magnatune kataloga" msgid "Drag to reposition" msgstr "Povlecite za spremembo položaja" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Uredi značko \"%1\"" diff --git a/src/translations/sr.po b/src/translations/sr.po index 880d70942..78637e482 100644 --- a/src/translations/sr.po +++ b/src/translations/sr.po @@ -644,9 +644,6 @@ msgstr "Преузми Магнатјунов каталог" msgid "Drag to reposition" msgstr "Одвуците га где желите" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Уреди ознаку \"%1\"..." diff --git a/src/translations/sv.po b/src/translations/sv.po index f234f089c..50fe636c4 100644 --- a/src/translations/sv.po +++ b/src/translations/sv.po @@ -646,9 +646,6 @@ msgstr "Hämtar katalog från Magnatune" msgid "Drag to reposition" msgstr "Dra för att ändra position" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Redigera tagg \"%1\"..." diff --git a/src/translations/tr.po b/src/translations/tr.po index 67c8c497b..0e2edfbf2 100644 --- a/src/translations/tr.po +++ b/src/translations/tr.po @@ -642,9 +642,6 @@ msgstr "Magnatune kataloğu indiriliyor" msgid "Drag to reposition" msgstr "Yeniden konumlandırmak için sürükleyin" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "\"%1\" etiketini düzenle..." diff --git a/src/translations/translations.pot b/src/translations/translations.pot index e7385752c..2df85684f 100644 --- a/src/translations/translations.pot +++ b/src/translations/translations.pot @@ -632,9 +632,6 @@ msgstr "" msgid "Drag to reposition" msgstr "" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "" diff --git a/src/translations/uk.po b/src/translations/uk.po index 7d954fa21..fd314b984 100644 --- a/src/translations/uk.po +++ b/src/translations/uk.po @@ -650,9 +650,6 @@ msgstr "Завантаження каталогу Magnatune" msgid "Drag to reposition" msgstr "Перетягніть, щоб змінити розташування" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "Змінити позначку \"%1\"..." diff --git a/src/translations/zh_CN.po b/src/translations/zh_CN.po index 664f95a70..826db6dc4 100644 --- a/src/translations/zh_CN.po +++ b/src/translations/zh_CN.po @@ -642,9 +642,6 @@ msgstr "" msgid "Drag to reposition" msgstr "" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "" diff --git a/src/translations/zh_TW.po b/src/translations/zh_TW.po index db27235be..4f78296e6 100644 --- a/src/translations/zh_TW.po +++ b/src/translations/zh_TW.po @@ -646,9 +646,6 @@ msgstr "下載 Magnatune目錄" msgid "Drag to reposition" msgstr "拖曳以重新定位" -msgid "Edit action" -msgstr "" - #, qt-format msgid "Edit tag \"%1\"..." msgstr "" diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index ff7cff5c3..6d85f24b0 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -474,7 +474,7 @@ MainWindow::MainWindow(NetworkAccessManager* network, Engine::Type engine, QWidg #endif #ifdef ENABLE_WIIMOTEDEV - wiimotedev_shortcuts_.reset(new WiimotedevShortcuts(player_)); + wiimotedev_shortcuts_.reset(new WiimotedevShortcuts(this, player_)); #endif qDebug() << t.restart() << "tray"; diff --git a/src/wiimotedev/shortcuts.cpp b/src/wiimotedev/shortcuts.cpp index 67f333546..f0f7c48af 100644 --- a/src/wiimotedev/shortcuts.cpp +++ b/src/wiimotedev/shortcuts.cpp @@ -22,8 +22,9 @@ const char* WiimotedevShortcuts::kActionsGroup = "WiimotedevActions"; const char* WiimotedevShortcuts::kSettingsGroup = "WiimotedevSettings"; -WiimotedevShortcuts::WiimotedevShortcuts(QObject* parent) +WiimotedevShortcuts::WiimotedevShortcuts(QWidget* window, QObject* parent) :QObject(parent), + main_window_(window), player_(qobject_cast(parent)), wiimotedev_active_(true), wiimotedev_buttons_(0), @@ -85,6 +86,10 @@ void WiimotedevShortcuts::ReloadSettings() { void WiimotedevShortcuts::DbusWiimoteGeneralButtons(uint id, qulonglong value) { if (id != wiimotedev_device_ || !wiimotedev_enable_ || !player_) return; + if (wiimotedev_focus_ && !main_window_->isActiveWindow()) + return; + + quint64 buttons = value & ~( WIIMOTE_TILT_MASK | NUNCHUK_TILT_MASK | diff --git a/src/wiimotedev/shortcuts.h b/src/wiimotedev/shortcuts.h index 5a8e5c24c..30843fae0 100644 --- a/src/wiimotedev/shortcuts.h +++ b/src/wiimotedev/shortcuts.h @@ -17,6 +17,7 @@ #ifndef WIIMOTEDEV_SHORTCUTS_H #define WIIMOTEDEV_SHORTCUTS_H +#include #include #include "dbus/wiimotedev.h" @@ -30,7 +31,7 @@ public: static const char* kActionsGroup; static const char* kSettingsGroup; - WiimotedevShortcuts(QObject* parent = 0); + WiimotedevShortcuts(QWidget* window, QObject* parent = 0); enum Action { WiimotedevActive = 0, @@ -59,6 +60,7 @@ private slots: void DbusWiimoteGeneralButtons(uint id, qulonglong value); private: + QWidget* main_window_; Player* player_; bool wiimotedev_active_;