From 783349cf534dbc7b74bab1e990ff163e162f6eed Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 23 Jun 2015 13:05:00 +0000 Subject: fix for h++ to set the menu items visibility correctly git-svn-id: http://svn.miranda-ng.org/main/trunk@14351 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HistoryPlusPlus/historypp.dpr | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/HistoryPlusPlus/historypp.dpr b/plugins/HistoryPlusPlus/historypp.dpr index e5b5ec6360..e147086564 100644 --- a/plugins/HistoryPlusPlus/historypp.dpr +++ b/plugins/HistoryPlusPlus/historypp.dpr @@ -465,18 +465,16 @@ function OnBuildContactMenu(hContact: WPARAM; alParam: LPARAM): Integer; cdecl; var hLast: THandle; count: Integer; - text: PWideChar; + text: PWideChar; begin Result := 0; count := db_event_count(hContact); hLast := db_event_last(hContact); if (PrevShowHistoryCount xor ShowHistoryCount) or (count <> MenuCount) then begin - if hLast = 0 then - begin - Menu_ShowItem(MenuHandles[miEmpty].Handle, 0); - Menu_ShowItem(MenuHandles[miContact].Handle, 0); - end; + Menu_ShowItem(MenuHandles[miEmpty].Handle, byte(hLast <> 0)); + Menu_ShowItem(MenuHandles[miContact].Handle, byte(hLast <> 0)); + if ShowHistoryCount then text := pWideChar(Format('%s [%u]',[TranslateW(MenuHandles[miContact].Name),count])) else if PrevShowHistoryCount then -- cgit v1.2.3