From 8d5ba8b33cad9eb86066fefc29102d2734f4a292 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 21 Jul 2016 09:48:22 +0000 Subject: improperly named helper renamed git-svn-id: http://svn.miranda-ng.org/main/trunk@17110 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_app/src/addcontact.cpp | 6 +++--- src/mir_app/src/clc.cpp | 4 +++- src/mir_app/src/clistgroups.cpp | 5 ++++- src/mir_app/src/clistsettings.cpp | 2 +- src/mir_app/src/meta_services.cpp | 8 ++++---- src/mir_app/src/mir_app.def | 1 - src/mir_app/src/mir_app64.def | 1 - src/mir_app/src/proto_chains.cpp | 8 -------- src/mir_app/src/visibility.cpp | 4 ++-- 9 files changed, 17 insertions(+), 22 deletions(-) (limited to 'src/mir_app') diff --git a/src/mir_app/src/addcontact.cpp b/src/mir_app/src/addcontact.cpp index 0a712d6833..34d314ef62 100644 --- a/src/mir_app/src/addcontact.cpp +++ b/src/mir_app/src/addcontact.cpp @@ -209,14 +209,14 @@ public: db_unset(hContact, "CList", "NotOnList"); if (m_chkAdded.GetState()) - CallContactService(hContact, PSS_ADDED, 0, 0); + ProtoChainSend(hContact, PSS_ADDED, 0, 0); if (m_chkAuth.GetState()) { DWORD flags = CallProtoServiceInt(NULL, m_acs.szProto, PS_GETCAPS, PFLAGNUM_4, 0); if (flags & PF4_NOCUSTOMAUTH) - CallContactService(hContact, PSS_AUTHREQUEST, 0, 0); + ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, 0); else - CallContactService(hContact, PSS_AUTHREQUEST, 0, ptrT(m_authReq.GetText())); + ProtoChainSend(hContact, PSS_AUTHREQUEST, 0, ptrT(m_authReq.GetText())); } if (m_chkOpen.GetState()) diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index 083352ddf7..afe24c34e7 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -66,11 +66,13 @@ void fnClcOptionsChanged(void) ///////////////////////////////////////////////////////////////////////////////////////// // standard CLC services +extern bool g_bGroupsLocked; + static int ClcSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam; if (hContact == NULL) { - if (!strcmp(cws->szModule, "CListGroups")) + if (!strcmp(cws->szModule, "CListGroups") && !g_bGroupsLocked) Clist_Broadcast(INTM_GROUPSCHANGED, hContact, lParam); return 0; } diff --git a/src/mir_app/src/clistgroups.cpp b/src/mir_app/src/clistgroups.cpp index dd4d23571a..a903646839 100644 --- a/src/mir_app/src/clistgroups.cpp +++ b/src/mir_app/src/clistgroups.cpp @@ -73,6 +73,7 @@ static CGroupList arByIds; ///////////////////////////////////////////////////////////////////////////////////////// HANDLE hGroupChangeEvent; +bool g_bGroupsLocked = false; static mir_cs csGroups; @@ -295,6 +296,7 @@ MIR_APP_DLL(int) Clist_GroupMoveBefore(MGROUP hGroup, MGROUP hGroupBefore) } } + g_bGroupsLocked = true; arByIds.remove(pGroup); for (int i = shuffleFrom; i != shuffleTo; i += shuffleStep) { @@ -307,6 +309,7 @@ MIR_APP_DLL(int) Clist_GroupMoveBefore(MGROUP hGroup, MGROUP hGroupBefore) pGroup->save(); arByIds.insert(pGroup); + g_bGroupsLocked = false; return shuffleTo + 1; } @@ -371,7 +374,7 @@ static int RenameGroupWithMove(int groupId, const TCHAR *szName, int move) } } } - cli.pfnInitAutoRebuild(cli.hwndContactTree); + Clist_BroadcastAsync(CLM_AUTOREBUILD, 0, 0); } const CLISTGROUPCHANGE grpChg = { sizeof(grpChg), oldName, (TCHAR*)szName }; diff --git a/src/mir_app/src/clistsettings.cpp b/src/mir_app/src/clistsettings.cpp index 0e245c4d63..0e452807de 100644 --- a/src/mir_app/src/clistsettings.cpp +++ b/src/mir_app/src/clistsettings.cpp @@ -121,7 +121,7 @@ TCHAR* fnGetContactDisplayName(MCONTACT hContact, int mode) return tszDisplayName.detach(); } - CallContactService(hContact, PSS_GETINFO, SGIF_MINIMAL, 0); + ProtoChainSend(hContact, PSS_GETINFO, SGIF_MINIMAL, 0); TCHAR *buffer = TranslateT("(Unknown contact)"); return (cacheEntry == NULL) ? mir_tstrdup(buffer) : buffer; diff --git a/src/mir_app/src/meta_services.cpp b/src/mir_app/src/meta_services.cpp index 6540a39b67..a4c9d1988b 100644 --- a/src/mir_app/src/meta_services.cpp +++ b/src/mir_app/src/meta_services.cpp @@ -259,7 +259,7 @@ INT_PTR Meta_SendMessage(WPARAM wParam, LPARAM lParam) char *proto = GetContactProto(hMostOnline); Meta_SetNick(proto); // (no matter what was there before) - return CallContactService(ccs->hContact, PSS_MESSAGE, ccs->wParam, ccs->lParam); + return ProtoChainSend(ccs->hContact, PSS_MESSAGE, ccs->wParam, ccs->lParam); } /** Called when an ACK is received. @@ -724,7 +724,7 @@ INT_PTR Meta_FileSend(WPARAM, LPARAM lParam) char *proto = GetContactProto(hMostOnline); if (proto) - return CallContactService(hMostOnline, PSS_FILE, ccs->wParam, ccs->lParam); + return ProtoChainSend(hMostOnline, PSS_FILE, ccs->wParam, ccs->lParam); return 0; // fail } @@ -745,7 +745,7 @@ INT_PTR Meta_GetAwayMsg(WPARAM, LPARAM lParam) return 0; ccs->hContact = hMostOnline; - return CallContactService(ccs->hContact, PSS_GETAWAYMSG, ccs->wParam, ccs->lParam); + return ProtoChainSend(ccs->hContact, PSS_GETAWAYMSG, ccs->wParam, ccs->lParam); } INT_PTR Meta_GetAvatarInfo(WPARAM wParam, LPARAM lParam) @@ -810,7 +810,7 @@ INT_PTR Meta_GetInfo(WPARAM, LPARAM lParam) if (!ProtoServiceExists(proto, PSS_GETINFO)) return 0; // fail - return CallContactService(ccs->hContact, PSS_GETINFO, ccs->wParam, ccs->lParam); + return ProtoChainSend(ccs->hContact, PSS_GETINFO, ccs->wParam, ccs->lParam); } int Meta_CallMostOnline(WPARAM hContact, LPARAM) diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 6f5048578f..b8ffebf951 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -1,7 +1,6 @@ LIBRARY mir_app.mir EXPORTS -CallContactService @1 CallProtoService @2 Skin_LoadProtoIcon @4 Skin_LoadIcon @5 diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 6f48beb92d..9ac85f12c7 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -1,7 +1,6 @@ LIBRARY mir_app.mir EXPORTS -CallContactService @1 CallProtoService @2 Skin_LoadProtoIcon @4 Skin_LoadIcon @5 diff --git a/src/mir_app/src/proto_chains.cpp b/src/mir_app/src/proto_chains.cpp index 2bfc143f43..42d34cad15 100644 --- a/src/mir_app/src/proto_chains.cpp +++ b/src/mir_app/src/proto_chains.cpp @@ -89,14 +89,6 @@ MIR_APP_DLL(INT_PTR) Proto_ChainSend(int iOrder, CCSDATA *ccs) ///////////////////////////////////////////////////////////////////////////////////////// -MIR_APP_DLL(INT_PTR) CallContactService(MCONTACT hContact, const char *szProtoService, WPARAM wParam, LPARAM lParam) -{ - CCSDATA ccs = { hContact, szProtoService, wParam, lParam }; - return Proto_ChainSend(0, &ccs); -} - -///////////////////////////////////////////////////////////////////////////////////////// - INT_PTR stubChainRecv(WPARAM wParam, LPARAM lParam) { CCSDATA *ccs = (CCSDATA*)lParam; diff --git a/src/mir_app/src/visibility.cpp b/src/mir_app/src/visibility.cpp index 930e3c1805..6f2e540a84 100644 --- a/src/mir_app/src/visibility.cpp +++ b/src/mir_app/src/visibility.cpp @@ -244,13 +244,13 @@ static INT_PTR CALLBACK DlgProcVisibilityOpts(HWND hwndDlg, UINT msg, WPARAM, LP for (int i = 0; i < 2; i++) { int iImage = SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(i, 0)); if (iImage == i + 1) { - CallContactService(hContact, PSS_SETAPPARENTMODE, iImage == 1 ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE, 0); + ProtoChainSend(hContact, PSS_SETAPPARENTMODE, iImage == 1 ? ID_STATUS_ONLINE : ID_STATUS_OFFLINE, 0); set = 1; break; } } if (!set) - CallContactService(hContact, PSS_SETAPPARENTMODE, 0, 0); + ProtoChainSend(hContact, PSS_SETAPPARENTMODE, 0, 0); } return TRUE; } -- cgit v1.2.3