summaryrefslogtreecommitdiff
path: root/plugins/Watrack/kolframe
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/kolframe
parent74220939c1156067d46ccb85cbc307737cd5a244 (diff)
sync
git-svn-id: http://svn.miranda-ng.org/main/trunk@7674 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Watrack/kolframe')
-rw-r--r--plugins/Watrack/kolframe/frm_dlg1.inc2
-rw-r--r--plugins/Watrack/kolframe/frm_frame.inc10
-rw-r--r--plugins/Watrack/kolframe/frm_text.inc2
-rw-r--r--plugins/Watrack/kolframe/frm_trackbar.inc2
-rw-r--r--plugins/Watrack/kolframe/frm_vars.inc3
-rw-r--r--plugins/Watrack/kolframe/kolframe.pas16
6 files changed, 23 insertions, 12 deletions
diff --git a/plugins/Watrack/kolframe/frm_dlg1.inc b/plugins/Watrack/kolframe/frm_dlg1.inc
index 08028a3356..401e04536d 100644
--- a/plugins/Watrack/kolframe/frm_dlg1.inc
+++ b/plugins/Watrack/kolframe/frm_dlg1.inc
@@ -200,7 +200,7 @@ begin
mGetMem(buf1,1024{*SizeOf(WideChar)});
buf1^:=#0;
buf:=GetDlgText(Dialog,IDC_FRMBKPIC,true);
- CallService(MS_UTILS_PATHTORELATIVE,wparam(buf),lparam(buf1));
+ PathToRelative(buf,buf1);
if StrCmp(buf1,D.BkDefFile)<>0 then
begin
mFreeMem(D.BkDefFile);
diff --git a/plugins/Watrack/kolframe/frm_frame.inc b/plugins/Watrack/kolframe/frm_frame.inc
index 8c3034327c..8911f868c4 100644
--- a/plugins/Watrack/kolframe/frm_frame.inc
+++ b/plugins/Watrack/kolframe/frm_frame.inc
@@ -63,7 +63,7 @@ begin
if D.Trackbar<>nil then
begin
- if (CallService(MS_WAT_GETMUSICINFO,WAT_INF_CHANGES,dword(@psi))<>WAT_PLS_NOTFOUND) then
+ if (CallService(MS_WAT_GETMUSICINFO,WAT_INF_CHANGES,tlparam(@psi))<>WAT_PLS_NOTFOUND) then
begin
SetTrackBarPosition(D.Trackbar,(psi^.time*1000) div D.UpdInterval)
end;
@@ -265,7 +265,7 @@ begin
if D.BkBitmap=0 then
begin
if (D.BkFile<>nil) and (D.BkFile^<>#0) then
- D.BkBitmap:=CallService(MS_UTILS_LOADBITMAP,0,dword(D.BkFile));
+ D.BkBitmap:=CallService(MS_UTILS_LOADBITMAP,0,tlparam(D.BkFile));
end;
if D.BkBitmap<>0 then
@@ -309,7 +309,7 @@ begin
Exit;
end;
- result:=CallService(MS_UTILS_LOADBITMAP,0,dword(CoverFName));
+ result:=CallService(MS_UTILS_LOADBITMAP,0,tlparam(CoverFName));
if result<>0 then
begin
mFreeMem(D.BkFile);
@@ -325,7 +325,7 @@ begin
begin
if (not check) or (StrCmp(tmpstr,D.BkFile)<>0) then
begin
- result:=CallService(MS_UTILS_LOADBITMAP,0,dword(tmpstr));
+ result:=CallService(MS_UTILS_LOADBITMAP,0,tlparam(tmpstr));
if result<>0 then
begin
mFreeMem(D.BkFile);
@@ -412,7 +412,7 @@ begin
RegisterButtonIcons;
D.Trackbar:=MakeNewTrackbar(@self);
// for case when TB creating after track start (fastest way)
- // can use (CallService(MS_WAT_GETMUSICINFO,WAT_INF_CHANGES,dword(@psi))<>WAT_PLS_NOTFOUND)
+ // can use (CallService(MS_WAT_GETMUSICINFO,WAT_INF_CHANGES,tlparam(@psi))<>WAT_PLS_NOTFOUND)
psi:=pointer(CallService(MS_WAT_RETURNGLOBAL,WAT_INF_UNICODE,1));
TrackbarSetRange(D.Trackbar,D.UpdInterval,psi^.total);
end;
diff --git a/plugins/Watrack/kolframe/frm_text.inc b/plugins/Watrack/kolframe/frm_text.inc
index 66c00a1b2b..f77d2de009 100644
--- a/plugins/Watrack/kolframe/frm_text.inc
+++ b/plugins/Watrack/kolframe/frm_text.inc
@@ -41,7 +41,7 @@ begin
(StrPosW(D.Template,'%time%' )=nil) then // need to |remake
exit;
end;
- tmp:=pWideChar(CallService(MS_WAT_REPLACETEXT,0,dword(D.Template)));
+ tmp:=pWideChar(CallService(MS_WAT_REPLACETEXT,0,tlparam(D.Template)));
D.TextBlock.BlockText:=tmp;
mFreeMem(tmp);
end;
diff --git a/plugins/Watrack/kolframe/frm_trackbar.inc b/plugins/Watrack/kolframe/frm_trackbar.inc
index d6e08c56a7..eb9ad5c285 100644
--- a/plugins/Watrack/kolframe/frm_trackbar.inc
+++ b/plugins/Watrack/kolframe/frm_trackbar.inc
@@ -160,7 +160,7 @@ var
rc, rc1:TRECT;
w:integer;
begin
- SendMessage(Sender.Handle,TBM_GETTHUMBRECT,0,dword(@rc));
+ SendMessage(Sender.Handle,TBM_GETTHUMBRECT,0,tlparam(@rc));
w:=rc.right-rc.left;
if w<>16 then
diff --git a/plugins/Watrack/kolframe/frm_vars.inc b/plugins/Watrack/kolframe/frm_vars.inc
index f4d9372002..88dd71f0d1 100644
--- a/plugins/Watrack/kolframe/frm_vars.inc
+++ b/plugins/Watrack/kolframe/frm_vars.inc
@@ -1,5 +1,8 @@
{Frame variables}
var
+ sic,
+ PlStatusHook:cardinal;
+
HiddenByMe:bool;
FrameHeight:dword;
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;