From de34b251b442cdf72b13c407d6b60c343c123bb3 Mon Sep 17 00:00:00 2001 From: Alexey Kulakov Date: Thu, 16 Jan 2014 03:11:48 +0000 Subject: sync git-svn-id: http://svn.miranda-ng.org/main/trunk@7674 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Watrack/kolframe/kolframe.pas | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'plugins/Watrack/kolframe/kolframe.pas') diff --git a/plugins/Watrack/kolframe/kolframe.pas b/plugins/Watrack/kolframe/kolframe.pas index 4e93b6dcc2..27fe7dde26 100644 --- a/plugins/Watrack/kolframe/kolframe.pas +++ b/plugins/Watrack/kolframe/kolframe.pas @@ -31,7 +31,7 @@ var begin D:=FrameCtrl.CustomData; CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, - (D.FrameId shl 16)+FO_TBNAME+addflag,dword(title)); + (D.FrameId shl 16)+FO_TBNAME+addflag,tlparam(title)); CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS,(D.FrameId shl 16)+FO_ICON,icon); CallService(MS_CLIST_FRAMES_UPDATEFRAME,D.FrameId,FU_TBREDRAW); end; @@ -220,10 +220,10 @@ begin end; FrameHeight:=CLFrame.height; - PWATFrameData(FrameCtrl.CustomData).FrameId:=CallService(MS_CLIST_FRAMES_ADDFRAME,dword(@CLFrame),0); + PWATFrameData(FrameCtrl.CustomData).FrameId:=CallService(MS_CLIST_FRAMES_ADDFRAME,twparam(@CLFrame),0); if PWATFrameData(FrameCtrl.CustomData).FrameId>=0 then begin - HookEvent(ME_WAT_NEWSTATUS,@NewPlStatus); + plStatusHook:=HookEvent(ME_WAT_NEWSTATUS,@NewPlStatus); end; end; result:=FrameWnd<>0; @@ -235,6 +235,8 @@ var begin if (FrameCtrl<>nil) and (PWATFrameData(FrameCtrl.CustomData).FrameId>=0) then begin + UnhookEvent(plStatusHook); + id:=PWATFrameData(FrameCtrl.CustomData).FrameId; FrameCtrl.Free; FrameCtrl:=nil; @@ -271,7 +273,7 @@ begin result:=ord(CreateFrame(0)); if result<>0 then - HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged); + sic:=HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged); end; procedure DeInitProc(aSetDisable:boolean); @@ -279,6 +281,11 @@ begin if aSetDisable then SetModStatus(0); + if sic<>0 then + begin + UnhookEvent(sic); + sic:=0; + end; DestroyFrame; end; @@ -314,6 +321,7 @@ begin Frame.Init :=@InitProc; Frame.DeInit :=@DeInitProc; Frame.AddOption :=@AddOptionsPage; + Frame.Check :=nil; Frame.ModuleName:='Frame'; ModuleLink :=@Frame; end; -- cgit v1.2.3