From 7a2e5720ff22302dc2aaf923c2638f6569ed865f Mon Sep 17 00:00:00 2001 From: sje Date: Thu, 17 May 2007 22:51:32 +0000 Subject: show 'stop otr' menu item for finished sessions unhook settingchanged properly switch to finished state on reception of disconnected tlv show messages (honouring 'option inline') for start/stop session git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@173 4f64403b-2f21-0410-a795-97e2b3489a10 --- otr/menu.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'otr/menu.cpp') diff --git a/otr/menu.cpp b/otr/menu.cpp index 88c385d..026f0fe 100644 --- a/otr/menu.cpp +++ b/otr/menu.cpp @@ -7,8 +7,7 @@ HANDLE hMenuBuildEvent, hStartItem, hStopItem; void FixMenuIcons() { // fix menu icons - CLISTMENUITEM menu; - ZeroMemory(&menu,sizeof(menu)); + CLISTMENUITEM menu = {0}; menu.cbSize=sizeof(menu); menu.flags = CMIM_ICON; @@ -51,7 +50,7 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { { ConnContext *context = otrl_context_find(otr_user_state, uname, MODULE, proto, FALSE, 0, 0, 0); - bool encrypted = context && context->msgstate == OTRL_MSGSTATE_ENCRYPTED; + bool encrypted = context && context->msgstate != OTRL_MSGSTATE_PLAINTEXT; if(encrypted) { CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hStopItem, (LPARAM)&mi); mi.flags |= CMIF_HIDDEN; -- cgit v1.2.3