summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-12 15:26:48 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-12 15:26:48 +0000
commitc190cc8dd65076e00d3f4aa7bf317048440a40f0 (patch)
tree4b773fd63168587444fc1542c4b9d3fcb7d21cbd
parent84c4cf586edb825d669c21528d6821918ddd7f0c (diff)
h++: a contact has history when db_event_last <> NULL
git-svn-id: http://svn.miranda-ng.org/main/trunk@8583 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/HistoryPlusPlus/historypp.dpr10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/HistoryPlusPlus/historypp.dpr b/plugins/HistoryPlusPlus/historypp.dpr
index 389f364021..96b528ec1a 100644
--- a/plugins/HistoryPlusPlus/historypp.dpr
+++ b/plugins/HistoryPlusPlus/historypp.dpr
@@ -122,7 +122,7 @@ function OnContactChanged(wParam: wParam; lParam: LPARAM): Integer; cdecl; forwa
function OnContactDelete(wParam: wParam; lParam: LPARAM): Integer; cdecl; forward;
function OnFSChanged(wParam: WPARAM; lParam: LPARAM): Integer; cdecl; forward;
function OnTTBLoaded(awParam: WPARAM; alParam: LPARAM): Integer; cdecl; forward;
-function OnBuildContactMenu(awParam: WPARAM; alParam: LPARAM): Integer; cdecl; forward;
+function OnBuildContactMenu(hContact: WPARAM; alParam: LPARAM): Integer; cdecl; forward;
function OnEventAdded(wParam: WPARAM; lParam: LPARAM): Integer; cdecl; forward;
function OnEventDeleted(wParam: WPARAM; lParam: LPARAM): Integer; cdecl; forward;
function OnMetaDefaultChanged(wParam: WPARAM; lParam: LPARAM): Integer; cdecl; forward;
@@ -480,20 +480,22 @@ end;
//lParam=0
//modules should use this to change menu items that are specific to the
//contact that has them
-function OnBuildContactMenu(awParam: WPARAM; alParam: LPARAM): Integer; cdecl;
+function OnBuildContactMenu(hContact: WPARAM; alParam: LPARAM): Integer; cdecl;
var
menuItem: TCLISTMENUITEM;
+ hLast: THandle;
count: Integer;
res: Integer;
begin
Result := 0;
- count := db_event_count(THandle(awParam));
+ count := db_event_count(hContact);
+ hLast := db_event_last(hContact);
if (PrevShowHistoryCount xor ShowHistoryCount) or (count <> MenuCount) then
begin
ZeroMemory(@menuitem, SizeOf(menuItem));
menuItem.cbSize := SizeOf(menuItem);
menuItem.flags := CMIM_FLAGS;
- if count = 0 then
+ if hLast = 0 then
menuItem.flags := menuItem.flags or CMIF_HIDDEN;
CallService(MS_CLIST_MODIFYMENUITEM, MenuHandles[miEmpty].Handle,
lParam(@menuitem));