summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Nudge/src/main.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index a4c3b2143b..a9fa60ccf9 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -31,15 +31,19 @@ PLUGININFOEX pluginInfo = {
INT_PTR NudgeShowMenu(WPARAM wParam, LPARAM lParam)
{
- bool bEnabled = false;
-
- for (int i = 0; i < arNudges.getCount(); i++) {
- CNudgeElement &p = arNudges[i];
- if (!strcmp((char*)wParam, p.ProtocolName)) {
- bEnabled = GlobalNudge.useByProtocol ? p.enabled : DefaultNudge.enabled;
- break;
+ bool bEnabled;
+ if (GlobalNudge.useByProtocol) {
+ bEnabled = false;
+ for (int i = 0; i < arNudges.getCount(); i++) {
+ CNudgeElement &p = arNudges[i];
+ if (!strcmp((char*)wParam, p.ProtocolName)) {
+ bEnabled = p.enabled;
+ break;
+ }
}
}
+ else
+ bEnabled = DefaultNudge.enabled;
Menu_ShowItem(g_hContactMenu, bEnabled && lParam != 0);
return 0;