summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-23 13:05:00 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-23 13:05:00 +0000
commit783349cf534dbc7b74bab1e990ff163e162f6eed (patch)
tree9dccf6dbad02ad50a78b4ec7d0b078626d359c7a
parent4ba9c10fa00482b9e9d8b54812b49ecf60cee95e (diff)
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
-rw-r--r--plugins/HistoryPlusPlus/historypp.dpr10
1 files 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