diff options
author | George Hazan <george.hazan@gmail.com> | 2015-04-19 14:30:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-04-19 14:30:18 +0000 |
commit | 71a8b4329ee9615903ce87eabf8fe5e1fff373d5 (patch) | |
tree | f8a94af2298387a06d4c7950601bc01d7f638d0c /plugins/Nudge | |
parent | f120ea5bc4b312d62b002439c31b96596500b3dc (diff) |
fix not to activate Nudge menu item if a proto doesn't support it
git-svn-id: http://svn.miranda-ng.org/main/trunk@12934 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Nudge')
-rw-r--r-- | plugins/Nudge/src/Version.h | 2 | ||||
-rw-r--r-- | plugins/Nudge/src/main.cpp | 17 |
2 files changed, 7 insertions, 12 deletions
diff --git a/plugins/Nudge/src/Version.h b/plugins/Nudge/src/Version.h index e3e9d259c6..626d2ccc79 100644 --- a/plugins/Nudge/src/Version.h +++ b/plugins/Nudge/src/Version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 2
#define __RELEASE_NUM 0
-#define __BUILD_NUM 1
+#define __BUILD_NUM 2
#include <stdver.h>
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;
|