diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-19 14:24:12 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-19 14:24:12 +0000 |
commit | 83310365c69bd40365ee0ae0e16c99c28e24cd0b (patch) | |
tree | 10ac18bfdc3fcf0fd62a5aba3ccb5dedffa2e410 /plugins/TipperYM | |
parent | d68cd04d6f7b997692476b531bdc30f546a50efd (diff) |
- all static protocol services replaced with functions;
- m_protomod.h removed as useless
git-svn-id: http://svn.miranda-ng.org/main/trunk@14260 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TipperYM')
-rw-r--r-- | plugins/TipperYM/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/popwin.cpp | 16 | ||||
-rw-r--r-- | plugins/TipperYM/src/subst.cpp | 6 |
3 files changed, 11 insertions, 13 deletions
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index 9f58b47288..47a814109c 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -1966,7 +1966,7 @@ INT_PTR CALLBACK DlgProcOptsTraytip(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA int i, count = 0;
PROTOACCOUNT **accs;
- ProtoEnumAccounts(&count, &accs);
+ Proto_EnumAccounts(&count, &accs);
for (i = 0; i < count; i++) {
if (CallProtoService(accs[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) != 0) {
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 55eec69396..1423c9b7ba 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -70,16 +70,14 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa pwd->iIndent = opt.iTextIndent; pwd->iSidebarWidth = opt.iSidebarWidth; - if (ServiceExists(MS_PROTO_GETACCOUNT)) { - PROTOACCOUNT *pa = ProtoGetAccount(pwd->clcit.szProto); - if (pa) - mir_tstrcpy(pwd->swzTitle, pa->tszAccountName); - } + PROTOACCOUNT *pa = Proto_GetAccount(pwd->clcit.szProto); + if (pa) + mir_tstrcpy(pwd->swzTitle, pa->tszAccountName); if (mir_tstrlen(pwd->swzTitle) == 0) a2t(pwd->clcit.szProto, pwd->swzTitle, TITLE_TEXT_LEN); - if (CallService(MS_PROTO_ISACCOUNTLOCKED, 0, (LPARAM)pwd->clcit.szProto)) + if (Proto_IsAccountLocked(pwd->clcit.szProto)) mir_sntprintf(pwd->swzTitle, SIZEOF(pwd->swzTitle), TranslateT("%s (locked)"), pwd->swzTitle); // protocol status @@ -1467,7 +1465,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa int oldOrder = -1, iProtoCount = 0; PROTOACCOUNT **accs; - ProtoEnumAccounts(&iProtoCount, &accs); + Proto_EnumAccounts(&iProtoCount, &accs); for (int j = 0; j < iProtoCount; j++) { PROTOACCOUNT *pa = NULL; @@ -1484,7 +1482,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (opt.bHideOffline && wStatus == ID_STATUS_OFFLINE) continue; - if (!IsAccountEnabled(pa) || !IsTrayProto(pa->tszAccountName, (BOOL)wParam)) + if (!Proto_IsAccountEnabled(pa) || !IsTrayProto(pa->tszAccountName, (BOOL)wParam)) continue; if (dwItems & TRAYTIP_NUMCONTACTS) { @@ -1501,7 +1499,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa TCHAR swzProto[256]; mir_tstrcpy(swzProto, pa->tszAccountName); if (dwItems & TRAYTIP_LOCKSTATUS) - if (CallService(MS_PROTO_ISACCOUNTLOCKED, 0, (LPARAM)pa->szModuleName)) + if (Proto_IsAccountLocked(pa->szModuleName)) mir_sntprintf(swzProto, SIZEOF(swzProto), TranslateT("%s (locked)"), pa->tszAccountName); AddRow(pwd, swzProto, buff, NULL, false, false, !bFirstItem, true, Skin_LoadProtoIcon(pa->szModuleName, wStatus)); diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index 4830e729d7..15310e474d 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -265,12 +265,12 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff } } else if (!mir_tstrcmp(swzRawSpec, _T("account"))) { - char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, hContact, 0); + char *szProto = Proto_GetBaseAccountName(hContact); if ((INT_PTR)szProto == CALLSERVICE_NOTFOUND) { return GetSysSubstText(hContact, _T("proto"), buff, bufflen); } else if (szProto) { - PROTOACCOUNT *pa = ProtoGetAccount(szProto); + PROTOACCOUNT *pa = Proto_GetAccount(szProto); if (pa && pa->tszAccountName) { _tcsncpy(buff, pa->tszAccountName, bufflen); return true; @@ -512,7 +512,7 @@ bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsF if (*p) { char *cp = GetContactProto(hContact); if (cp != NULL) { - PROTOACCOUNT *acc = ProtoGetAccount(cp); + PROTOACCOUNT *acc = Proto_GetAccount(cp); if (acc != NULL) { cp = acc->szProtoName; } |