From 2947f1455262ec7eb8ccb1f68ca4262e86e32a8d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 6 Feb 2015 23:43:52 +0000 Subject: fix for dblclick on chats git-svn-id: http://svn.miranda-ng.org/main/trunk@12030 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/chat/clist.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/modules') 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; } -- cgit v1.2.3