diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-08 20:51:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-08 20:51:14 +0000 |
commit | 696f4ea57845f48d6d979ecd9d66bb22bd9f738d (patch) | |
tree | c32ac05d363bff47320c1b204561b966aa1c81fd /plugins/UserInfoEx/init.cpp | |
parent | 3b396a2da6b0b8e0f4d2c051aca133772d317820 (diff) |
TopToolbar usage fixed everywhere
git-svn-id: http://svn.miranda-ng.org/main/trunk@861 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/init.cpp')
-rw-r--r-- | plugins/UserInfoEx/init.cpp | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/plugins/UserInfoEx/init.cpp b/plugins/UserInfoEx/init.cpp index 514260af99..a36e828fe7 100644 --- a/plugins/UserInfoEx/init.cpp +++ b/plugins/UserInfoEx/init.cpp @@ -89,30 +89,12 @@ int hLangpack; **/
static INT OnTopToolBarLoaded(WPARAM wParam, LPARAM lParam)
{
- UnhookEvent(ghTopToolBarLoaded);
DlgAnniversaryListOnTopToolBarLoaded();
SvcReminderOnTopToolBarLoaded();
return 0;
}
/**
- * This function is called by the ME_TB_MODULELOADED event.
- * It adds a set of buttons to the Toolbar of the Modern Contact List.
- *
- * @param wParam - not used
- * @param lParam - not used
- *
- * @return always 0
- **/
-static INT OnModernToolBarLoaded(WPARAM wParam, LPARAM lParam)
-{
- UnhookEvent(ghModernToolBarLoaded);
- DlgAnniversaryListOnToolBarLoaded();
- SvcReminderOnToolBarLoaded();
- return 0;
-}
-
-/**
* This function is called by Miranda just after loading all system modules.
*
* @param wParam - not used
@@ -122,17 +104,13 @@ static INT OnModernToolBarLoaded(WPARAM wParam, LPARAM lParam) **/
static INT OnModulesLoaded(WPARAM wParam, LPARAM lParam)
{
- INT_PTR ptr;
-
- UnhookEvent(ghModulesLoadedHook);
-
myGlobals.HaveCListExtraIcons = ServiceExists(MS_CLIST_EXTRA_SET_ICON);
myGlobals.ExtraIconsServiceExist = ServiceExists(MS_EXTRAICON_REGISTER);
myGlobals.PopUpActionsExist = ServiceExists(MS_POPUP_REGISTERACTIONS);
myGlobals.MsgAddIconExist = ServiceExists(MS_MSG_ADDICON);
// init meta contacts
- ptr = CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
+ INT_PTR ptr = CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
myGlobals.szMetaProto = (ptr != CALLSERVICE_NOTFOUND) ? (LPCSTR)ptr : NULL;
// options
@@ -352,10 +330,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);
- ghModernToolBarLoaded = HookEvent(ME_TB_MODULELOADED, OnModernToolBarLoaded);
- ghShutdownHook = HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
+ ghModulesLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
+ ghTopToolBarLoaded = HookEvent(ME_TTB_MODULELOADED, OnTopToolBarLoaded);
+ ghShutdownHook = HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
return 0;
}
|