summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-21 09:48:22 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-21 09:48:22 +0000
commit8d5ba8b33cad9eb86066fefc29102d2734f4a292 (patch)
tree8ba73b8a9f72c76b7803249dba47bdec3b421987 /src
parent14581eb25783e0ffadb2af430b97074f6f1ec652 (diff)
improperly named helper renamed
git-svn-id: http://svn.miranda-ng.org/main/trunk@17110 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/core/stdaway/src/awaymsg.cpp2
-rw-r--r--src/core/stdfile/src/filerecvdlg.cpp2
-rw-r--r--src/core/stdfile/src/filexferdlg.cpp8
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp2
-rw-r--r--src/core/stduserinfo/src/userinfo.cpp4
-rw-r--r--src/mir_app/src/addcontact.cpp6
-rw-r--r--src/mir_app/src/clc.cpp4
-rw-r--r--src/mir_app/src/clistgroups.cpp5
-rw-r--r--src/mir_app/src/clistsettings.cpp2
-rw-r--r--src/mir_app/src/meta_services.cpp8
-rw-r--r--src/mir_app/src/mir_app.def1
-rw-r--r--src/mir_app/src/mir_app64.def1
-rw-r--r--src/mir_app/src/proto_chains.cpp8
-rw-r--r--src/mir_app/src/visibility.cpp4
14 files changed, 26 insertions, 31 deletions
diff --git a/src/core/stdaway/src/awaymsg.cpp b/src/core/stdaway/src/awaymsg.cpp
index 3a12064e55..2efff40a04 100644
--- a/src/core/stdaway/src/awaymsg.cpp
+++ b/src/core/stdaway/src/awaymsg.cpp
@@ -51,7 +51,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP
if (dat->hContact == NULL)
dat->hContact = lParam;
dat->hAwayMsgEvent = HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG);
- dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0);
+ dat->hSeq = (HANDLE)ProtoChainSend(dat->hContact, PSS_GETAWAYMSG, 0, 0);
WindowList_Add(hWindowList, hwndDlg, dat->hContact);
{
TCHAR str[256], format[128];
diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp
index cbed678e37..637ab19208 100644
--- a/src/core/stdfile/src/filerecvdlg.cpp
+++ b/src/core/stdfile/src/filerecvdlg.cpp
@@ -340,7 +340,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
break;
case IDCANCEL:
- if (dat->fs) CallContactService(dat->hContact, PSS_FILEDENY, (WPARAM)dat->fs, (LPARAM)TranslateT("Canceled"));
+ if (dat->fs) ProtoChainSend(dat->hContact, PSS_FILEDENY, (WPARAM)dat->fs, (LPARAM)TranslateT("Canceled"));
dat->fs = NULL; /* the protocol will free the handle */
DestroyWindow(hwndDlg);
break;
diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp
index 347fc79a56..e8f4d1212b 100644
--- a/src/core/stdfile/src/filexferdlg.cpp
+++ b/src/core/stdfile/src/filexferdlg.cpp
@@ -236,7 +236,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
if (dat->send) {
if (db_mc_isMeta(dat->hContact))
dat->hContact = db_mc_getMostOnline(dat->hContact);
- dat->fs = (HANDLE)CallContactService(dat->hContact, PSS_FILE, (WPARAM)dat->szMsg, (LPARAM)dat->files);
+ dat->fs = (HANDLE)ProtoChainSend(dat->hContact, PSS_FILE, (WPARAM)dat->szMsg, (LPARAM)dat->files);
SetFtStatus(hwndDlg, LPGENT("Request sent, waiting for acceptance..."), FTS_TEXT);
SetOpenFileButtonStyle(GetDlgItem(hwndDlg, IDC_OPENFILE), 1);
dat->waitingForAcceptance = 1;
@@ -246,7 +246,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
}
else { //recv
CreateDirectoryTreeT(dat->szSavePath);
- dat->fs = (HANDLE)CallContactService(dat->hContact, PSS_FILEALLOW, (WPARAM)dat->fs, (LPARAM)dat->szSavePath);
+ dat->fs = (HANDLE)ProtoChainSend(dat->hContact, PSS_FILEALLOW, (WPARAM)dat->fs, (LPARAM)dat->szSavePath);
dat->transferStatus.tszWorkingDir = mir_tstrdup(dat->szSavePath);
if (db_get_b(dat->hContact, "CList", "NotOnList", 0)) dat->resumeBehaviour = FILERESUME_ASK;
else dat->resumeBehaviour = db_get_b(NULL, "SRFile", "IfExists", FILERESUME_ASK);
@@ -462,7 +462,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
switch (pfr->action) {
case FILERESUME_CANCEL:
- if (dat->fs) CallContactService(dat->hContact, PSS_FILECANCEL, (WPARAM)dat->fs, 0);
+ if (dat->fs) ProtoChainSend(dat->hContact, PSS_FILECANCEL, (WPARAM)dat->fs, 0);
dat->fs = NULL;
mir_free(szOriginalFilename);
if (pfr->szFilename) mir_free((char*)pfr->szFilename);
@@ -742,7 +742,7 @@ void FreeFileDlgData(FileDlgData* dat)
return;
if (dat->fs)
- CallContactService(dat->hContact, PSS_FILECANCEL, (WPARAM)dat->fs, 0);
+ ProtoChainSend(dat->hContact, PSS_FILECANCEL, (WPARAM)dat->fs, 0);
if (dat->hPreshutdownEvent)
UnhookEvent(dat->hPreshutdownEvent);
if (dat->hNotifyEvent)
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 9e43d2cf48..ce327aad3a 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -82,7 +82,7 @@ int SendMessageDirect(const TCHAR *szMsg, MCONTACT hContact, char*)
if (db_mc_isMeta(hContact))
hContact = db_mc_getSrmmSub(hContact);
- int sendId = CallContactService(hContact, PSS_MESSAGE, flags, (LPARAM)sendBuffer);
+ int sendId = ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)sendBuffer);
msgQueue_add(hContact, sendId, sendBuffer.detach(), flags);
return sendId;
}
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp
index 23009dcaa5..97948126df 100644
--- a/src/core/stduserinfo/src/userinfo.cpp
+++ b/src/core/stduserinfo/src/userinfo.cpp
@@ -343,7 +343,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP
dat->updateAnimFrame = 0;
GetDlgItemText(hwndDlg, IDC_UPDATING, dat->szUpdating, _countof(dat->szUpdating));
SendMessage(hwndDlg, M_CHECKONLINE, 0, 0);
- if (!CallContactService(dat->hContact, PSS_GETINFO, SGIF_ONOPEN, 0)) {
+ if (!ProtoChainSend(dat->hContact, PSS_GETINFO, SGIF_ONOPEN, 0)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_UPDATE), FALSE);
SetTimer(hwndDlg, 1, 100, NULL);
}
@@ -565,7 +565,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP
dat->infosUpdated = NULL;
}
if (dat->hContact != NULL) {
- if (!CallContactService(dat->hContact, PSS_GETINFO, 0, 0)) {
+ if (!ProtoChainSend(dat->hContact, PSS_GETINFO, 0, 0)) {
EnableWindow(GetDlgItem(hwndDlg, IDC_UPDATE), FALSE);
ShowWindow(GetDlgItem(hwndDlg, IDC_UPDATING), SW_SHOW);
SetTimer(hwndDlg, 1, 100, NULL);
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;
}