From fec96650e2e222235febc1b3a71bc3a33736fbb0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 3 May 2015 08:44:07 +0000 Subject: minor code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@13388 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/options/options.cpp | 11 ++++------- src/modules/plugins/pluginopts.cpp | 4 +++- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp index 7f800d05b3..f5ffc14c27 100644 --- a/src/modules/options/options.cpp +++ b/src/modules/options/options.cpp @@ -43,8 +43,6 @@ static int FilterPage = 0; static int FilterLoadProgress = 100; static int FilterTimerId = 0; -extern bool bOldMode; - struct OptionsPageInit { int pageCount; @@ -690,7 +688,7 @@ public: if (msg == WM_INITDIALOG) lParam = m_lParam; - return CallWindowProc(m_wndProc, m_hwnd, msg, wParam, lParam); + return m_wndProc(m_hwnd, msg, wParam, lParam); } }; @@ -1320,16 +1318,15 @@ static int OptModulesLoaded(WPARAM, LPARAM) mi.pszName = LPGEN("&Options..."); mi.pszService = "Options/OptionsCommand"; Menu_AddMainMenuItem(&mi); - - bOldMode = db_get_b(NULL, "Options", "OldPluginSettings", false) != 0; return 0; } int ShutdownOptionsModule(WPARAM, LPARAM) { - if (IsWindow(hwndOptions)) + if (IsWindow(hwndOptions)) { DestroyWindow(hwndOptions); - hwndOptions = NULL; + hwndOptions = NULL; + } return 0; } diff --git a/src/modules/plugins/pluginopts.cpp b/src/modules/plugins/pluginopts.cpp index bcd549ed1e..d6fba2df05 100644 --- a/src/modules/plugins/pluginopts.cpp +++ b/src/modules/plugins/pluginopts.cpp @@ -30,8 +30,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern MUUID miid_clist, miid_database, miid_protocol; HANDLE hevLoadModule, hevUnloadModule; -bool bOldMode = false; +static bool bOldMode = false; static CMString szFilter; static UINT_PTR timerID; @@ -562,6 +562,8 @@ int PluginOptionsInit(WPARAM wParam, LPARAM) void LoadPluginOptions() { + bOldMode = db_get_b(NULL, "Options", "OldPluginSettings", false) != 0; + hevLoadModule = CreateHookableEvent(ME_SYSTEM_MODULELOAD); hevUnloadModule = CreateHookableEvent(ME_SYSTEM_MODULEUNLOAD); } -- cgit v1.2.3