summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-09-11 22:27:34 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-09-11 22:27:34 +0300
commit9834746e6a7e5cf04a32273155265bc3a2f57180 (patch)
tree66366fe9d2f74b09cc70bed366ad7d6c542c94ad /src/core
parent9a774c4e9e76e660c14a5f725252bbc275b13906 (diff)
old good sound services became finally functions
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdauth/src/auth.cpp8
-rw-r--r--src/core/stdfile/src/file.cpp10
-rw-r--r--src/core/stdfile/src/filerecvdlg.cpp2
-rw-r--r--src/core/stdfile/src/filexferdlg.cpp6
-rw-r--r--src/core/stdmsg/src/globals.cpp2
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp4
-rw-r--r--src/core/stdmsg/src/msgs.cpp24
-rw-r--r--src/core/stdmsg/src/msgtimedout.cpp2
-rw-r--r--src/core/stduseronline/src/useronline.cpp4
9 files changed, 31 insertions, 31 deletions
diff --git a/src/core/stdauth/src/auth.cpp b/src/core/stdauth/src/auth.cpp
index e7074b4dbb..7b5b3ae59b 100644
--- a/src/core/stdauth/src/auth.cpp
+++ b/src/core/stdauth/src/auth.cpp
@@ -68,7 +68,7 @@ static int AuthEventAdded(WPARAM, LPARAM lParam)
ptrW szUid(Contact_GetInfo(CNF_UNIQUEID, hContact));
if (dbei.eventType == EVENTTYPE_AUTHREQUEST) {
- SkinPlaySound("AuthRequest");
+ Skin_PlaySound("AuthRequest");
if (szUid)
mir_snwprintf(szTooltip, TranslateT("%s requests authorization"), szUid);
else
@@ -79,7 +79,7 @@ static int AuthEventAdded(WPARAM, LPARAM lParam)
pcli->pfnAddEvent(&cli);
}
else if (dbei.eventType == EVENTTYPE_ADDED) {
- SkinPlaySound("AddedEvent");
+ Skin_PlaySound("AddedEvent");
if (szUid)
mir_snwprintf(szTooltip, TranslateT("%s added you to their contact list"), szUid);
else
@@ -98,7 +98,7 @@ int LoadSendRecvAuthModule(void)
CreateServiceFunction(MS_AUTH_SHOWADDED, ShowAddedWindow);
HookEvent(ME_DB_EVENT_ADDED, AuthEventAdded);
- SkinAddNewSoundEx("AuthRequest", LPGEN("Alerts"), LPGEN("Authorization request"));
- SkinAddNewSoundEx("AddedEvent", LPGEN("Alerts"), LPGEN("Added event"));
+ Skin_AddSound("AuthRequest", LPGENW("Alerts"), LPGENW("Authorization request"));
+ Skin_AddSound("AddedEvent", LPGENW("Alerts"), LPGENW("Added event"));
return 0;
}
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp
index bc68940dd9..3d391dd7a7 100644
--- a/src/core/stdfile/src/file.cpp
+++ b/src/core/stdfile/src/file.cpp
@@ -105,7 +105,7 @@ void PushFileEvent(MCONTACT hContact, MEVENT hdbe, LPARAM lParam)
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILERECV), NULL, DlgProcRecvFile, (LPARAM)&cle);
}
else {
- SkinPlaySound("RecvFile");
+ Skin_PlaySound("RecvFile");
wchar_t szTooltip[256];
mir_snwprintf(szTooltip, TranslateT("File from %s"), pcli->pfnGetContactDisplayName(hContact, 0));
@@ -443,9 +443,9 @@ int LoadSendRecvFileModule(void)
CreateServiceFunction("SRFile/OpenContRecDir", openContRecDir);
CreateServiceFunction("SRFile/OpenRecDir", openRecDir);
- SkinAddNewSoundEx("RecvFile", LPGEN("File"), LPGEN("Incoming"));
- SkinAddNewSoundEx("FileDone", LPGEN("File"), LPGEN("Complete"));
- SkinAddNewSoundEx("FileFailed", LPGEN("File"), LPGEN("Error"));
- SkinAddNewSoundEx("FileDenied", LPGEN("File"), LPGEN("Denied"));
+ Skin_AddSound("RecvFile", LPGENW("File"), LPGENW("Incoming"));
+ Skin_AddSound("FileDone", LPGENW("File"), LPGENW("Complete"));
+ Skin_AddSound("FileFailed", LPGENW("File"), LPGENW("Error"));
+ Skin_AddSound("FileDenied", LPGENW("File"), LPGENW("Denied"));
return 0;
}
diff --git a/src/core/stdfile/src/filerecvdlg.cpp b/src/core/stdfile/src/filerecvdlg.cpp
index 7a9edaad87..5f6baa2e04 100644
--- a/src/core/stdfile/src/filerecvdlg.cpp
+++ b/src/core/stdfile/src/filerecvdlg.cpp
@@ -388,7 +388,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
EnableWindow(GetDlgItem(hwndDlg, IDC_FILEDIR), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_FILEDIRBROWSE), FALSE);
SetDlgItemText(hwndDlg, IDC_MSG, TranslateT("This file transfer has been canceled by the other side"));
- SkinPlaySound("FileDenied");
+ Skin_PlaySound("FileDenied");
FlashWindow(hwndDlg, TRUE);
}
else if (ack->result != ACKRESULT_FILERESUME)
diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp
index ed875004c1..d3499bfcb8 100644
--- a/src/core/stdfile/src/filexferdlg.cpp
+++ b/src/core/stdfile/src/filexferdlg.cpp
@@ -624,16 +624,16 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
if (ack->result == ACKRESULT_DENIED) {
dat->fs = NULL; /* protocol will free structure */
- SkinPlaySound("FileDenied");
+ Skin_PlaySound("FileDenied");
SetFtStatus(hwndDlg, LPGENW("File transfer denied"), FTS_TEXT);
}
else if (ack->result == ACKRESULT_FAILED) {
dat->fs = NULL; /* protocol will free structure */
- SkinPlaySound("FileFailed");
+ Skin_PlaySound("FileFailed");
SetFtStatus(hwndDlg, LPGENW("File transfer failed"), FTS_TEXT);
}
else {
- SkinPlaySound("FileDone");
+ Skin_PlaySound("FileDone");
if (dat->send) {
dat->fs = NULL; /* protocol will free structure */
SetFtStatus(hwndDlg, LPGENW("Transfer completed."), FTS_TEXT);
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)&param);
diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp
index 3ac251408d..b7ff2473b0 100644
--- a/src/core/stduseronline/src/useronline.cpp
+++ b/src/core/stduseronline/src/useronline.cpp
@@ -65,7 +65,7 @@ static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam)
pcli->pfnAddEvent(&cle);
IcoLib_ReleaseIcon(cle.hIcon, 0);
db_set_dw(cle.hContact, "UserOnline", "LastEvent", (DWORD)cle.hDbEvent);
- SkinPlaySound("UserOnline");
+ Skin_PlaySound("UserOnline");
}
}
}
@@ -117,6 +117,6 @@ int LoadUserOnlineModule(void)
HookEvent(ME_PROTO_ACK, UserOnlineAck);
HookEvent(ME_SYSTEM_MODULESLOADED, UserOnlineModulesLoaded);
HookEvent(ME_PROTO_ACCLISTCHANGED, UserOnlineAccountsChanged);
- SkinAddNewSoundEx("UserOnline", LPGEN("Alerts"), LPGEN("Online"));
+ Skin_AddSound("UserOnline", LPGENW("Alerts"), LPGENW("Online"));
return 0;
}