From 6ad65c4d4fce1d5ce1a1873ee84feaff753c9d48 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 10 Mar 2013 19:12:33 +0000 Subject: Watrack: - event hooks wiped out; - icons & menus optimization; - merge of memory leak fix git-svn-id: http://svn.miranda-ng.org/main/trunk@3963 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Watrack/lastfm/lastfm.pas | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'plugins/Watrack/lastfm') diff --git a/plugins/Watrack/lastfm/lastfm.pas b/plugins/Watrack/lastfm/lastfm.pas index 1b7d3e0f3d..e91aafffa9 100644 --- a/plugins/Watrack/lastfm/lastfm.pas +++ b/plugins/Watrack/lastfm/lastfm.pas @@ -15,7 +15,6 @@ const IcoLastFM:pAnsiChar = 'WATrack_lasfm'; var lfm_tries:integer; - sic:THANDLE; slastinf:THANDLE; slast:THANDLE; const @@ -222,9 +221,6 @@ begin result:=0; end; -var - plStatusHook:THANDLE; - function InitProc(aGetStatus:boolean=false):integer; begin slastinf:=CreateServiceFunction(MS_WAT_LASTFMINFO,@SrvLastFMInfo); @@ -248,9 +244,9 @@ begin slast:=CreateServiceFunction(MS_WAT_LASTFM,@SrvLastFM); if hMenuLast=0 then CreateMenus; - sic:=HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged); + HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged); if (lfm_on and 4)=0 then - plStatusHook:=HookEvent(ME_WAT_NEWSTATUS,@NewPlStatus); + HookEvent(ME_WAT_NEWSTATUS,@NewPlStatus); end; procedure DeInitProc(aSetDisable:boolean); @@ -263,8 +259,6 @@ begin CallService(MS_CLIST_REMOVEMAINMENUITEM,hMenuLast,0); hMenuLast:=0; DestroyServiceFunction(slast); - UnhookEvent(plStatusHook); - UnhookEvent(sic); if hTimer<>0 then begin @@ -289,7 +283,7 @@ begin last.Next :=ModuleLink; last.Init :=@InitProc; last.DeInit :=@DeInitProc; - last.AddOption:=@AddOptionsPage; + last.AddOption :=@AddOptionsPage; last.ModuleName:='Last.FM'; ModuleLink :=@last; -- cgit v1.2.3