summaryrefslogtreecommitdiff
path: root/plugins/Watrack/stat/statlog.pas
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Watrack/stat/statlog.pas')
-rw-r--r--plugins/Watrack/stat/statlog.pas8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/Watrack/stat/statlog.pas b/plugins/Watrack/stat/statlog.pas
index 4eb275e142..6cbcaf35b7 100644
--- a/plugins/Watrack/stat/statlog.pas
+++ b/plugins/Watrack/stat/statlog.pas
@@ -591,7 +591,7 @@ begin
sid.szDescription.a:='Create Report';
Skin_AddIcon(@sid);
DestroyIcon(sid.hDefaultIcon);
- HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged);
+ sic:=HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged);
FillChar(mi, sizeof(mi), 0);
mi.cbSize :=sizeof(mi);
@@ -602,8 +602,7 @@ begin
mi.pszService :=MS_WAT_MAKEREPORT;
mi.popupPosition:=MenuReportPos;
hMenuReport :=Menu_AddMainMenuItem(@mi);
-
- HookEvent(ME_WAT_NEWSTATUS,@NewPlStatus);
+ plStatusHook:=HookEvent(ME_WAT_NEWSTATUS,@NewPlStatus);
end;
procedure DeInitProc(aSetDisable:boolean);
@@ -612,6 +611,8 @@ begin
SetModStatus(0);
CallService(MS_CLIST_REMOVEMAINMENUITEM,hMenuReport,0);
+ UnhookEvent(plStatusHook);
+ UnhookEvent(sic);
DestroyServiceFunction(hPackLog);
DestroyServiceFunction(hMakeReport);
DestroyServiceFunction(hAddToLog);
@@ -635,6 +636,7 @@ begin
Stat.Init :=@InitProc;
Stat.DeInit :=@DeInitProc;
Stat.AddOption :=@AddOptionsPage;
+ Stat.Check :=nil;
Stat.ModuleName:='Statistic';
ModuleLink :=@Stat;
end;