From 3858c306144f2c268924a685624d810e026acc68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Burdukiewicz?= Date: Wed, 1 Sep 2010 19:29:49 +0000 Subject: [PATCH] Don't show osd for active/dective action when wiimotedev notifications are disabled --- src/wiimotedev/shortcuts.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/wiimotedev/shortcuts.cpp b/src/wiimotedev/shortcuts.cpp index bf280fc24..5c66b0bff 100644 --- a/src/wiimotedev/shortcuts.cpp +++ b/src/wiimotedev/shortcuts.cpp @@ -126,17 +126,19 @@ void WiimotedevShortcuts::DbusWiimoteGeneralButtons(uint id, qulonglong value) { if (actions_.contains(buttons)) { - if (!actived_ || wiimotedev_active_) { - if (actions_.value(buttons, 0xff) == WiimotedevActiveDeactive) { + if (wiimotedev_active_) { + if (actions_.value(buttons, ActionNone) == WiimotedevActiveDeactive) { actived_ = !actived_; - if (actived_) - emit WiiremoteActived(id); else - emit WiiremoteDeactived(id); + if (wiimotedev_notification_) { + if (actived_) + emit WiiremoteActived(id); else + emit WiiremoteDeactived(id); + } } } if (actived_ || !wiimotedev_active_) { - switch (actions_.value(buttons, 0xff)) { + switch (actions_.value(buttons, ActionNone)) { case PlayerNextTrack: player_->Next(); break; case PlayerPreviousTrack: player_->Previous(); break; case PlayerPlay: player_->Play(); break;