diff options
Diffstat (limited to 'plugins/Watrack/lastfm/lastfm.pas')
-rw-r--r-- | plugins/Watrack/lastfm/lastfm.pas | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/Watrack/lastfm/lastfm.pas b/plugins/Watrack/lastfm/lastfm.pas index e91aafffa9..d2a5cbc8a7 100644 --- a/plugins/Watrack/lastfm/lastfm.pas +++ b/plugins/Watrack/lastfm/lastfm.pas @@ -15,6 +15,7 @@ const IcoLastFM:pAnsiChar = 'WATrack_lasfm';
var
lfm_tries:integer;
+ sic:THANDLE;
slastinf:THANDLE;
slast:THANDLE;
const
@@ -221,6 +222,9 @@ begin result:=0;
end;
+var
+ plStatusHook:THANDLE;
+
function InitProc(aGetStatus:boolean=false):integer;
begin
slastinf:=CreateServiceFunction(MS_WAT_LASTFMINFO,@SrvLastFMInfo);
@@ -244,9 +248,9 @@ begin slast:=CreateServiceFunction(MS_WAT_LASTFM,@SrvLastFM);
if hMenuLast=0 then
CreateMenus;
- HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged);
+ sic:=HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged);
if (lfm_on and 4)=0 then
- HookEvent(ME_WAT_NEWSTATUS,@NewPlStatus);
+ plStatusHook:=HookEvent(ME_WAT_NEWSTATUS,@NewPlStatus);
end;
procedure DeInitProc(aSetDisable:boolean);
@@ -259,6 +263,8 @@ begin CallService(MS_CLIST_REMOVEMAINMENUITEM,hMenuLast,0);
hMenuLast:=0;
DestroyServiceFunction(slast);
+ UnhookEvent(plStatusHook);
+ UnhookEvent(sic);
if hTimer<>0 then
begin
@@ -284,6 +290,7 @@ begin last.Init :=@InitProc;
last.DeInit :=@DeInitProc;
last.AddOption :=@AddOptionsPage;
+ last.Check :=nil;
last.ModuleName:='Last.FM';
ModuleLink :=@last;
|