From f2656f118f63643151e53694bd223018c29b4a55 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 11 Sep 2017 22:27:34 +0300 Subject: old good sound services became finally functions --- src/core/stdmsg/src/globals.cpp | 2 +- src/core/stdmsg/src/msgdialog.cpp | 4 ++-- src/core/stdmsg/src/msgs.cpp | 24 ++++++++++++------------ src/core/stdmsg/src/msgtimedout.cpp | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'src/core/stdmsg') diff --git a/src/core/stdmsg/src/globals.cpp b/src/core/stdmsg/src/globals.cpp index 4675677588..661837a1b2 100644 --- a/src/core/stdmsg/src/globals.cpp +++ b/src/core/stdmsg/src/globals.cpp @@ -87,7 +87,7 @@ static int ackevent(WPARAM, LPARAM lParam) msgQueue_processack(pAck->hContact, (INT_PTR)pAck->hProcess, pAck->result == ACKRESULT_SUCCESS, (char*)pAck->lParam); if (pAck->result == ACKRESULT_SUCCESS) - SkinPlaySound("SendMsg"); + Skin_PlaySound("SendMsg"); } return 0; } diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 7f418e285d..e3834976ff 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -1148,9 +1148,9 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) // Sounds *only* for sent messages, not for custom events if (isMessage && !isSent) { if (GetForegroundWindow() == m_pOwner->GetHwnd()) - SkinPlaySound("RecvMsgActive"); + Skin_PlaySound("RecvMsgActive"); else - SkinPlaySound("RecvMsgInactive"); + Skin_PlaySound("RecvMsgInactive"); } if (isMessage && !isSent) { m_lastMessage = dbei.timestamp; diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 7df2891d00..1b2fa2a775 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -72,18 +72,18 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam) ShowWindow(hwnd, SW_RESTORE); SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); SetForegroundWindow(hwnd); - SkinPlaySound("RecvMsgActive"); + Skin_PlaySound("RecvMsgActive"); } else { if (GetForegroundWindow() == GetParent(hwnd)) - SkinPlaySound("RecvMsgActive"); + Skin_PlaySound("RecvMsgActive"); else - SkinPlaySound("RecvMsgInactive"); + Skin_PlaySound("RecvMsgInactive"); } return 0; } /* new message */ - SkinPlaySound("AlertMsg"); + Skin_PlaySound("AlertMsg"); char *szProto = GetContactProto(hContact); if (szProto && (g_dat.openFlags & SRMMStatusToPf2(CallProtoService(szProto, PS_GETSTATUS, 0, 0)))) { @@ -164,7 +164,7 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam) hContact = db_mc_tryMeta(hContact); - SkinPlaySound((lParam) ? "TNStart" : "TNStop"); + Skin_PlaySound((lParam) ? "TNStart" : "TNStop"); HWND hwnd = Srmm_FindWindow(hContact); if (hwnd) @@ -511,13 +511,13 @@ int LoadSendRecvMessageModule(void) CreateServiceFunction(MS_MSG_SENDMESSAGEW, SendMessageCommand_W); CreateServiceFunction(MS_MSG_READMESSAGE, ReadMessageCommand); - SkinAddNewSoundEx("RecvMsgActive", LPGEN("Instant messages"), LPGEN("Incoming (focused window)")); - SkinAddNewSoundEx("RecvMsgInactive", LPGEN("Instant messages"), LPGEN("Incoming (unfocused window)")); - SkinAddNewSoundEx("AlertMsg", LPGEN("Instant messages"), LPGEN("Incoming (new session)")); - SkinAddNewSoundEx("SendMsg", LPGEN("Instant messages"), LPGEN("Outgoing")); - SkinAddNewSoundEx("SendError", LPGEN("Instant messages"), LPGEN("Message send error")); - SkinAddNewSoundEx("TNStart", LPGEN("Instant messages"), LPGEN("Contact started typing")); - SkinAddNewSoundEx("TNStop", LPGEN("Instant messages"), LPGEN("Contact stopped typing")); + Skin_AddSound("RecvMsgActive", LPGENW("Instant messages"), LPGENW("Incoming (focused window)")); + Skin_AddSound("RecvMsgInactive", LPGENW("Instant messages"), LPGENW("Incoming (unfocused window)")); + Skin_AddSound("AlertMsg", LPGENW("Instant messages"), LPGENW("Incoming (new session)")); + Skin_AddSound("SendMsg", LPGENW("Instant messages"), LPGENW("Outgoing")); + Skin_AddSound("SendError", LPGENW("Instant messages"), LPGENW("Message send error")); + Skin_AddSound("TNStart", LPGENW("Instant messages"), LPGENW("Contact started typing")); + Skin_AddSound("TNStop", LPGENW("Instant messages"), LPGENW("Contact stopped typing")); InitStatusIcons(); return 0; diff --git a/src/core/stdmsg/src/msgtimedout.cpp b/src/core/stdmsg/src/msgtimedout.cpp index 7596198ce5..e0ce1ad97c 100644 --- a/src/core/stdmsg/src/msgtimedout.cpp +++ b/src/core/stdmsg/src/msgtimedout.cpp @@ -93,7 +93,7 @@ void MessageFailureProcess(TMsgQueue *item, const char* err) } else SendMessage(hwnd, DM_REMAKELOG, 0, 0); - SkinPlaySound("SendError"); + Skin_PlaySound("SendError"); ErrorDlgParam param = { err, item }; CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSGSENDERROR), hwnd, ErrorDlgProc, (LPARAM)¶m); -- cgit v1.2.3