diff options
author | Alexey Kulakov <panda75@bk.ru> | 2014-01-16 03:11:48 +0000 |
---|---|---|
committer | Alexey Kulakov <panda75@bk.ru> | 2014-01-16 03:11:48 +0000 |
commit | de34b251b442cdf72b13c407d6b60c343c123bb3 (patch) | |
tree | a2e05db9606405b78b949ccc67860bb2096f1f5e /plugins/Watrack/lastfm | |
parent | 74220939c1156067d46ccb85cbc307737cd5a244 (diff) |
sync
git-svn-id: http://svn.miranda-ng.org/main/trunk@7674 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Watrack/lastfm')
-rw-r--r-- | plugins/Watrack/lastfm/i_last_api.inc | 2 | ||||
-rw-r--r-- | plugins/Watrack/lastfm/i_last_opt.inc | 2 | ||||
-rw-r--r-- | plugins/Watrack/lastfm/lastfm.pas | 11 |
3 files changed, 10 insertions, 5 deletions
diff --git a/plugins/Watrack/lastfm/i_last_api.inc b/plugins/Watrack/lastfm/i_last_api.inc index 73328366ba..1f934646a3 100644 --- a/plugins/Watrack/lastfm/i_last_api.inc +++ b/plugins/Watrack/lastfm/i_last_api.inc @@ -34,7 +34,7 @@ function GetMD5(const data;datalen:integer;var digest:TMD5Hash):TMD5Hash; begin
FillChar(digest,16,0);
- mir_md5_hash(pmir_md5_byte_t(data),datalen,digest);
+ mir_md5_hash(pbyte(data),datalen,digest);
result:=digest;
end;
diff --git a/plugins/Watrack/lastfm/i_last_opt.inc b/plugins/Watrack/lastfm/i_last_opt.inc index a8fb4457af..c629962697 100644 --- a/plugins/Watrack/lastfm/i_last_opt.inc +++ b/plugins/Watrack/lastfm/i_last_opt.inc @@ -7,8 +7,6 @@ const optLanguage:pAnsiChar='lfm/language';
procedure SaveOpt;
-var
- tmppass:array [0..255] of AnsiChar;
begin
DBWriteString(0,PluginShort,optPassword,lfm_password);
DBWriteString(0,PluginShort,optLogin ,lfm_login);
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;
|