summaryrefslogtreecommitdiff
path: root/plugins/Nudge/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Nudge/src/main.cpp')
-rw-r--r--plugins/Nudge/src/main.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index a9fa60ccf9..a29faf36c1 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -31,19 +31,14 @@ PLUGININFOEX pluginInfo = {
INT_PTR NudgeShowMenu(WPARAM wParam, LPARAM lParam)
{
- 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;
- }
+ 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;
}
}
- else
- bEnabled = DefaultNudge.enabled;
Menu_ShowItem(g_hContactMenu, bEnabled && lParam != 0);
return 0;