diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-02-22 05:01:12 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-02-22 05:01:12 +0000 |
commit | 26fcb2d02ed4d1e295968d46ebdff67665f5192c (patch) | |
tree | 563d15aa93c41053c24354e6c4375b6eed7f6291 /plugins/MenuItemEx/src | |
parent | 400d2e50f52fe113f2130db6062fef4a970a1042 (diff) |
MetaContacts added in loading\unloading hook too
git-svn-id: http://svn.miranda-ng.org/main/trunk@3677 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MenuItemEx/src')
-rw-r--r-- | plugins/MenuItemEx/src/main.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index b2fe2224e7..ee64d7425b 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -23,7 +23,7 @@ HGENMENU hmenuVis,hmenuOff,hmenuHide,hmenuIgnore,hmenuProto,hmenuAdded,hmenuAuth HGENMENU hmenuCopyID,hmenuRecvFiles,hmenuStatusMsg,hmenuCopyIP,hmenuCopyMirVer;
static HANDLE hIgnoreItem[9], hProtoItem[MAX_PROTOS];
HICON hIcon[5];
-BOOL bMetaContacts, bPopUpService = FALSE;
+BOOL bMetaContacts = FALSE, bPopUpService = FALSE;
PROTOACCOUNT **accs;
OPENOPTIONSDIALOG ood;
int protoCount;
@@ -278,7 +278,7 @@ BOOL isMetaContact(HANDLE hContact) char *proto;
if(bMetaContacts) {
proto = GetContactProto(hContact);
- if ( lstrcmpA(proto,"MetaContacts") == 0 ) {
+ if ( lstrcmpA(proto, "MetaContacts") == 0 ) {
return TRUE;
}
}
@@ -287,17 +287,15 @@ BOOL isMetaContact(HANDLE hContact) HANDLE getDefaultContact(HANDLE hContact)
{
- if(bMetaContacts) {
- return (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)hContact,0);
- }
+ if(bMetaContacts)
+ return (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT, (WPARAM)hContact, 0);
return 0;
}
HANDLE getMostOnline(HANDLE hContact)
{
- if(bMetaContacts) {
- return (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hContact,0);
- }
+ if(bMetaContacts)
+ return (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
return 0;
}
@@ -1150,6 +1148,7 @@ static int ContactSettingChanged( WPARAM wParam, LPARAM lParam ) static int ModuleLoad(WPARAM wParam, LPARAM lParam)
{
bPopUpService = ServiceExists(MS_POPUP_ADDPOPUPEX) != 0;
+ bMetaContacts = ServiceExists(MS_MC_GETMETACONTACT) != 0;
return 0;
}
@@ -1161,8 +1160,6 @@ static int PluginInit(WPARAM wparam,LPARAM lparam) Icon_Register(hinstance, MODULENAME, iconList, SIZEOF(iconList));
Icon_Register(hinstance, MODULENAME, overlayIconList, SIZEOF(overlayIconList));
- bMetaContacts = ServiceExists(MS_MC_GETMETACONTACT) != 0;
-
CreateServiceFunction(MS_SETINVIS, onSetInvis);
CreateServiceFunction(MS_SETVIS, onSetVis);
CreateServiceFunction(MS_HIDE, onHide);
|