diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-10 12:45:32 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-10 12:45:32 +0000 |
commit | 6ac63284a8f93f977db66673727d4995a86764c4 (patch) | |
tree | 79d7e0b6744e1de21e6c01c0b0869be8927621a1 /plugins/UserInfoEx/src/init.cpp | |
parent | 102a413497df49bd2af8ee0a1770718fa0ecfcc2 (diff) |
various TTB initialization issues
git-svn-id: http://svn.miranda-ng.org/main/trunk@3957 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/init.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/init.cpp | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/plugins/UserInfoEx/src/init.cpp b/plugins/UserInfoEx/src/init.cpp index 8890c9bd51..879d7df5b5 100644 --- a/plugins/UserInfoEx/src/init.cpp +++ b/plugins/UserInfoEx/src/init.cpp @@ -57,11 +57,6 @@ static PLUGININFOEX pluginInfo = { {0x9c23a24b, 0xe6aa, 0x43c6, {0xb0, 0xb8, 0xd6, 0xc3, 0x6d, 0x2f, 0x7b, 0x57}}
};
-static HANDLE ghModulesLoadedHook = NULL;
-static HANDLE ghTopToolBarLoaded = NULL;
-static HANDLE ghModernToolBarLoaded = NULL;
-static HANDLE ghShutdownHook = NULL;
-static HANDLE ghPrebuildStatusMenu = NULL;
int hLangpack;
/*
@@ -122,7 +117,7 @@ static INT OnModulesLoaded(WPARAM wParam, LPARAM lParam) // build contact's menuitems
RebuildMenu();
- ghPrebuildStatusMenu = HookEvent( ME_CLIST_PREBUILDSTATUSMENU, (MIRANDAHOOK)RebuildAccount);
+ HookEvent( ME_CLIST_PREBUILDSTATUSMENU, (MIRANDAHOOK)RebuildAccount);
// install known modules strings to database
DB::Setting::WriteAString(NULL, "KnownModules", MODULELONGNAME, USERINFO","MODNAME","MOD_MBIRTHDAY","MODNAMEFLAGS);
@@ -132,7 +127,6 @@ static INT OnModulesLoaded(WPARAM wParam, LPARAM lParam) static INT OnShutdown(WPARAM wParam, LPARAM lParam)
{
- UnhookEvent(ghShutdownHook);
DlgContactInfoUnLoadModule();
SvcReminderUnloadModule();
@@ -141,7 +135,6 @@ static INT OnShutdown(WPARAM wParam, LPARAM lParam) CtrlButtonUnloadModule();
SvcConstantsUnloadModule();
- UnhookEvent(ghPrebuildStatusMenu);
SvcEMailUnloadModule();
SvcFlagsUnloadModule();
SvcGenderUnloadModule();
@@ -256,9 +249,9 @@ extern "C" INT __declspec(dllexport) Load(void) SvcReminderLoadModule();
// Now the module is loaded! Start initializing certain things
- ghModulesLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- ghTopToolBarLoaded = HookEvent(ME_TTB_MODULELOADED, OnTopToolBarLoaded);
- ghShutdownHook = HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
+ HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
+ HookEvent(ME_TTB_MODULELOADED, OnTopToolBarLoaded);
+ HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
return 0;
}
@@ -269,10 +262,8 @@ extern "C" INT __declspec(dllexport) Load(void) **/
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID lpvReserved)
{
- switch (fdwReason) {
- case DLL_PROCESS_ATTACH:
- ghInst = hinst;
- break;
- }
+ if (fdwReason == DLL_PROCESS_ATTACH)
+ ghInst = hinst;
+
return TRUE;
}
|