From 3f9882178018afbe9aaaba1f4461f3fc75493260 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 15 Jun 2015 14:23:02 +0000 Subject: MS_SKIN_LOADICON & MS_SKIN_LOADPROTOICON replaced with direct function calls git-svn-id: http://svn.miranda-ng.org/main/trunk@14176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ImportTXT/importtxt.dpr | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'plugins/ImportTXT') diff --git a/plugins/ImportTXT/importtxt.dpr b/plugins/ImportTXT/importtxt.dpr index 68f1081321..31b8af8238 100644 --- a/plugins/ImportTXT/importtxt.dpr +++ b/plugins/ImportTXT/importtxt.dpr @@ -50,9 +50,6 @@ var hwndDialog:HWND; //Services SrvITxt,SrvIWiz:THANDLE; - //hooks - onLoadHook:THANDLE; - onAccChangHook:THANDLE; function MirandaPluginInfoEx(mirandaVersion:DWORD):PPLUGININFOEX; cdecl; begin @@ -105,8 +102,6 @@ end; function OnModulesLoaded(wParam: wParam; lParam: lParam): int; cdecl; begin - UnhookEvent(onLoadHook); - result := 0; EnumProtocols; // check for AutoStart if (DBReadByte(0, IMPORT_TXT_MODULE, IMPORT_TXT_AS) = 1) and (ProtoCount > 0) then @@ -114,6 +109,7 @@ begin CallService(IMPORT_WIZ_SERVICE, 0, 0); DBWriteByte(0, IMPORT_TXT_MODULE, IMPORT_TXT_AS, 0); end; + result := 0; end; function Load(): int; cdecl; @@ -138,14 +134,13 @@ begin mi.pszContactOwner := nil; Menu_AddMainMenuItem(@mi); - onLoadHook := HookEvent(ME_SYSTEM_MODULESLOADED, @OnModulesLoaded); - onAccChangHook := HookEvent(ME_PROTO_ACCLISTCHANGED, @OnAccountChanged); + HookEvent(ME_SYSTEM_MODULESLOADED, @OnModulesLoaded); + HookEvent(ME_PROTO_ACCLISTCHANGED, @OnAccountChanged); result := 0; end; function Unload: int; cdecl; begin - UnhookEvent(onAccChangHook); DestroyServiceFunction(SrvITxt); DestroyServiceFunction(SrvIWiz); Result := 0; -- cgit v1.2.3