summaryrefslogtreecommitdiff
path: root/plugins/Watrack/stat
diff options
context:
space:
mode:
authorAlexey Kulakov <panda75@bk.ru>2014-01-16 03:11:48 +0000
committerAlexey Kulakov <panda75@bk.ru>2014-01-16 03:11:48 +0000
commitde34b251b442cdf72b13c407d6b60c343c123bb3 (patch)
treea2e05db9606405b78b949ccc67860bb2096f1f5e /plugins/Watrack/stat
parent74220939c1156067d46ccb85cbc307737cd5a244 (diff)
sync
git-svn-id: http://svn.miranda-ng.org/main/trunk@7674 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Watrack/stat')
-rw-r--r--plugins/Watrack/stat/stat_dlg.inc6
-rw-r--r--plugins/Watrack/stat/stat_vars.inc2
-rw-r--r--plugins/Watrack/stat/statlog.pas8
3 files changed, 10 insertions, 6 deletions
diff --git a/plugins/Watrack/stat/stat_dlg.inc b/plugins/Watrack/stat/stat_dlg.inc
index 64a9b97f7c..6a3747c476 100644
--- a/plugins/Watrack/stat/stat_dlg.inc
+++ b/plugins/Watrack/stat/stat_dlg.inc
@@ -185,7 +185,7 @@ begin
if buf[0]<>#0 then
begin
buf1[0]:=#0;
- CallService(MS_UTILS_PATHTORELATIVE,TWPARAM(@buf),TLPARAM(@buf1));
+ PathToRelative(buf,buf1);
StrDup(StatName,buf1);
end;
@@ -194,7 +194,7 @@ begin
if buf[0]<>#0 then
begin
buf1[0]:=#0;
- CallService(MS_UTILS_PATHTORELATIVE,TWPARAM(@buf),TLPARAM(@buf1));
+ PathToRelative(buf,buf1);
StrDup(ReportName,buf1);
end;
@@ -203,7 +203,7 @@ begin
if buf[0]<>#0 then
begin
buf1[0]:=#0;
- CallService(MS_UTILS_PATHTORELATIVE,TWPARAM(@buf),TLPARAM(@buf1));
+ PathToRelative(buf,buf1);
StrDup(TmplName,buf1);
end;
diff --git a/plugins/Watrack/stat/stat_vars.inc b/plugins/Watrack/stat/stat_vars.inc
index d609329c4c..ccc7c0c5b2 100644
--- a/plugins/Watrack/stat/stat_vars.inc
+++ b/plugins/Watrack/stat/stat_vars.inc
@@ -16,4 +16,6 @@ var
hPackLog,
hMakeReport,
hAddToLog,
+ plStatusHook,
+ sic,
hMenuReport:THANDLE;
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;