diff options
author | George Hazan <george.hazan@gmail.com> | 2015-02-06 23:43:52 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-02-06 23:43:52 +0000 |
commit | 2947f1455262ec7eb8ccb1f68ca4262e86e32a8d (patch) | |
tree | a69403e5ebd7ac705eca1945210000ad289d62f7 /src | |
parent | b2f86045d3b3dc2a454f127f186429b60e493072 (diff) |
fix for dblclick on chats
git-svn-id: http://svn.miranda-ng.org/main/trunk@12030 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/chat/clist.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/modules/chat/clist.cpp b/src/modules/chat/clist.cpp index c19670efa0..e86ad505fb 100644 --- a/src/modules/chat/clist.cpp +++ b/src/modules/chat/clist.cpp @@ -168,7 +168,7 @@ int PrebuildContactMenu(WPARAM hContact, LPARAM) if (hContact == 0)
return 0;
- bool bEnabled = false;
+ bool bEnabledJoin = false, bEnabledLeave = false;
char *szProto = GetContactProto(hContact);
if (szProto) {
// display this menu item only for chats
@@ -179,23 +179,22 @@ int PrebuildContactMenu(WPARAM hContact, LPARAM) mi.flags = CMIM_NAME;
if (db_get_w(hContact, szProto, "Status", 0) == ID_STATUS_OFFLINE) {
if (ProtoServiceExists(szProto, PS_JOINCHAT)) {
- bEnabled = true;
+ bEnabledJoin = true;
mi.pszName = LPGEN("&Join chat");
}
}
else {
- if (ProtoServiceExists(szProto, PS_LEAVECHAT)) {
- bEnabled = true;
- mi.pszName = LPGEN("&Open chat window");
- }
+ bEnabledJoin = true;
+ mi.pszName = LPGEN("&Open chat window");
}
Menu_ModifyItem(hJoinMenuItem, &mi);
}
+ bEnabledLeave = ProtoServiceExists(szProto, PS_LEAVECHAT) != 0;
}
}
- Menu_ShowItem(hJoinMenuItem, bEnabled);
- Menu_ShowItem(hLeaveMenuItem, bEnabled);
+ Menu_ShowItem(hJoinMenuItem, bEnabledJoin);
+ Menu_ShowItem(hLeaveMenuItem, bEnabledLeave);
return 0;
}
|