From 78dc54f9e392b45492a2b726d6268c41f594eb41 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 8 Apr 2014 17:54:19 +0000 Subject: bunch of mc related fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@8892 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/IEView/src/HTMLBuilder.cpp | 6 +++--- plugins/IEView/src/Options.cpp | 15 ++++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'plugins/IEView') diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp index 0f035c6ebd..6557980145 100644 --- a/plugins/IEView/src/HTMLBuilder.cpp +++ b/plugins/IEView/src/HTMLBuilder.cpp @@ -148,7 +148,7 @@ char* HTMLBuilder::getRealProto(MCONTACT hContact) return NULL; char *szProto = mir_strdup(GetContactProto(hContact)); - if (szProto != NULL && !strcmp(szProto, "MetaContacts")) { + if (szProto != NULL && !strcmp(szProto, META_PROTO)) { hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0); if (hContact != NULL) { mir_free(szProto); @@ -160,7 +160,7 @@ char* HTMLBuilder::getRealProto(MCONTACT hContact) char *HTMLBuilder::getRealProto(MCONTACT hContact, const char *szProto) { - if (szProto != NULL && !strcmp(szProto, "MetaContacts")) { + if (szProto != NULL && !strcmp(szProto, META_PROTO)) { hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0); if (hContact != NULL) return mir_strdup(GetContactProto(hContact)); @@ -171,7 +171,7 @@ char *HTMLBuilder::getRealProto(MCONTACT hContact, const char *szProto) MCONTACT HTMLBuilder::getRealContact(MCONTACT hContact) { char *szProto = GetContactProto(hContact); - if (szProto != NULL && !strcmp(szProto,"MetaContacts")) + if (szProto != NULL && !strcmp(szProto, META_PROTO)) hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0); return hContact; } diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp index 9c9959e24e..7be2656e0d 100644 --- a/plugins/IEView/src/Options.cpp +++ b/plugins/IEView/src/Options.cpp @@ -1481,17 +1481,18 @@ void Options::init() ProtocolSettings *proto; char tmpPath[MAX_PATH]; char dbsName[256]; - if (i==0) { + if (i == 0) { proto = new ProtocolSettings("_default_"); proto->setSRMMEnable(true); - } else if (strcmp(pProtos[i-1]->szModuleName,"MetaContacts")) { - if ((CallProtoService(pProtos[i-1]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM) == 0) { + } + else if (strcmp(pProtos[i-1]->szModuleName, META_PROTO)) { + if ((CallProtoService(pProtos[i - 1]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM) == 0) continue; - } - proto = new ProtocolSettings(pProtos[i-1]->szModuleName); - } else { - continue; + + proto = new ProtocolSettings(pProtos[i - 1]->szModuleName); } + else continue; + /* SRMM settings */ mir_snprintf(dbsName, SIZEOF(dbsName), "%s.%s", proto->getProtocolName(), DBS_SRMM_ENABLE); proto->setSRMMEnable(i==0 ? true : 0 != db_get_b(NULL, ieviewModuleName, dbsName, FALSE)); -- cgit v1.2.3