From be489c4e6f4c1ab4b4d7f84e35a73e34e1b0b331 Mon Sep 17 00:00:00 2001
From: George Hazan <george.hazan@gmail.com>
Date: Thu, 25 Jun 2015 23:34:47 +0000
Subject: - Menu_EnableItem & Menu_SetChecked - more suitable helpers to set
 flags; - fix for checks in frame menus; - code cleaning

git-svn-id: http://svn.miranda-ng.org/main/trunk@14389 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
---
 plugins/HistoryStats/src/main.cpp | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

(limited to 'plugins/HistoryStats')

diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp
index bad9b3ca5e..fceb2edb9b 100644
--- a/plugins/HistoryStats/src/main.cpp
+++ b/plugins/HistoryStats/src/main.cpp
@@ -305,14 +305,8 @@ static int EventPreBuildContactMenu(WPARAM hContact, LPARAM)
 			db.setContact(hContact);
 			db.setModule(con::ModHistoryStats);
 
-			int menuState = db.readBool(con::SettExclude, false) ? CMIF_CHECKED : 0;
-			
-			// avoid collision with options page
-			if (g_bExcludeLock)
-				menuState |= CMIF_GRAYED;
-
-			// set menu state
-			Menu_ModifyItem(g_hMenuToggleExclude, NULL, INVALID_HANDLE_VALUE, menuState);
+			Menu_SetChecked(g_hMenuToggleExclude, db.readBool(con::SettExclude, false));
+			Menu_EnableItem(g_hMenuToggleExclude, !g_bExcludeLock); // avoid collision with options page
 		}
 
 #if defined(HISTORYSTATS_HISTORYCOPY)
-- 
cgit v1.2.3