From 03abc0234e40183256bba3d2b9cdf809d92363f2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 19 Apr 2018 19:04:41 +0300 Subject: minor code cleaning --- protocols/IcqOscarJ/src/icq_rates.cpp | 2 +- protocols/IcqOscarJ/src/init.cpp | 9 --------- protocols/IcqOscarJ/src/stdafx.h | 1 - 3 files changed, 1 insertion(+), 11 deletions(-) (limited to 'protocols/IcqOscarJ') diff --git a/protocols/IcqOscarJ/src/icq_rates.cpp b/protocols/IcqOscarJ/src/icq_rates.cpp index e2dc3d569f..dfc42bbe7c 100644 --- a/protocols/IcqOscarJ/src/icq_rates.cpp +++ b/protocols/IcqOscarJ/src/icq_rates.cpp @@ -318,7 +318,7 @@ void rates_queue::handleDelay() { SleepEx(scheduledDelay, TRUE); - if (!g_bTerminated) + if (!Miranda_IsTerminated()) processQueue(); } diff --git a/protocols/IcqOscarJ/src/init.cpp b/protocols/IcqOscarJ/src/init.cpp index 8d21b12056..bf88320592 100644 --- a/protocols/IcqOscarJ/src/init.cpp +++ b/protocols/IcqOscarJ/src/init.cpp @@ -29,7 +29,6 @@ #include "m_icolib.h" int hLangpack; -bool g_bTerminated; BOOL bPopupService = FALSE; @@ -70,12 +69,6 @@ int ModuleLoad(WPARAM, LPARAM) return 0; } -static int OnPreShutdown(WPARAM, LPARAM) -{ - g_bTerminated = true; - return 0; -} - IconItem iconList[] = { { LPGEN("Expand string edit"), "ICO_EXPANDSTRINGEDIT", IDI_EXPANDSTRINGEDIT } @@ -101,8 +94,6 @@ extern "C" int __declspec(dllexport) Load(void) HookEvent(ME_SYSTEM_MODULELOAD, ModuleLoad); HookEvent(ME_SYSTEM_MODULEUNLOAD, ModuleLoad); - HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown); - hExtraXStatus = ExtraIcon_RegisterIcolib("xstatus", LPGEN("ICQ xStatus"), "icq_xstatus13"); Icon_Register(g_plugin.getInst(), "ICQ", iconList, _countof(iconList)); diff --git a/protocols/IcqOscarJ/src/stdafx.h b/protocols/IcqOscarJ/src/stdafx.h index 9aefe64717..54f1712620 100644 --- a/protocols/IcqOscarJ/src/stdafx.h +++ b/protocols/IcqOscarJ/src/stdafx.h @@ -117,5 +117,4 @@ #include "icq_popups.h" #include "icq_proto.h" -extern bool g_bTerminated; extern IconItem iconList[]; \ No newline at end of file -- cgit v1.2.3