From 1fb0cd07fba1e8d6f9ac2ebe3b4f2e1c60acb81b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 27 Feb 2014 21:51:46 +0000 Subject: - metacontacts are always present; - added META_PROTO constant for mc module name; - MS_MC_GETPROTOCOLNAME removed, because it always returns META_PROTO git-svn-id: http://svn.miranda-ng.org/main/trunk@8319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TipperYM/src/common.h | 1 - plugins/TipperYM/src/mir_smileys.cpp | 2 +- plugins/TipperYM/src/popwin.cpp | 2 +- plugins/TipperYM/src/subst.cpp | 5 ++--- plugins/TipperYM/src/tipper.cpp | 7 ------- 5 files changed, 4 insertions(+), 13 deletions(-) (limited to 'plugins/TipperYM') diff --git a/plugins/TipperYM/src/common.h b/plugins/TipperYM/src/common.h index e3fc85c62b..398d4111fa 100644 --- a/plugins/TipperYM/src/common.h +++ b/plugins/TipperYM/src/common.h @@ -97,7 +97,6 @@ extern HFONT hFontTitle, hFontLabels, hFontValues, hFontTrayTitle; extern COLORREF colTitle, colLabels, colBg, colValues; extern int iCodePage; -extern char szMetaModuleName[256]; extern FI_INTERFACE *fii; diff --git a/plugins/TipperYM/src/mir_smileys.cpp b/plugins/TipperYM/src/mir_smileys.cpp index 9e19108565..f2ae1783dc 100644 --- a/plugins/TipperYM/src/mir_smileys.cpp +++ b/plugins/TipperYM/src/mir_smileys.cpp @@ -346,7 +346,7 @@ SortedList *ReplaceSmileys(const TCHAR *text, int text_size, const char *protoco if (protocol == NULL) strcpy(smileyProto, "tipper"); - else if (strcmp(protocol, szMetaModuleName) == 0) + else if (strcmp(protocol, META_PROTO) == 0) strcpy(smileyProto, "tipper"); else strcpy(smileyProto, protocol); diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 8318be45e8..a861f8fd69 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -336,7 +336,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa int iXstatus = db_get_b(pwd->hContact, szProto, "XStatusId", 0); if (iXstatus) { char szIconProto[64]; - if (strcmp(szProto, szMetaModuleName) != 0) + if (strcmp(szProto, META_PROTO) != 0) strcpy(szIconProto, szProto); else if (!db_get_s(pwd->hContact, szProto, "XStatusProto", &dbv)) { strcpy(szIconProto, dbv.pszVal); diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index 68bf45606d..fe6cfe6e30 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -249,7 +249,7 @@ TCHAR *GetStatusMessageText(MCONTACT hContact) char *szProto = GetContactProto(hContact); if (szProto) { - if (!strcmp(szProto, szMetaModuleName)) + if (!strcmp(szProto, META_PROTO)) hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0); else { WORD wStatus = (int)CallProtoService(szProto, PS_GETSTATUS, 0, 0); @@ -412,8 +412,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff MCONTACT hTmpContact = hContact; char *szProto = GetContactProto(hContact); - if (szProto && !strcmp(szProto, szMetaModuleName)) - { + if (szProto && !strcmp(szProto, META_PROTO)) { iNumber = CallService(MS_MC_GETNUMCONTACTS, hContact, 0); hTmpContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, hContact, 0); } diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index 822775154f..9259bb827d 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -22,8 +22,6 @@ Boston, MA 02111-1307, USA. HMODULE hInst; -char szMetaModuleName[256] = {0}; - FontIDT fontTitle, fontLabels, fontValues, fontTrayTitle; ColourIDT colourBg, colourBorder, colourAvatarBorder, colourDivider, colourSidebar; HFONT hFontTitle, hFontLabels, hFontValues, hFontTrayTitle; @@ -270,11 +268,6 @@ int ModulesLoaded(WPARAM, LPARAM) // set Miranda start timestamp db_set_dw(0, MODULE, "MirandaStartTS", (DWORD)time(0)); - - // get MetaContacts module name - if (ServiceExists(MS_MC_GETPROTOCOLNAME)) - strcpy(szMetaModuleName, (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0)); - return 0; } -- cgit v1.2.3