From ebdb188abf6ca1ee5e047c70b9e2be0d47ce67f1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 1 Nov 2012 15:44:51 +0000 Subject: unneeded hook removed git-svn-id: http://svn.miranda-ng.org/main/trunk@2137 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/extraicons/extraicons.cpp | 6 ++---- src/modules/extraicons/options.h | 32 -------------------------------- src/modules/extraicons/options_ei.cpp | 14 -------------- 3 files changed, 2 insertions(+), 50 deletions(-) delete mode 100644 src/modules/extraicons/options.h diff --git a/src/modules/extraicons/extraicons.cpp b/src/modules/extraicons/extraicons.cpp index ae571991e4..a2d7c3b34a 100644 --- a/src/modules/extraicons/extraicons.cpp +++ b/src/modules/extraicons/extraicons.cpp @@ -29,7 +29,6 @@ #include "IcolibExtraIcon.h" #include "extraicons.h" -#include "options.h" #include "usedIcons.h" // Prototypes /////////////////////////////////////////////////////////////////////////// @@ -50,6 +49,7 @@ int IconsChanged(WPARAM wParam, LPARAM lParam); int ClistExtraListRebuild(WPARAM wParam, LPARAM lParam); int ClistExtraImageApply(WPARAM wParam, LPARAM lParam); int ClistExtraClick(WPARAM wParam, LPARAM lParam); +int InitOptionsCallback(WPARAM wParam, LPARAM lParam); INT_PTR ExtraIcon_Register(WPARAM wParam, LPARAM lParam); INT_PTR ExtraIcon_SetIcon(WPARAM wParam, LPARAM lParam); @@ -125,8 +125,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) CallService("DBEditorpp/RegisterSingleModule", (WPARAM) MODULE_NAME "Groups", 0); HookEvent(ME_SKIN2_ICONSCHANGED, &IconsChanged); - - InitOptions(); + HookEvent(ME_OPT_INITIALISE, InitOptionsCallback); return 0; } @@ -138,7 +137,6 @@ int IconsChanged(WPARAM wParam, LPARAM lParam) int PreShutdown(WPARAM wParam, LPARAM lParam) { DefaultExtraIcons_Unload(); - DeInitOptions(); return 0; } diff --git a/src/modules/extraicons/options.h b/src/modules/extraicons/options.h deleted file mode 100644 index 5d50348c0e..0000000000 --- a/src/modules/extraicons/options.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - Copyright (C) 2009 Ricardo Pescuma Domenecci - - This is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this file; see the file license.txt. If - not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. - */ - -#ifndef __OPTIONS_H__ -# define __OPTIONS_H__ - - -// Initializations needed by options -void InitOptions(); - -// Deinitializations needed by options -void DeInitOptions(); - - - -#endif // __OPTIONS_H__ diff --git a/src/modules/extraicons/options_ei.cpp b/src/modules/extraicons/options_ei.cpp index 5a7ad29192..6376da316c 100644 --- a/src/modules/extraicons/options_ei.cpp +++ b/src/modules/extraicons/options_ei.cpp @@ -26,10 +26,6 @@ #define ICON_SIZE 16 -// Prototypes ///////////////////////////////////////////////////////////////////////////////////// - -HANDLE hOptHook = NULL; - // Functions ////////////////////////////////////////////////////////////////////////////////////// BOOL ScreenToClient(HWND hWnd, LPRECT lpRect) @@ -853,13 +849,3 @@ int InitOptionsCallback(WPARAM wParam, LPARAM lParam) return 0; } - -void InitOptions() -{ - hOptHook = HookEvent(ME_OPT_INITIALISE, InitOptionsCallback); -} - -void DeInitOptions() -{ - UnhookEvent(hOptHook); -} -- cgit v1.2.3