From 83310365c69bd40365ee0ae0e16c99c28e24cd0b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 14:24:12 +0000 Subject: - 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 --- plugins/MenuItemEx/src/main.cpp | 18 +++++++++--------- plugins/MenuItemEx/src/menuex.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins/MenuItemEx') diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 5a4a1b3fff..895f5d0f1d 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -599,7 +599,7 @@ INT_PTR onCopyID(WPARAM wparam, LPARAM lparam) GetID(hContact, szProto, (LPSTR)&szID, SIZEOF(szID)); if (db_get_dw(NULL, MODULENAME, "flags", vf_default) & VF_CIDN) { - PROTOACCOUNT *pa = ProtoGetAccount(szProto); + PROTOACCOUNT *pa = Proto_GetAccount(szProto); if (!pa->bOldProto) mir_snprintf(buffer, "%s: %s", pa->szProtoName, szID); @@ -700,13 +700,13 @@ INT_PTR onChangeProto(WPARAM wparam, LPARAM lparam) if (CTRL_IS_PRESSED) { hContactNew = hContact; RenameDbProto(hContact, hContactNew, GetContactProto(hContact), (char*)lparam, 1); - CallService(MS_PROTO_REMOVEFROMCONTACT, hContact, (LPARAM)GetContactProto(hContact)); - CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContactNew, lparam); + Proto_RemoveFromContact(hContact, GetContactProto(hContact)); + Proto_AddToContact(hContactNew, (char*)lparam); } else { hContactNew = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0); if (hContactNew) { - CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContactNew, lparam); + Proto_AddToContact(hContactNew, (char*)lparam); RenameDbProto(hContact, hContactNew, GetContactProto(hContact), (char*)lparam, 0); RenameDbProto(hContact, hContactNew, "CList", "CList", 0); } @@ -776,7 +776,7 @@ int BuildMenu(WPARAM wparam, LPARAM) BOOL bIsOnline = FALSE, bShowAll = CTRL_IS_PRESSED; MCONTACT hContact = (MCONTACT)wparam; char* pszProto = GetContactProto(hContact); - PROTOACCOUNT *pa = ProtoGetAccount(pszProto); + PROTOACCOUNT *pa = Proto_GetAccount(pszProto); bIsOnline = isProtoOnline(pszProto); @@ -822,15 +822,15 @@ int BuildMenu(WPARAM wparam, LPARAM) j++; } - int check = 0 != CallService(MS_PROTO_ISPROTOONCONTACT, wparam, (LPARAM)accs[i]->szModuleName); + int check = Proto_IsProtoOnContact(wparam, accs[i]->szModuleName); ModifySubmenuItem(hProtoItem[i], accs[i]->tszAccountName, check, hide); } Menu_ShowItem(hmenuProto, j > 1); } else Menu_ShowItem(hmenuProto, false); - Menu_ShowItem(hmenuAdded, (bShowAll || (flags & VF_ADD)) && bIsOnline && IsAccountEnabled(pa)); - Menu_ShowItem(hmenuAuthReq, (bShowAll || (flags & VF_REQ)) && bIsOnline && IsAccountEnabled(pa)); + Menu_ShowItem(hmenuAdded, (bShowAll || (flags & VF_ADD)) && bIsOnline && Proto_IsAccountEnabled(pa)); + Menu_ShowItem(hmenuAuthReq, (bShowAll || (flags & VF_REQ)) && bIsOnline && Proto_IsAccountEnabled(pa)); bEnabled = bShowAll || (flags & VF_CID); Menu_ShowItem(hmenuCopyID, bEnabled); @@ -883,7 +883,7 @@ int EnumProtoSubmenu(WPARAM, LPARAM) } } } - ProtoEnumAccounts(&protoCount, &accs); + Proto_EnumAccounts(&protoCount, &accs); if (protoCount > MAX_PROTOS) protoCount = MAX_PROTOS; for (int i = 0; i < protoCount; i++) diff --git a/plugins/MenuItemEx/src/menuex.h b/plugins/MenuItemEx/src/menuex.h index 51539bdf50..1d3ae7cda6 100644 --- a/plugins/MenuItemEx/src/menuex.h +++ b/plugins/MenuItemEx/src/menuex.h @@ -10,9 +10,9 @@ #include #include #include +#include #include #include -#include #include #include #include -- cgit v1.2.3