diff options
author | George Hazan <ghazan@miranda.im> | 2017-09-12 12:14:57 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-09-12 12:14:57 +0300 |
commit | 69409021aced78b31da0c9f2def7332a4c4b973e (patch) | |
tree | 3d9a6607f042acb8d44ece5f3fb08a4125a94e45 /plugins | |
parent | e09448dd03e3647717166e92ee818e395041993a (diff) |
Revert "Merge branch 'master' of https://github.com/miranda-ng/miranda-ng"
This reverts commit e09448dd03e3647717166e92ee818e395041993a, reversing
changes made to b0f44b16bd1138de85a5d17bb42151742f9c8298.
Diffstat (limited to 'plugins')
69 files changed, 222 insertions, 192 deletions
diff --git a/plugins/Alarms/src/alarm_win.cpp b/plugins/Alarms/src/alarm_win.cpp index f00893fbc9..d419884193 100644 --- a/plugins/Alarms/src/alarm_win.cpp +++ b/plugins/Alarms/src/alarm_win.cpp @@ -178,7 +178,7 @@ INT_PTR CALLBACK DlgProcAlarm(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar if (data->sound_num <= 3) {
char buff[128];
mir_snprintf(buff, "Triggered%d", data->sound_num);
- Skin_PlaySound(buff);
+ SkinPlaySound(buff);
}
else if (data->sound_num == 4) {
if (data->szTitle != NULL && data->szTitle[0] != '\0') {
diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp index a8c04b7d42..254e5119fd 100755 --- a/plugins/Alarms/src/alarmlist.cpp +++ b/plugins/Alarms/src/alarmlist.cpp @@ -648,7 +648,7 @@ void DoAlarm(ALARM *alarm) if (alarm->sound_num > 0 && alarm->sound_num <= 3) {
char buff[128];
mir_snprintf(buff, "Triggered%d", alarm->sound_num);
- Skin_PlaySound(buff);
+ SkinPlaySound(buff);
}
else if (alarm->sound_num == 4) {
if (alarm->szTitle != NULL && alarm->szTitle[0] != '\0') {
@@ -779,9 +779,9 @@ int IdleChanged(WPARAM, LPARAM lParam) void InitList()
{
- Skin_AddSound("Triggered1", LPGENW("Alarms"), LPGENW("Alert 1"));
- Skin_AddSound("Triggered2", LPGENW("Alarms"), LPGENW("Alert 2"));
- Skin_AddSound("Triggered3", LPGENW("Alarms"), LPGENW("Alert 3"));
+ SkinAddNewSoundEx("Triggered1", LPGEN("Alarms"), LPGEN("Alert 1"));
+ SkinAddNewSoundEx("Triggered2", LPGEN("Alarms"), LPGEN("Alert 2"));
+ SkinAddNewSoundEx("Triggered3", LPGEN("Alarms"), LPGEN("Alert 3"));
// load last checked time
DBVARIANT dbv;
diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp index 547efe82fa..553ec71f87 100644 --- a/plugins/AutoShutdown/src/shutdownsvc.cpp +++ b/plugins/AutoShutdown/src/shutdownsvc.cpp @@ -328,7 +328,7 @@ static INT_PTR CALLBACK ShutdownDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TEXT_HEADER), GWLP_USERDATA, countdown);
SendMessage(hwndDlg, M_UPDATE_COUNTDOWN, 0, countdown);
}
- Skin_PlaySound("AutoShutdown_Countdown");
+ SkinPlaySound("AutoShutdown_Countdown");
if (!SetTimer(hwndDlg, 1, 1000, NULL))
PostMessage(hwndDlg, M_START_SHUTDOWN, 0, 0);
@@ -375,7 +375,7 @@ static INT_PTR CALLBACK ShutdownDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L if (countdown == 27 || countdown == 24 || countdown == 21 || countdown == 19 ||
countdown == 17 || countdown == 15 || countdown == 13 || countdown == 11 ||
countdown <= 10)
- Skin_PlaySound("AutoShutdown_Countdown");
+ SkinPlaySound("AutoShutdown_Countdown");
}
else KillTimer(hwndDlg, wParam); /* countdown finished */
PostMessage(hwndDlg, M_UPDATE_COUNTDOWN, 0, countdown);
@@ -496,7 +496,7 @@ void InitShutdownSvc(void) {
/* Shutdown Dialog */
hwndShutdownDlg = NULL;
- Skin_AddSound("AutoShutdown_Countdown", LPGENW("Alerts"), LPGENW("Automatic shutdown countdown"));
+ SkinAddNewSoundExW("AutoShutdown_Countdown", LPGENW("Alerts"), LPGENW("Automatic shutdown countdown"));
/* Events */
hEventOkToShutdown = CreateHookableEvent(ME_AUTOSHUTDOWN_OKTOSHUTDOWN);
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index 0cc29ece82..061060f306 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -127,7 +127,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) db_free(&dbvOldHash);
return 0;
}
- Skin_PlaySound("avatar_removed");
+ SkinPlaySound("avatar_removed");
// Is a flash avatar or avs could not load it
db_set_ws(hContact, MODULE_NAME, "AvatarHash", L"-");
@@ -142,7 +142,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) db_free(&dbvOldHash);
return 0;
}
- Skin_PlaySound("avatar_changed");
+ SkinPlaySound("avatar_changed");
db_set_ws(hContact, "AvatarHistory", "AvatarHash", avatar->hash);
wchar_t history_filename[MAX_PATH] = L"";
@@ -343,8 +343,8 @@ extern "C" __declspec(dllexport) int Load(void) Profile_GetPathW(MAX_PATH, profilePath);
- Skin_AddSound("avatar_changed", LPGENW("Avatar history"), LPGENW("Contact changed avatar"));
- Skin_AddSound("avatar_removed", LPGENW("Avatar history"), LPGENW("Contact removed avatar"));
+ SkinAddNewSoundExW("avatar_changed", LPGENW("Avatar history"), LPGENW("Contact changed avatar"));
+ SkinAddNewSoundExW("avatar_removed", LPGENW("Avatar history"), LPGENW("Contact removed avatar"));
hAvatarWindowsList = WindowList_Create();
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index 2630ff4e68..5c770678b0 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -215,7 +215,7 @@ INT_PTR CALLBACK OptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara SendMessage(hwndSlider, TBM_SETPOS, TRUE, Volume);
Preview = TRUE;
if (EnPreview)
- Skin_PlaySound("AlertMsg");
+ SkinPlaySound("AlertMsg");
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
break;
@@ -391,7 +391,7 @@ static LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR SendMessage(hwndOptSlider, TBM_SETPOS, TRUE, Volume);
Preview = TRUE;
if (EnPreview)
- Skin_PlaySound("AlertMsg");
+ SkinPlaySound("AlertMsg");
}
break;
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index 2b1b4ce00b..83b36d2630 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -247,7 +247,7 @@ bool isContactGoneFor(MCONTACT hContact, int days) CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, APF_NEWDATA);
- Skin_PlaySound("buddyExpectatorHide");
+ SkinPlaySound("buddyExpectatorHide");
}
return (daysSinceOnline >= days && (daysSinceMessage == -1 || daysSinceMessage >= days));
@@ -258,7 +258,7 @@ void ReturnNotify(MCONTACT hContact, wchar_t *message) if (db_get_b(hContact, "CList", "NotOnList", 0) == 1 || db_get_b(hContact, "CList", "Hidden", 0) == 1)
return;
- Skin_PlaySound("buddyExpectatorReturn");
+ SkinPlaySound("buddyExpectatorReturn");
if (options.iShowPopup > 0) {
// Display Popup
@@ -501,7 +501,7 @@ int SettingChanged(WPARAM hContact, LPARAM lParam) CallService(MS_POPUP_ADDPOPUPT, (WPARAM)&ppd, APF_NEWDATA);
- Skin_PlaySound("buddyExpectatorMissYou");
+ SkinPlaySound("buddyExpectatorMissYou");
}
}
@@ -549,7 +549,7 @@ void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD) if (proto && (db_get_b(hContact, proto, "ChatRoom", 0) == 0) && (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND) && isContactGoneFor(hContact, options.iAbsencePeriod2) && (db_get_b(hContact, MODULE_NAME, "StillAbsentNotified", 0) == 0))
{
db_set_b(hContact, MODULE_NAME, "StillAbsentNotified", 1);
- Skin_PlaySound("buddyExpectatorStillAbsent");
+ SkinPlaySound("buddyExpectatorStillAbsent");
wchar_t* message = TranslateT("has not returned after a long absence.");
time_t tmpTime;
@@ -593,10 +593,10 @@ int ModulesLoaded(WPARAM, LPARAM) HookEvent(ME_USERINFO_INITIALISE, UserinfoInit);
// add sounds support
- Skin_AddSound("buddyExpectatorReturn", LPGENW("BuddyExpectator"), LPGENW("Contact returned"));
- Skin_AddSound("buddyExpectatorStillAbsent", LPGENW("BuddyExpectator"), LPGENW("Contact still absent"));
- Skin_AddSound("buddyExpectatorMissYou", LPGENW("BuddyExpectator"), LPGENW("Miss you event"));
- Skin_AddSound("buddyExpectatorHide", LPGENW("BuddyExpectator"), LPGENW("Hide contact event"));
+ SkinAddNewSoundExW("buddyExpectatorReturn", LPGENW("BuddyExpectator"), LPGENW("Contact returned"));
+ SkinAddNewSoundExW("buddyExpectatorStillAbsent", LPGENW("BuddyExpectator"), LPGENW("Contact still absent"));
+ SkinAddNewSoundExW("buddyExpectatorMissYou", LPGENW("BuddyExpectator"), LPGENW("Miss you event"));
+ SkinAddNewSoundExW("buddyExpectatorHide", LPGENW("BuddyExpectator"), LPGENW("Hide contact event"));
timer_id = SetTimer(0, 0, 1000 * 60 * 60 * 4, TimerProc); // check every 4 hours
diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp index 6f1451a5bb..4fb45f049e 100644 --- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp +++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp @@ -122,8 +122,8 @@ int ModulesLoaded(WPARAM, LPARAM) ReadPopupOptions();
// Зарегим звук
- Skin_AddSound(SND_ChangeLayout, ModuleNameW, LPGENW("Changing Layout"));
- Skin_AddSound(SND_ChangeCase, ModuleNameW, LPGENW("Changing Case"));
+ SkinAddNewSoundEx(SND_ChangeLayout, ModuleName, LPGEN("Changing Layout"));
+ SkinAddNewSoundEx(SND_ChangeCase, ModuleName, LPGEN("Changing Case"));
// Хук на нажатие клавиши
kbHook_All = SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC)Keyboard_Hook, NULL, GetCurrentThreadId());
diff --git a/plugins/ChangeKeyboardLayout/src/stdafx.h b/plugins/ChangeKeyboardLayout/src/stdafx.h index b1a3bac5f5..6eb9e0fadf 100644 --- a/plugins/ChangeKeyboardLayout/src/stdafx.h +++ b/plugins/ChangeKeyboardLayout/src/stdafx.h @@ -26,8 +26,7 @@ #include "version.h"
#define MaxTextSize 64000
-#define ModuleName LPGEN("ChangeKeyboardLayout")
-#define ModuleNameW LPGENW("ChangeKeyboardLayout")
+#define ModuleName LPGEN("ChangeKeyboardLayout")
// History++ API
#define MS_HPP_EG_WINDOW "History++/ExtGrid/NewWindow"
diff --git a/plugins/ChangeKeyboardLayout/src/text_operations.cpp b/plugins/ChangeKeyboardLayout/src/text_operations.cpp index 7df6916a89..c8c44b1042 100644 --- a/plugins/ChangeKeyboardLayout/src/text_operations.cpp +++ b/plugins/ChangeKeyboardLayout/src/text_operations.cpp @@ -436,9 +436,9 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord) }
if (TextOperation == TOT_Layout)
- Skin_PlaySound(SND_ChangeLayout);
+ SkinPlaySound(SND_ChangeLayout);
else if (TextOperation == TOT_Case)
- Skin_PlaySound(SND_ChangeCase);
+ SkinPlaySound(SND_ChangeCase);
if (moOptions.CopyToClipboard)
CopyTextToClipboard(ptszMBox);
@@ -540,9 +540,9 @@ int ChangeLayout(HWND hTextWnd, BYTE TextOperation, BOOL CurrentWord) InvalidateRect(hTextWnd, NULL, FALSE);
if (TextOperation == TOT_Layout)
- Skin_PlaySound(SND_ChangeLayout);
+ SkinPlaySound(SND_ChangeLayout);
else if (TextOperation == TOT_Case)
- Skin_PlaySound(SND_ChangeCase);
+ SkinPlaySound(SND_ChangeCase);
}
return 0;
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index cca57b1975..30f6df1406 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -250,7 +250,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) }
if (PerContactSetting == NOTIFY_ALWAYS || (PopupOptPage.GetValue(IDC_POPUPOPTDLG_POPUPNOTIFY) && (g_PreviewOptPage || PerContactSetting == NOTIFY_ALMOST_ALWAYS || -1 == PcreCheck(sd.MirVer)))) {
ShowPopup(&sd);
- Skin_PlaySound(CLIENTCHANGED_SOUND);
+ SkinPlaySound(CLIENTCHANGED_SOUND);
}
}
@@ -322,8 +322,7 @@ int MirandaLoaded(WPARAM, LPARAM) HookEvent(ME_SYSTEM_MODULELOAD, ModuleLoad);
HookEvent(ME_SYSTEM_MODULEUNLOAD, ModuleLoad);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ContactSettingChanged);
-
- Skin_AddSound(CLIENTCHANGED_SOUND, nullptr, LPGENW("ClientChangeNotify: Client changed"));
+ SkinAddNewSoundEx(CLIENTCHANGED_SOUND, NULL, LPGEN("ClientChangeNotify: Client changed"));
if (bPopupExists) {
CreateServiceFunction(MS_CCN_TOGGLEPOPUPS, srvTogglePopups);
diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp index fe7a0d9aa1..9bec312628 100644 --- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp +++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp @@ -707,7 +707,7 @@ static unsigned __stdcall checkthread(void *) if (WAIT_OBJECT_0 == WaitForSingleObject(hExceptionsMutex, 100)) {
if (checkFilter(connExceptions, cur)) {
showMsg(cur->PName, cur->Pid, cur->strIntIp, cur->strExtIp, cur->intIntPort, cur->intExtPort, cur->state);
- Skin_PlaySound(PLUGINNAME_NEWSOUND);
+ SkinPlaySound(PLUGINNAME_NEWSOUND);
}
ReleaseMutex(hExceptionsMutex);
}
@@ -876,7 +876,7 @@ extern "C" int __declspec(dllexport) Load(void) CreateProtoServiceFunction(PLUGINNAME, PS_SETSTATUS, SetStatus);
CreateProtoServiceFunction(PLUGINNAME, PS_GETSTATUS, GetStatus);
- Skin_AddSound(PLUGINNAME_NEWSOUND, PLUGINNAMEW, LPGENW("New Connection Notification"));
+ SkinAddNewSoundEx(PLUGINNAME_NEWSOUND, PLUGINNAME, LPGEN("New Connection Notification"));
hOptInit = HookEvent(ME_OPT_INITIALISE, ConnectionNotifyOptInit);//register service to hook option call
assert(hOptInit);
hHookModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, modulesloaded);//hook event that all plugins are loaded
diff --git a/plugins/ConnectionNotify/src/stdafx.h b/plugins/ConnectionNotify/src/stdafx.h index f14056ff09..4e7f512ad0 100644 --- a/plugins/ConnectionNotify/src/stdafx.h +++ b/plugins/ConnectionNotify/src/stdafx.h @@ -26,7 +26,6 @@ #define MAX_SETTING_STR 512
#define PLUGINNAME "ConnectionNotify"
-#define PLUGINNAMEW L"ConnectionNotify"
#define MAX_LENGTH 512
#define STATUS_COUNT 9
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp index 5e3289a06a..23500aa6f3 100644 --- a/plugins/ContactsPlus/src/main.cpp +++ b/plugins/ContactsPlus/src/main.cpp @@ -70,7 +70,7 @@ static int HookDBEventAdded(WPARAM hContact, LPARAM hDbEvent) dbe.pBlob = (PBYTE)_alloca(dbe.cbBlob);
db_event_get(hDbEvent, &dbe);
//play received sound
- Skin_PlaySound("RecvContacts");
+ SkinPlaySound("RecvContacts");
{
//add event to the contact list
wchar_t caToolTip[128];
@@ -219,8 +219,8 @@ extern "C" __declspec(dllexport) int Load(void) CreateServiceFunction(MS_CONTACTS_RECEIVE, ServiceReceiveCommand);
//define event sounds
- Skin_AddSound("RecvContacts", LPGENW("Events"), LPGENW("Incoming Contacts"), L"contacts.wav");
- Skin_AddSound("SentContacts", LPGENW("Events"), LPGENW("Outgoing Contacts"), L"ocontacts.wav");
+ SkinAddNewSoundEx("RecvContacts", LPGEN("Events"), LPGEN("Incoming Contacts"), "contacts.wav");
+ SkinAddNewSoundEx("SentContacts", LPGEN("Events"), LPGEN("Outgoing Contacts"), "ocontacts.wav");
return 0;
}
diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp index 1016a386dc..cb2318aa17 100644 --- a/plugins/ContactsPlus/src/send.cpp +++ b/plugins/ContactsPlus/src/send.cpp @@ -431,7 +431,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara }
delete ackData; // all done, release structure
if (!wndData->uacklist.Count) {
- Skin_PlaySound("SentContacts");
+ SkinPlaySound("SentContacts");
KillTimer(hwndDlg, TIMERID_MSGSEND);
if (wndData->hError)
diff --git a/plugins/FTPFileYM/src/dialog.cpp b/plugins/FTPFileYM/src/dialog.cpp index 9fbc7b8b57..0735bedc22 100644 --- a/plugins/FTPFileYM/src/dialog.cpp +++ b/plugins/FTPFileYM/src/dialog.cpp @@ -395,7 +395,7 @@ INT_PTR CALLBACK UploadDialog::UploadDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar result = Utils::msgBox(TranslateT("Do you really want to cancel all running jobs?"), MB_YESNO | MB_ICONQUESTION);
if (result == IDYES) {
- Skin_PlaySound(SOUND_CANCEL);
+ SkinPlaySound(SOUND_CANCEL);
size_t count = uDlg->m_tabs.size();
for (UINT i = 0; i < count; i++)
uDlg->m_tabs[0]->m_job->closeAllTabs();
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp index ae85f49aa6..91de6e0066 100644 --- a/plugins/FTPFileYM/src/ftpfile.cpp +++ b/plugins/FTPFileYM/src/ftpfile.cpp @@ -353,8 +353,8 @@ int ModulesLoaded(WPARAM, LPARAM) InitMenuItems();
InitTabsrmmButton();
- Skin_AddSound(SOUND_UPCOMPLETE, LPGENW("FTP File"), LPGENW("File upload complete"));
- Skin_AddSound(SOUND_CANCEL, LPGENW("FTP File"), LPGENW("Upload canceled"));
+ SkinAddNewSoundEx(SOUND_UPCOMPLETE, LPGEN("FTP File"), LPGEN("File upload complete"));
+ SkinAddNewSoundEx(SOUND_CANCEL, LPGEN("FTP File"), LPGEN("Upload canceled"));
curl_global_init(CURL_GLOBAL_ALL);
diff --git a/plugins/FTPFileYM/src/job_upload.cpp b/plugins/FTPFileYM/src/job_upload.cpp index a519e897c4..e80e5ed9f5 100644 --- a/plugins/FTPFileYM/src/job_upload.cpp +++ b/plugins/FTPFileYM/src/job_upload.cpp @@ -339,7 +339,7 @@ void UploadJob::upload() }
DBEntry::add(this);
- Skin_PlaySound(SOUND_UPCOMPLETE);
+ SkinPlaySound(SOUND_UPCOMPLETE);
}
setStatus(STATUS_COMPLETED);
diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp index dfb4a1c644..ac13c114d1 100644 --- a/plugins/FileAsMessage/src/dialog.cpp +++ b/plugins/FileAsMessage/src/dialog.cpp @@ -450,7 +450,7 @@ void FILEECHO::incomeRequest(char *param) setState(STATE_PRERECV);
inSend = FALSE;
- Skin_PlaySound("RecvFile");
+ SkinPlaySound("RecvFile");
int AutoMin = db_get_b(NULL, "SRFile", "AutoMin", 0);
if (db_get_b(NULL, "SRFile", "AutoAccept", 0) && !db_get_b(hContact, "CList", "NotOnList", 0))
{
@@ -548,7 +548,7 @@ void FILEECHO::onRecvTimer() PostMessage(hDlg, WM_CLOSE, 0, 0);
pcli->pfnRemoveEvent(hContact, 0);
}
- Skin_PlaySound("FileDone");
+ SkinPlaySound("FileDone");
destroyTransfer();
buffer[0] = 'x'; buffer[1] = 0;
}
@@ -719,7 +719,7 @@ void FILEECHO::cmdDACK(char *param) char *msg = Translate("Sent successfully");
SetDlgItemText(hDlg, IDC_STATUS, msg);
- Skin_PlaySound("FileDone");
+ SkinPlaySound("FileDone");
destroyTransfer();
MakePopupMsg(hDlg, hContact, msg);
setState(STATE_FINISHED);
diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp index d2912d2082..dabac93804 100644 --- a/plugins/GmailNotifier/src/main.cpp +++ b/plugins/GmailNotifier/src/main.cpp @@ -91,7 +91,7 @@ extern "C" int __declspec(dllexport) Load() mir_getLP(&pluginInfoEx);
pcli = Clist_GetInterface();
- Skin_AddSound("Gmail", LPGENW("Other"), LPGENW("Gmail: New thread(s)"));
+ SkinAddNewSoundEx("Gmail", LPGEN("Other"), LPGEN("Gmail: New thread(s)"));
HookEvent(ME_CLIST_DOUBLECLICKED, OpenBrowser);
PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
diff --git a/plugins/GmailNotifier/src/notify.cpp b/plugins/GmailNotifier/src/notify.cpp index 7e90749477..eb99a41ec4 100644 --- a/plugins/GmailNotifier/src/notify.cpp +++ b/plugins/GmailNotifier/src/notify.cpp @@ -120,7 +120,7 @@ void NotifyUser(Account *curAcc) PUAddPopup(&ppd);
}
if (newMails > 0)
- Skin_PlaySound("Gmail");
+ SkinPlaySound("Gmail");
}
curAcc->oldResults_num = curAcc->results_num;
DeleteResults(curAcc->results.next);
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index 6e55f2a8e3..90a1d3fe59 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -790,7 +790,7 @@ void checkthread(void*) log(L"checkthread: filters checked - positive");
///TODO eliminate popups with blank fields
showMsg(msgFrom, msgSubject, noteID, strLink);
- Skin_PlaySound("LotusNotify");
+ SkinPlaySound("LotusNotify");
}
else {
log(L"checkthread: filters checked - negative");
@@ -1728,7 +1728,7 @@ extern "C" int __declspec(dllexport) Load(void) LoadSettings(); //read from db to variables
- Skin_AddSound("LotusNotify", LPGENW("Lotus Notify"), LPGENW("New Lotus document detected"));
+ SkinAddNewSoundExW("LotusNotify", LPGENW("Lotus Notify"), LPGENW("New Lotus document detected"));
hOptInit = HookEvent(ME_OPT_INITIALISE, LotusNotifyOptInit); //register service to hook option call
assert(hOptInit);
diff --git a/plugins/MirLua/src/m_sounds.cpp b/plugins/MirLua/src/m_sounds.cpp index b7e86b4c91..ea7c2a5e6a 100644 --- a/plugins/MirLua/src/m_sounds.cpp +++ b/plugins/MirLua/src/m_sounds.cpp @@ -7,7 +7,16 @@ static int sounds_AddSound(lua_State *L) ptrW section(mir_utf8decodeW(luaL_optstring(L, 3, MODULE)));
ptrW filePath(mir_utf8decodeW(lua_tostring(L, 4)));
- int res = Skin_AddSound(name, section, description, filePath, CMLuaScript::GetScriptIdFromEnviroment(L));
+ SKINSOUNDDESCEX ssd = { sizeof(SKINSOUNDDESCEX) };
+ ssd.pszName = name;
+ ssd.dwFlags = SSDF_UNICODE;
+ ssd.pwszDescription = description;
+ ssd.pwszSection = section;
+ ssd.pwszDefaultFile = filePath;
+
+ int hScriptLangpack = CMLuaScript::GetScriptIdFromEnviroment(L);
+
+ INT_PTR res = CallService("Skin/Sounds/AddNew", hScriptLangpack, (LPARAM)&ssd);
lua_pushboolean(L, res == 0);
return 1;
@@ -17,7 +26,7 @@ static int sounds_PlaySound(lua_State *L) {
const char *name = luaL_checkstring(L, 1);
- INT_PTR res = Skin_PlaySound(name);
+ INT_PTR res = SkinPlaySound(name);
lua_pushboolean(L, res == 0);
return 1;
@@ -27,7 +36,7 @@ static int sounds_PlayFile(lua_State *L) {
ptrW filePath(mir_utf8decodeW(luaL_checkstring(L, 1)));
- INT_PTR res = Skin_PlaySoundFile(filePath);
+ INT_PTR res = SkinPlaySoundFile(filePath);
lua_pushboolean(L, res == 0);
return 1;
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index efe43115c4..f1e0e4794c 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -687,7 +687,7 @@ int MirandaLoaded(WPARAM, LPARAM) // we have to read the status message from contacts too... err
CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetContactStatMsg);
- Skin_AddSound(AWAYSYS_STATUSMSGREQUEST_SOUND, nullptr, LPGENW("NewAwaySys: Incoming status message request"));
+ SkinAddNewSoundEx(AWAYSYS_STATUSMSGREQUEST_SOUND, NULL, LPGEN("NewAwaySys: Incoming status message request"));
if (ServiceExists(MS_VARS_REGISTERTOKEN)) {
CreateServiceFunction(MS_AWAYSYS_FREEVARMEM, srvFreeVarMem);
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index 6c7d5e9ee5..8d5a27e7b1 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -35,13 +35,13 @@ void PreviewSound(HWND hList) ListView_GetItemText(hList, lvi.iItem, 1, buff, _countof(buff));
if (!mir_wstrcmp(buff, TranslateW(DEFAULT_SOUND))) {
if (hlpStatus < ID_STATUS_MIN)
- Skin_PlaySound(StatusListEx[hlpStatus].lpzSkinSoundName);
+ SkinPlaySound(StatusListEx[hlpStatus].lpzSkinSoundName);
else
- Skin_PlaySound(StatusList[Index(hlpStatus)].lpzSkinSoundName);
+ SkinPlaySound(StatusList[Index(hlpStatus)].lpzSkinSoundName);
}
else {
PathToAbsoluteW(buff, stzSoundPath);
- Skin_PlaySoundFile(stzSoundPath);
+ SkinPlaySoundFile(stzSoundPath);
}
}
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index fa54d48e23..aca8e1d4fd 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -334,13 +334,13 @@ void PlayChangeSound(MCONTACT hContact, const char *name) //Now make path to IndSound absolute, as it isn't registered
wchar_t stzSoundPath[MAX_PATH];
PathToAbsoluteW(stzSoundFile, stzSoundPath);
- Skin_PlaySoundFile(stzSoundPath);
+ SkinPlaySoundFile(stzSoundPath);
return;
}
}
if (db_get_b(0, "SkinSoundsOff", name, 0) == 0)
- Skin_PlaySound(name);
+ SkinPlaySound(name);
}
int ContactStatusChanged(MCONTACT hContact, WORD oldStatus, WORD newStatus)
@@ -1104,10 +1104,10 @@ void InitIcolib() void InitSound()
{
for (int i = ID_STATUS_MIN; i <= ID_STATUS_MAX; i++)
- Skin_AddSound(StatusList[Index(i)].lpzSkinSoundName, LPGENW("Status Notify"), StatusList[Index(i)].lpzSkinSoundDesc);
+ SkinAddNewSoundExW(StatusList[Index(i)].lpzSkinSoundName, LPGENW("Status Notify"), StatusList[Index(i)].lpzSkinSoundDesc);
for (int i = 0; i <= ID_STATUSEX_MAX; i++)
- Skin_AddSound(StatusListEx[i].lpzSkinSoundName, LPGENW("Status Notify"), StatusListEx[i].lpzSkinSoundDesc);
+ SkinAddNewSoundExW(StatusListEx[i].lpzSkinSoundName, LPGENW("Status Notify"), StatusListEx[i].lpzSkinSoundDesc);
}
int InitTopToolbar(WPARAM, LPARAM)
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp index e006e4f13b..8341330d1a 100644 --- a/plugins/NotesAndReminders/src/main.cpp +++ b/plugins/NotesAndReminders/src/main.cpp @@ -150,9 +150,9 @@ static void InitServices() {
// register sounds
- Skin_AddSound("AlertReminder", LPGENW("Alerts"), LPGENW("Reminder triggered"));
- Skin_AddSound("AlertReminder2", LPGENW("Alerts"), LPGENW("Reminder triggered (Alternative 1)"));
- Skin_AddSound("AlertReminder3", LPGENW("Alerts"), LPGENW("Reminder triggered (Alternative 2)"));
+ SkinAddNewSoundEx("AlertReminder", LPGEN("Alerts"), LPGEN("Reminder triggered"));
+ SkinAddNewSoundEx("AlertReminder2", LPGEN("Alerts"), LPGEN("Reminder triggered (Alternative 1)"));
+ SkinAddNewSoundEx("AlertReminder3", LPGEN("Alerts"), LPGEN("Reminder triggered (Alternative 2)"));
// register menu command services
diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp index 3bb2361b9a..f999000d78 100644 --- a/plugins/NotesAndReminders/src/reminders.cpp +++ b/plugins/NotesAndReminders/src/reminders.cpp @@ -458,10 +458,10 @@ void GetTriggerTimeString(const ULARGE_INTEGER *When, char *s, UINT strSize, BOO else mir_snprintf(s, strSize, "%d-%02d-%02d %02d:%02d", tm.wYear, tm.wMonth, tm.wDay, tm.wHour, tm.wMinute);
}
-static void Skin_PlaySoundPoly(LPCSTR pszSoundName)
+static void SkinPlaySoundPoly(LPCSTR pszSoundName)
{
if (g_UseDefaultPlaySound) {
- Skin_PlaySound(pszSoundName);
+ SkinPlaySound(pszSoundName);
return;
}
@@ -501,10 +501,10 @@ static void UpdateReminderEvent(REMINDERDATA *pReminder, UINT nElapsedSeconds, B if (!(*pHasPlayedSound & dwSoundMask)) {
switch (pReminder->SoundSel) {
- case 1: Skin_PlaySoundPoly("AlertReminder2"); break;
- case 2: Skin_PlaySoundPoly("AlertReminder3"); break;
+ case 1: SkinPlaySoundPoly("AlertReminder2"); break;
+ case 2: SkinPlaySoundPoly("AlertReminder3"); break;
default:
- Skin_PlaySoundPoly("AlertReminder");
+ SkinPlaySoundPoly("AlertReminder");
}
*pHasPlayedSound |= dwSoundMask;
@@ -546,10 +546,10 @@ static void FireReminder(REMINDERDATA *pReminder, BOOL *pHasPlayedSound) if (!(*pHasPlayedSound & dwSoundMask)) {
switch (pReminder->SoundSel) {
- case 1: Skin_PlaySoundPoly("AlertReminder2"); break;
- case 2: Skin_PlaySoundPoly("AlertReminder3"); break;
+ case 1: SkinPlaySoundPoly("AlertReminder2"); break;
+ case 2: SkinPlaySoundPoly("AlertReminder3"); break;
default:
- Skin_PlaySoundPoly("AlertReminder");
+ SkinPlaySoundPoly("AlertReminder");
}
*pHasPlayedSound |= dwSoundMask;
@@ -1825,9 +1825,9 @@ static INT_PTR CALLBACK DlgProcNewReminder(HWND Dialog, UINT Message, WPARAM wPa int n = SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_GETCURSEL, 0, 0);
n = (int)SendDlgItemMessage(Dialog, IDC_COMBO_SOUND, CB_GETITEMDATA, n, 0);
switch (n) {
- case 0: Skin_PlaySound("AlertReminder"); break;
- case 1: Skin_PlaySound("AlertReminder2"); break;
- case 2: Skin_PlaySound("AlertReminder3"); break;
+ case 0: SkinPlaySound("AlertReminder"); break;
+ case 1: SkinPlaySound("AlertReminder2"); break;
+ case 2: SkinPlaySound("AlertReminder3"); break;
}
}
return TRUE;
diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp index 598837dfc3..3e72bf9f3d 100644 --- a/plugins/NotifyAnything/src/main.cpp +++ b/plugins/NotifyAnything/src/main.cpp @@ -142,7 +142,15 @@ void registerSound(const std::wstring &name) std::wstring id = L"NotifyAnything_" + name;
std::wstring desc = L"NotifyAnything: " + name;
std::wstring file = name + L".wav";
- Skin_AddSound(_T2A(id.c_str()), LPGENW("Notify Anything"), desc.c_str(), file.c_str());
+
+ SKINSOUNDDESCEX ssd = { 0 };
+ ssd.cbSize = sizeof(ssd);
+ ssd.dwFlags = SSDF_UNICODE;
+ ssd.pszName = _T2A(id.c_str());
+ ssd.pwszSection = LPGENW("Notify Anything");
+ ssd.pwszDescription = desc.c_str();
+ ssd.pwszDefaultFile = file.c_str();
+ Skin_AddSound(&ssd);
}
HICON getIcon(const std::wstring &name)
@@ -815,7 +823,7 @@ void processMessage(std::wstring buf) Beep(650, 50);
else {
std::wstring sname = L"NotifyAnything_" + msg.sound;
- Skin_PlaySound(_T2A(sname.c_str()));
+ SkinPlaySound(_T2A(sname.c_str()));
}
}
}
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index 5c90b286ae..a956df53bd 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -139,7 +139,7 @@ int NudgeReceived(WPARAM hContact, LPARAM lParam) if (p.autoResend)
mir_forkthread(AutoResendNudge, (void*)hContact);
- Skin_PlaySound(p.NudgeSoundname);
+ SkinPlaySound(p.NudgeSoundname);
}
}
@@ -182,7 +182,7 @@ int NudgeReceived(WPARAM hContact, LPARAM lParam) if (DefaultNudge.autoResend)
mir_forkthread(AutoResendNudge, (void*)hContact);
- Skin_PlaySound(DefaultNudge.NudgeSoundname);
+ SkinPlaySound(DefaultNudge.NudgeSoundname);
}
}
@@ -210,7 +210,7 @@ void LoadProtocols(void) //Load the default nudge
mir_snprintf(DefaultNudge.ProtocolName, "Default");
mir_snprintf(DefaultNudge.NudgeSoundname, "Nudge : Default");
- Skin_AddSound(DefaultNudge.NudgeSoundname, LPGENW("Nudge"), LPGENW("Default Nudge"));
+ SkinAddNewSoundEx(DefaultNudge.NudgeSoundname, LPGEN("Nudge"), LPGEN("Default Nudge"));
DefaultNudge.Load();
GlobalNudge.Load();
@@ -411,7 +411,7 @@ int Preview() for (int i = 0; i < arNudges.getCount(); i++) {
CNudgeElement &p = arNudges[i];
if (p.enabled) {
- Skin_PlaySound(p.NudgeSoundname);
+ SkinPlaySound(p.NudgeSoundname);
if (p.showPopup)
Nudge_ShowPopup(&p, hContact, p.recText);
if (p.openContactList)
@@ -427,7 +427,7 @@ int Preview() }
else {
if (DefaultNudge.enabled) {
- Skin_PlaySound(DefaultNudge.NudgeSoundname);
+ SkinPlaySound(DefaultNudge.NudgeSoundname);
if (DefaultNudge.showPopup)
Nudge_ShowPopup(&DefaultNudge, hContact, DefaultNudge.recText);
if (DefaultNudge.openContactList)
@@ -525,7 +525,7 @@ void Nudge_AddAccount(PROTOACCOUNT *proto) wchar_t soundDesc[MAXMODULELABELLENGTH + 10];
mir_snwprintf(soundDesc, LPGENW("Nudge for %s"), proto->tszAccountName);
- Skin_AddSound(p->NudgeSoundname, LPGENW("Nudge"), soundDesc);
+ SkinAddNewSoundExW(p->NudgeSoundname, LPGENW("Nudge"), soundDesc);
arNudges.insert(p);
}
diff --git a/plugins/Ping/src/ping.cpp b/plugins/Ping/src/ping.cpp index 7dd24e6a26..7688afb496 100644 --- a/plugins/Ping/src/ping.cpp +++ b/plugins/Ping/src/ping.cpp @@ -138,8 +138,8 @@ extern "C" __declspec(dllexport) int Load(void) LoadOptions();
- Skin_AddSound("PingTimeout", LPGENW("Ping"), LPGENW("Timeout"));
- Skin_AddSound("PingReply", LPGENW("Ping"), LPGENW("Reply"));
+ SkinAddNewSoundEx("PingTimeout", LPGEN("Ping"), LPGEN("Timeout"));
+ SkinAddNewSoundEx("PingReply", LPGEN("Ping"), LPGEN("Reply"));
HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index 06c5b8963e..c3d215329d 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -218,8 +218,8 @@ void __cdecl sttCheckStatusThreadProc(void*) }
}
- if (timeout) Skin_PlaySound("PingTimeout");
- if (reply) Skin_PlaySound("PingReply");
+ if (timeout) SkinPlaySound("PingTimeout");
+ if (reply) SkinPlaySound("PingReply");
if (!get_list_changed()) {
upCount = count;
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index 8aada80df1..6d54f2e342 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -87,7 +87,7 @@ static void ApplyUpdates(void *param) // interrupt update as we require all components to be updated
Netlib_CloseHandle(nlc);
PostMessage(hDlg, UM_ERROR, 0, 0);
- Skin_PlaySound("updatefailed");
+ SkinPlaySound("updatefailed");
return;
}
SetStringText(hwndList, i, TranslateT("Succeeded."));
@@ -121,7 +121,7 @@ static void ApplyUpdates(void *param) }
}
}
- Skin_PlaySound("updatecompleted");
+ SkinPlaySound("updatecompleted");
#if MIRANDA_VER < 0x0A00
// 4) Change title of clist
@@ -429,7 +429,7 @@ static void DlgUpdateSilent(void *param) if (!DownloadFile(pFileUrl, nlc)) {
// interrupt update as we require all components to be updated
Netlib_CloseHandle(nlc);
- Skin_PlaySound("updatefailed");
+ SkinPlaySound("updatefailed");
delete &UpdateFiles;
return;
}
@@ -473,7 +473,7 @@ static void DlgUpdateSilent(void *param) }
}
delete &UpdateFiles;
- Skin_PlaySound("updatecompleted");
+ SkinPlaySound("updatecompleted");
#if MIRANDA_VER < 0x0A00
// 4) Change title of clist
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index 49507acd15..9c09f5a6f9 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -126,8 +126,8 @@ extern "C" __declspec(dllexport) int Load(void) InitEvents();
// add sounds
- Skin_AddSound("updatecompleted", LPGENW("Plugin Updater"), LPGENW("Update completed"));
- Skin_AddSound("updatefailed", LPGENW("Plugin Updater"), LPGENW("Update failed"));
+ SkinAddNewSoundEx("updatecompleted", LPGEN("Plugin Updater"), LPGEN("Update completed"));
+ SkinAddNewSoundEx("updatefailed", LPGEN("Plugin Updater"), LPGEN("Update failed"));
#if MIRANDA_VER >= 0x0A00
// Upgrade old settings
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp index 7554c723ef..c136c5c20c 100644 --- a/plugins/PluginUpdater/src/Utils.cpp +++ b/plugins/PluginUpdater/src/Utils.cpp @@ -163,14 +163,14 @@ bool ParseHashes(const wchar_t *ptszUrl, ptrW &baseUrl, SERVLIST &arHashes) if (!ret) {
Netlib_LogfW(hNetlibUser,L"Downloading list of available updates from %s failed",baseUrl);
ShowPopup(TranslateT("Plugin Updater"), TranslateT("An error occurred while checking for new updates."), POPUP_TYPE_ERROR);
- Skin_PlaySound("updatefailed");
+ SkinPlaySound("updatefailed");
return false;
}
if(!unzip(pFileUrl.tszDiskPath, g_tszTempPath, NULL,true)) {
Netlib_LogfW(hNetlibUser,L"Unzipping list of available updates from %s failed",baseUrl);
ShowPopup(TranslateT("Plugin Updater"), TranslateT("An error occurred while checking for new updates."), POPUP_TYPE_ERROR);
- Skin_PlaySound("updatefailed");
+ SkinPlaySound("updatefailed");
return false;
}
diff --git a/plugins/SMS/src/SMSConstans.h b/plugins/SMS/src/SMSConstans.h index 9a48672f9f..b212510210 100644 --- a/plugins/SMS/src/SMSConstans.h +++ b/plugins/SMS/src/SMSConstans.h @@ -2,7 +2,6 @@ #define AFX_SMS_CONSTANS_H__F58D13FF_F6F2_476C_B8F0_7B9E9357CF48__INCLUDED_
#define PROTOCOL_NAMEA "SMSPlugin"
-#define PROTOCOL_NAMEW L"SMSPlugin"
#define PROTOCOL_NAME_LEN (sizeof(PROTOCOL_NAMEA)-1)
#define PROTOCOL_NAME_SIZE sizeof(PROTOCOL_NAMEA)
#define PROTOCOL_DISPLAY_NAME_ORIG "SMS"
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp index b224343cd0..a88d44f33e 100644 --- a/plugins/SMS/src/SMS_svc.cpp +++ b/plugins/SMS/src/SMS_svc.cpp @@ -45,8 +45,8 @@ int LoadModules(void) mi.flags = CMIF_UNICODE;
ssSMSSettings.hContactMenuItems[0] = Menu_AddContactMenuItem(&mi);
- Skin_AddSound("RecvSMSMsg", PROTOCOL_NAMEW, LPGENW("Incoming SMS Message"));
- Skin_AddSound("RecvSMSConfirmation", PROTOCOL_NAMEW, LPGENW("Incoming SMS Confirmation"));
+ SkinAddNewSoundEx("RecvSMSMsg", PROTOCOL_NAMEA, LPGEN("Incoming SMS Message"));
+ SkinAddNewSoundEx("RecvSMSConfirmation", PROTOCOL_NAMEA, LPGEN("Incoming SMS Confirmation"));
RefreshAccountList(NULL, NULL);
diff --git a/plugins/SMS/src/receive.cpp b/plugins/SMS/src/receive.cpp index c576e2cdd3..28ad76e8c0 100644 --- a/plugins/SMS/src/receive.cpp +++ b/plugins/SMS/src/receive.cpp @@ -75,7 +75,7 @@ int handleAckSMS(WPARAM wParam, LPARAM lParam) if (hContact == NULL) {
if (RecvSMSWindowAdd(NULL, ICQEVENTTYPE_SMS, tszPhone, dwPhoneSize, (LPSTR)dbei.pBlob, dbei.cbBlob)) {
db_event_markRead(hContact, hResult);
- Skin_PlaySound("RecvSMSMsg");
+ SkinPlaySound("RecvSMSMsg");
}
}
}
@@ -224,7 +224,7 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent) if ((dbei.flags & DBEF_SENT) == 0)
if (dbei.eventType == ICQEVENTTYPE_SMS) {
if (dbei.cbBlob > MIN_SMS_DBEVENT_LEN) {
- Skin_PlaySound("RecvSMSMsg");
+ SkinPlaySound("RecvSMSMsg");
if (DB_SMS_GetByte(NULL, "AutoPopup", 0)) {
if (RecvSMSWindowAdd(hContact, ICQEVENTTYPE_SMS, NULL, 0, (LPSTR)dbei.pBlob, dbei.cbBlob))
db_event_markRead(hContact, hDbEvent);
@@ -245,7 +245,7 @@ int handleNewMessage(WPARAM hContact, LPARAM hDbEvent) }
}
else if (dbei.eventType == ICQEVENTTYPE_SMSCONFIRMATION) {
- Skin_PlaySound("RecvSMSConfirmation");
+ SkinPlaySound("RecvSMSConfirmation");
if (DB_SMS_GetByte(NULL, "AutoPopup", 0)) {
if (RecvSMSWindowAdd(hContact, ICQEVENTTYPE_SMSCONFIRMATION, NULL, 0, (LPSTR)dbei.pBlob, dbei.cbBlob))
db_event_delete(hContact, hDbEvent);
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index 97ac6a7adf..7a174bf528 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -161,7 +161,7 @@ static int ackevent(WPARAM, LPARAM lParam) }
else if (hwndSender != nullptr) {
SendMessage(hwndSender, DM_STOPMESSAGESENDING, 0, 0);
- Skin_PlaySound("SendMsg");
+ SkinPlaySound("SendMsg");
}
return 0;
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index cd49dd8bdd..c642e0e422 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -1435,8 +1435,8 @@ INT_PTR CSrmmWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) m_lastMessage = dbei.timestamp;
UpdateStatusBar();
if (GetForegroundWindow() == m_hwndParent && m_pParent->hwndActive == m_hwnd)
- Skin_PlaySound("RecvMsgActive");
- else Skin_PlaySound("RecvMsgInactive");
+ SkinPlaySound("RecvMsgActive");
+ else SkinPlaySound("RecvMsgInactive");
if ((g_dat.flags2 & SMF2_SWITCHTOACTIVE) && (IsIconic(m_hwndParent) || GetActiveWindow() != m_hwndParent) && IsWindowVisible(m_hwndParent))
SendMessage(m_hwndParent, CM_ACTIVATECHILD, 0, (LPARAM)m_hwnd);
if (IsAutoPopup(m_hContact))
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 26ee901ae6..d7a2e05b74 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -106,7 +106,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM lParam) /* does a window for the contact exist? */
if (hwnd == nullptr) {
/* new message */
- Skin_PlaySound("AlertMsg");
+ SkinPlaySound("AlertMsg");
if (IsAutoPopup(hContact)) {
(new CSrmmWindow(hContact, true))->Show();
return 0;
@@ -188,7 +188,7 @@ static int TypingMessage(WPARAM hContact, LPARAM lParam) hContact = db_mc_tryMeta(hContact);
- Skin_PlaySound((lParam) ? "TNStart" : "TNStop");
+ SkinPlaySound((lParam) ? "TNStart" : "TNStop");
HWND hwnd = Srmm_FindWindow(hContact);
if (hwnd)
@@ -647,12 +647,12 @@ int OnLoadModule(void) CreateServiceFunction(MS_MSG_SENDMESSAGEW, SendMessageCommandW);
CreateServiceFunction(MS_MSG_TYPINGMESSAGE, TypingMessageCommand);
- 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("TNStart", LPGENW("Instant messages"), LPGENW("Contact started typing"));
- Skin_AddSound("TNStop", LPGENW("Instant messages"), LPGENW("Contact stopped typing"));
+ 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("TNStart", LPGEN("Instant messages"), LPGEN("Contact started typing"));
+ SkinAddNewSoundEx("TNStop", LPGEN("Instant messages"), LPGEN("Contact stopped typing"));
hDragCursor = LoadCursor(g_hInst, MAKEINTRESOURCE(IDC_DRAGCURSOR));
diff --git a/plugins/SecureIM/src/crypt_popups.cpp b/plugins/SecureIM/src/crypt_popups.cpp index fbced3dd22..3bd02356dc 100644 --- a/plugins/SecureIM/src/crypt_popups.cpp +++ b/plugins/SecureIM/src/crypt_popups.cpp @@ -92,12 +92,12 @@ void showPopupSM(MCONTACT hContact) {
if (db_get_b(0, MODULENAME, "ss", 0))
showPopup(sim009, hContact, g_hPOP[POP_PU_MSS], 2);
- Skin_PlaySound("OutgoingSecureMessage");
+ SkinPlaySound("OutgoingSecureMessage");
}
void showPopupRM(MCONTACT hContact)
{
if (db_get_b(0, MODULENAME, "sr", 0))
showPopup(sim010, hContact, g_hPOP[POP_PU_MSR], 2);
- Skin_PlaySound("IncomingSecureMessage");
+ SkinPlaySound("IncomingSecureMessage");
}
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index 22a5ef4749..3e80b7db39 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -211,8 +211,8 @@ static int onModulesLoaded(WPARAM, LPARAM) loadContactList();
// add new skin sound
- Skin_AddSound("IncomingSecureMessage", LPGENW("SecureIM"), LPGENW("Incoming Secure Message"), L"Sounds\\iSecureMessage.wav");
- Skin_AddSound("OutgoingSecureMessage", LPGENW("SecureIM"), LPGENW("Outgoing Secure Message"), L"Sounds\\oSecureMessage.wav");
+ SkinAddNewSoundEx("IncomingSecureMessage", LPGEN("SecureIM"), LPGEN("Incoming Secure Message"), "Sounds\\iSecureMessage.wav");
+ SkinAddNewSoundEx("OutgoingSecureMessage", LPGEN("SecureIM"), LPGEN("Outgoing Secure Message"), "Sounds\\oSecureMessage.wav");
// init extra icons
for (int i = 0; i < _countof(g_IEC); i++)
diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp index 28a959d7d4..b409a71ccb 100644 --- a/plugins/SeenPlugin/src/history.cpp +++ b/plugins/SeenPlugin/src/history.cpp @@ -297,7 +297,7 @@ void ShowHistory(MCONTACT hContact, BYTE isAlert) }
if (isAlert)
- Skin_PlaySound("LastSeenTrackedStatusChange");
+ SkinPlaySound("LastSeenTrackedStatusChange");
}
void InitHistoryDialog(void)
diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp index ac6672a246..2261c98a46 100644 --- a/plugins/SeenPlugin/src/main.cpp +++ b/plugins/SeenPlugin/src/main.cpp @@ -104,10 +104,10 @@ extern "C" __declspec(dllexport) int Load(void) LoadWatchedProtos();
- Skin_AddSound("LastSeenTrackedStatusChange", LPGENW("LastSeen"), LPGENW("User status change"));
- Skin_AddSound("LastSeenTrackedStatusOnline", LPGENW("LastSeen"), LPGENW("Changed to Online"));
- Skin_AddSound("LastSeenTrackedStatusOffline", LPGENW("LastSeen"), LPGENW("User Logged Off"));
- Skin_AddSound("LastSeenTrackedStatusFromOffline", LPGENW("LastSeen"), LPGENW("User Logged In"));
+ SkinAddNewSoundExW("LastSeenTrackedStatusChange", LPGENW("LastSeen"), LPGENW("User status change"));
+ SkinAddNewSoundExW("LastSeenTrackedStatusOnline", LPGENW("LastSeen"), LPGENW("Changed to Online"));
+ SkinAddNewSoundExW("LastSeenTrackedStatusOffline", LPGENW("LastSeen"), LPGENW("User Logged Off"));
+ SkinAddNewSoundExW("LastSeenTrackedStatusFromOffline", LPGENW("LastSeen"), LPGENW("User Logged In"));
return 0;
}
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index e9e043d824..cff0c704de 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -510,7 +510,7 @@ void myPlaySound(MCONTACT hcontact, WORD newStatus, WORD oldStatus) else if (oldStatus == ID_STATUS_OFFLINE) soundname = "LastSeenTrackedStatusFromOffline";
else soundname = "LastSeenTrackedStatusChange";
if (soundname != NULL)
- Skin_PlaySound(soundname);
+ SkinPlaySound(soundname);
}
// will add hContact to queue and will return position;
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp index 6ec66563aa..194e8ac4a0 100644 --- a/plugins/SendScreenshotPlus/src/CSend.cpp +++ b/plugins/SendScreenshotPlus/src/CSend.cpp @@ -418,17 +418,17 @@ void CSend::Exit(unsigned int Result) bool err = true; switch (Result) { case CSEND_DIALOG: - Skin_PlaySound("FileDone"); + SkinPlaySound("FileDone"); DialogBoxParam(g_hSendSS, MAKEINTRESOURCE(IDD_UResultForm), 0, ResultDialogProc, (LPARAM)this); err = false; break; case ACKRESULT_SUCCESS: case GC_RESULT_SUCCESS: - Skin_PlaySound("FileDone"); + SkinPlaySound("FileDone"); err = false; break; case ACKRESULT_DENIED: - Skin_PlaySound("FileDenied"); + SkinPlaySound("FileDenied"); Error(L"%s (%i):\nFile transfer denied.", TranslateW(m_pszSendTyp), Result); MsgBoxService(NULL, (LPARAM)&m_box); err = false; @@ -447,7 +447,7 @@ void CSend::Exit(unsigned int Result) break; } if (err) { - Skin_PlaySound("FileFailed"); + SkinPlaySound("FileFailed"); if (m_ErrorMsg) MsgBoxService(NULL, (LPARAM)&m_box); else MsgErr(NULL, LPGENW("An unknown error has occurred.")); } diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp index 864745498f..b27e605d2a 100644 --- a/plugins/TabSRMM/src/chat_tools.cpp +++ b/plugins/TabSRMM/src/chat_tools.cpp @@ -214,11 +214,11 @@ void DoFlashAndSoundWorker(FLASH_PARAMS *p) p->bInactive = dat->m_pContainer->m_hwnd != GetForegroundWindow();
p->bActiveTab = (dat->m_pContainer->m_hwndActive == si->pDlg->GetHwnd());
if (p->sound && dat->MustPlaySound())
- Skin_PlaySound(p->sound);
+ SkinPlaySound(p->sound);
}
}
else if (p->sound)
- Skin_PlaySound(p->sound);
+ SkinPlaySound(p->sound);
if (dat) {
HWND hwndTab = GetParent(si->pDlg->GetHwnd());
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp index cb105d1aee..7b2fd8f54a 100644 --- a/plugins/TabSRMM/src/chat_window.cpp +++ b/plugins/TabSRMM/src/chat_window.cpp @@ -665,7 +665,7 @@ void CChatRoomDlg::onClick_OK(CCtrlButton*) UpdateStatusBar(); if (m_pContainer) if (fSound && !nen_options.iNoSounds && !(m_pContainer->dwFlags & CNT_NOSOUND)) - Skin_PlaySound("ChatSent"); + SkinPlaySound("ChatSent"); SetFocus(m_message.GetHwnd()); } @@ -1193,7 +1193,7 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) KbdState(isShift, isCtrl, isAlt); if (PluginConfig.m_bSoundOnTyping && !isAlt && !isCtrl && !(m_pContainer->dwFlags & CNT_NOSOUND) && wParam != VK_ESCAPE && !(wParam == VK_TAB && PluginConfig.m_bAllowTab)) - Skin_PlaySound("SoundOnTyping"); + SkinPlaySound("SoundOnTyping"); if (isCtrl && !isAlt && !isShift) switch (wParam) { @@ -1209,7 +1209,7 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) // sound on typing.. if (PluginConfig.m_bSoundOnTyping && !isAlt && wParam == VK_DELETE) - Skin_PlaySound("SoundOnTyping"); + SkinPlaySound("SoundOnTyping"); if (wParam != VK_ESCAPE) if (ProcessHotkeys(wParam, isShift, isCtrl, isAlt)) diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 298bee3138..5b4539fb8f 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -69,11 +69,11 @@ void CGlobals::reloadSystemStartup() PluginConfig.g_hMenuContext = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_TABCONTEXT));
TranslateMenu(g_hMenuContext);
- 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"));
+ 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"));
hCurSplitNS = LoadCursor(nullptr, IDC_SIZENS);
hCurSplitWE = LoadCursor(nullptr, IDC_SIZEWE);
@@ -212,7 +212,7 @@ void CGlobals::reloadAdv() m_bDontUseDefaultKbd = M.GetBool("adv_leaveKeyboardAlone", true);
if (m_bSoundOnTyping && m_TypingSoundAdded == false) {
- Skin_AddSound("SoundOnTyping", LPGENW("Other"), LPGENW("TabSRMM: typing"));
+ SkinAddNewSoundEx("SoundOnTyping", LPGEN("Other"), LPGEN("TabSRMM: typing"));
m_TypingSoundAdded = true;
}
m_bAllowOfflineMultisend = M.GetBool("AllowOfflineMultisend", true);
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index d1af47ec4b..a275fa74be 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -238,7 +238,7 @@ int CMimAPI::TypingMessage(WPARAM hContact, LPARAM mode) else fShowOnClist = false; if ((!foundWin || !(pContainer->dwFlags & CNT_NOSOUND)) && preTyping != (mode != 0)) - Skin_PlaySound(mode ? "TNStart" : "TNStop"); + SkinPlaySound(mode ? "TNStart" : "TNStop"); if (M.GetByte(SRMSGMOD, "ShowTypingPopup", 0)) { BOOL fShow = false; @@ -447,7 +447,7 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent) // if no window is open, we are not interested in anything else but unread message events // new message if (!nen_options.iNoSounds) - Skin_PlaySound("AlertMsg"); + SkinPlaySound("AlertMsg"); if (nen_options.iNoAutoPopup) goto nowindowcreate; diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 147555a9c3..2eba71af45 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -1991,7 +1991,7 @@ LRESULT CSrmmWindow::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) KbdState(isShift, isCtrl, isAlt);
if (PluginConfig.m_bSoundOnTyping && !isAlt && !isCtrl && !(m_pContainer->dwFlags & CNT_NOSOUND) && wParam != VK_ESCAPE && !(wParam == VK_TAB && PluginConfig.m_bAllowTab))
- Skin_PlaySound("SoundOnTyping");
+ SkinPlaySound("SoundOnTyping");
if (isCtrl && !isAlt) {
switch (wParam) {
@@ -2044,7 +2044,7 @@ LRESULT CSrmmWindow::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) KbdState(isShift, isCtrl, isAlt);
if (PluginConfig.m_bSoundOnTyping && !isAlt && !(m_pContainer->dwFlags & CNT_NOSOUND) && wParam == VK_DELETE)
- Skin_PlaySound("SoundOnTyping");
+ SkinPlaySound("SoundOnTyping");
if (wParam == VK_INSERT && !isShift && !isCtrl && !isAlt) {
m_bInsertMode = !m_bInsertMode;
@@ -2679,7 +2679,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) mir_snwprintf(job->szErrorMsg, TranslateT("Delivery failure: %s"), TranslateT("The message send timed out"));
job->iStatus = SendQueue::SQ_ERROR;
if (!nen_options.iNoSounds && !(m_pContainer->dwFlags & CNT_NOSOUND))
- Skin_PlaySound("SendError");
+ SkinPlaySound("SendError");
if (!(m_dwFlags & MWF_ERRORSTATE))
sendQueue->handleError(this, iIndex);
break;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 09f477af63..24487881b8 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -1162,9 +1162,9 @@ void CTabBaseDlg::PlayIncomingSound() const int iPlay = MustPlaySound();
if (iPlay) {
if (GetForegroundWindow() == m_pContainer->m_hwnd && m_pContainer->m_hwndActive == m_hwnd)
- Skin_PlaySound("RecvMsgActive");
+ SkinPlaySound("RecvMsgActive");
else
- Skin_PlaySound("RecvMsgInactive");
+ SkinPlaySound("RecvMsgInactive");
}
}
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index cae1d654e7..b78867654f 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -442,7 +442,7 @@ int SendQueue::ackMessage(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam) // "hard" errors are handled differently in multisend. There is no option to retry - once failed, they // are discarded and the user is notified with a small log message. if (!nen_options.iNoSounds && !(m_pContainer->dwFlags & CNT_NOSOUND)) - Skin_PlaySound("SendError"); + SkinPlaySound("SendError"); mir_snwprintf(job.szErrorMsg, TranslateT("Delivery failure: %s"), _A2T((char *)ack->lParam)); job.iStatus = SQ_ERROR; @@ -485,7 +485,7 @@ int SendQueue::ackMessage(CTabBaseDlg *dat, WPARAM wParam, LPARAM lParam) if (m_pContainer) if (!nen_options.iNoSounds && !(m_pContainer->dwFlags & CNT_NOSOUND)) - Skin_PlaySound("SendMsg"); + SkinPlaySound("SendMsg"); Srmm_Broadcast(DM_APPENDMCEVENT, job.hContact, hNewEvent); diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index 42a3238131..0e133464a3 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -548,8 +548,8 @@ int TN_ModuleInit() hDisableMenu = Menu_AddMainMenuItem(&mi);
}
- Skin_AddSound("TNStart", LPGENW("Instant messages"), LPGENW("Contact started typing"));
- Skin_AddSound("TNStop", LPGENW("Instant messages"), LPGENW("Contact stopped typing"));
+ SkinAddNewSoundEx("TNStart", LPGEN("Instant messages"), LPGEN("Contact started typing"));
+ SkinAddNewSoundEx("TNStop", LPGEN("Instant messages"), LPGEN("Contact stopped typing"));
return 0;
}
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index 9b17cb37e6..fc3e2ccd9d 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -133,13 +133,14 @@ int CTooltipNotify::ModulesLoaded(WPARAM, LPARAM) db_set_b(NULL, MODULENAME, "firstrun", 0);
}
- Skin_AddSound(SND_ONLINE, LPGENW("Tooltip Notify"), LPGENW("Online"), L"online.wav");
- Skin_AddSound(SND_OFFLINE, LPGENW("Tooltip Notify"), LPGENW("Offline"), L"offline.wav");
- Skin_AddSound(SND_OTHER, LPGENW("Tooltip Notify"), LPGENW("Other"), L"other.wav");
- Skin_AddSound(SND_TYPING, LPGENW("Tooltip Notify"), LPGENW("Typing"), L"typing.wav");
+ SkinAddNewSoundEx(SND_ONLINE, LPGEN("Tooltip Notify"), LPGEN("Online"), "online.wav");
+ SkinAddNewSoundEx(SND_OFFLINE, LPGEN("Tooltip Notify"), LPGEN("Offline"), "offline.wav");
+ SkinAddNewSoundEx(SND_OTHER, LPGEN("Tooltip Notify"), LPGEN("Other"), "other.wav");
+ SkinAddNewSoundEx(SND_TYPING, LPGEN("Tooltip Notify"), LPGEN("Typing"), "typing.wav");
// register fonts
RegisterFonts();
+
return 0;
}
@@ -155,7 +156,7 @@ int CTooltipNotify::ProtoContactIsTyping(WPARAM hContact, LPARAM lParam) pTooltipData->iStatus = ID_TTNTF_STATUS_TYPING;
EndNotifyAll();
- Skin_PlaySound(SND_TYPING);
+ SkinPlaySound(SND_TYPING);
BeginNotify(pTooltipData);
}
else EndNotifyAll();
@@ -224,18 +225,18 @@ int CTooltipNotify::ContactSettingChanged(WPARAM hContact, LPARAM lParam) switch (wNewStatus) {
case ID_STATUS_OFFLINE:
if (!m_sOptions.bOffline) return 0;
- Skin_PlaySound(SND_OFFLINE);
+ SkinPlaySound(SND_OFFLINE);
break;
case ID_STATUS_ONLINE:
if (CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_USERONLINE) && m_sOptions.bConjSOLN) return 0;
if (!m_sOptions.bOnline) return 0;
- Skin_PlaySound(SND_ONLINE);
+ SkinPlaySound(SND_ONLINE);
break;
default:
if (!m_sOptions.bOther) return 0;
- Skin_PlaySound(SND_OTHER);
+ SkinPlaySound(SND_OTHER);
break;
}
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index 151b3a7bfb..ffaa8b8a0b 100644 --- a/plugins/UserInfoEx/src/svc_reminder.cpp +++ b/plugins/UserInfoEx/src/svc_reminder.cpp @@ -352,11 +352,11 @@ static BYTE NotifyWithSound(const CEvent &evt) if (evt._wDaysLeft <= min(db_get_b(NULL, MODNAME, SET_REMIND_SOUNDOFFSET, DEFVAL_REMIND_SOUNDOFFSET), gRemindOpts.wDaysEarlier)) {
switch (evt._eType) {
case CEvent::BIRTHDAY:
- Skin_PlaySound(evt._wDaysLeft == 0 ? SOUND_BIRTHDAY_TODAY : SOUND_BIRTHDAY_SOON);
+ SkinPlaySound(evt._wDaysLeft == 0 ? SOUND_BIRTHDAY_TODAY : SOUND_BIRTHDAY_SOON);
return 0;
case CEvent::ANNIVERSARY:
- Skin_PlaySound(SOUND_ANNIVERSARY);
+ SkinPlaySound(SOUND_ANNIVERSARY);
return 0;
}
}
@@ -893,9 +893,24 @@ void SvcReminderOnModulesLoaded(void) void SvcReminderLoadModule(void)
{
// init sounds
- Skin_AddSound(SOUND_BIRTHDAY_TODAY, LPGENW("Birthday reminder"), L"Sounds\\BirthDay.wav");
- Skin_AddSound(SOUND_BIRTHDAY_SOON, LPGENW("Birthday reminder: it's coming"), L"Sounds\\BirthDayComing.wav");
- Skin_AddSound(SOUND_ANNIVERSARY, LPGENW("Anniversary Reminder"), L"Sounds\\Reminder.wav");
+ SKINSOUNDDESCEX ssd = { 0 };
+ ssd.cbSize = sizeof(ssd);
+ ssd.pszSection = MODNAME;
+
+ ssd.pszName = SOUND_BIRTHDAY_TODAY;
+ ssd.pszDescription = LPGEN("Birthday reminder");
+ ssd.pszDefaultFile = "Sounds\\BirthDay.wav";
+ Skin_AddSound(&ssd);
+
+ ssd.pszName = SOUND_BIRTHDAY_SOON;
+ ssd.pszDescription = LPGEN("Birthday reminder: it's coming");
+ ssd.pszDefaultFile = "Sounds\\BirthDayComing.wav";
+ Skin_AddSound(&ssd);
+
+ ssd.pszName = SOUND_ANNIVERSARY;
+ ssd.pszDescription = LPGEN("Anniversary Reminder");
+ ssd.pszDefaultFile = "Sounds\\Reminder.wav";
+ Skin_AddSound(&ssd);
// create service functions
CreateServiceFunction(MS_USERINFO_REMINDER_CHECK, CheckService);
@@ -911,6 +926,7 @@ void SvcReminderLoadModule(void) if (db_get_b(NULL, MODNAME, SET_REMIND_ENABLED, DEFVAL_REMIND_ENABLED) != REMIND_OFF && ExtraIcon == INVALID_HANDLE_VALUE)
ExtraIcon = ExtraIcon_RegisterIcolib("Reminder", LPGEN("Reminder (UInfoEx)"), ICO_COMMON_ANNIVERSARY);
+
}
/**
diff --git a/plugins/Weather/src/weather.cpp b/plugins/Weather/src/weather.cpp index 94327bc8e4..827b5514eb 100644 --- a/plugins/Weather/src/weather.cpp +++ b/plugins/Weather/src/weather.cpp @@ -226,8 +226,8 @@ extern "C" int __declspec(dllexport) Load(void) InitServices();
// add sound event
- Skin_AddSound("weatherupdated", _A2W(WEATHERPROTONAME), LPGENW("Weather Condition Changed"));
- Skin_AddSound("weatheralert", _A2W(WEATHERPROTONAME), LPGENW("Weather Alert Issued"));
+ SkinAddNewSoundExW("weatherupdated", _A2W(WEATHERPROTONAME), LPGENW("Weather Condition Changed"));
+ SkinAddNewSoundExW("weatheralert", _A2W(WEATHERPROTONAME), LPGENW("Weather Alert Issued"));
// window needed for popup commands
wchar_t SvcFunc[100];
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp index 02d5129fab..3054f13e3c 100644 --- a/plugins/Weather/src/weather_update.cpp +++ b/plugins/Weather/src/weather_update.cpp @@ -110,7 +110,7 @@ int UpdateWeather(MCONTACT hContact) // alert issued, set display to italic
if (opt.MakeItalic)
db_set_w(hContact, WEATHERPROTONAME, "ApparentMode", ID_STATUS_OFFLINE);
- Skin_PlaySound("weatheralert");
+ SkinPlaySound("weatheralert");
}
// alert dropped, set the display back to normal
else db_unset(hContact, WEATHERPROTONAME, "ApparentMode");
@@ -162,7 +162,7 @@ int UpdateWeather(MCONTACT hContact) // logging
if (Ch) {
// play the sound event
- Skin_PlaySound("weatherupdated");
+ SkinPlaySound("weatherupdated");
if (db_get_b(hContact, WEATHERPROTONAME, "File", 0)) {
// external log
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp index fd897fb380..2709aa050f 100644 --- a/plugins/WebView/src/main.cpp +++ b/plugins/WebView/src/main.cpp @@ -164,7 +164,7 @@ extern "C" int __declspec(dllexport) Load() InitServices();
//add sound event to options
- Skin_AddSound("webviewalert", _A2W(MODULENAME), LPGENW("Alert event"));
+ SkinAddNewSoundExW("webviewalert", _A2W(MODULENAME), LPGENW("Alert event"));
//value is 1 if menu is disabled
db_set_b(NULL, MODULENAME, MENU_IS_DISABLED_KEY, 1);
diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp index bdd4551410..2e744c3df8 100644 --- a/plugins/WebView/src/webview_alerts.cpp +++ b/plugins/WebView/src/webview_alerts.cpp @@ -345,7 +345,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn wasAlert = 1;
// play sound?
- Skin_PlaySound("webviewalert");
+ SkinPlaySound("webviewalert");
//
if ((!notpresent)) {
if (alertIndex == 0) { // popup
@@ -443,7 +443,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn if (strncmp(tempraw, cachecompare, mir_strlen(tempraw)) != 0) { //lets try this instead
// play sound?
- Skin_PlaySound("webviewalert");
+ SkinPlaySound("webviewalert");
// there was an alert
wasAlert = 1;
@@ -654,7 +654,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn // end write to cache
if (strncmp(raw, cachecompare, (mir_strlen(raw))) != 0) { //lets try this instead
// play sound?
- Skin_PlaySound("webviewalert");
+ SkinPlaySound("webviewalert");
// there was an alert
wasAlert = 1;
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp index ee26949b6d..f6fd93f05f 100644 --- a/plugins/WhenWasIt/src/WhenWasIt.cpp +++ b/plugins/WhenWasIt/src/WhenWasIt.cpp @@ -131,8 +131,8 @@ extern "C" int __declspec(dllexport) Load(void) hotkey.pszService = MS_WWI_CHECK_BIRTHDAYS;
Hotkey_Register(&hotkey);
- Skin_AddSound(BIRTHDAY_NEAR_SOUND, LPGENW("WhenWasIt"), LPGENW("Birthday near"));
- Skin_AddSound(BIRTHDAY_TODAY_SOUND, LPGENW("WhenWasIt"), LPGENW("Birthday today"));
+ SkinAddNewSoundExW(BIRTHDAY_NEAR_SOUND, LPGENW("WhenWasIt"), LPGENW("Birthday near"));
+ SkinAddNewSoundExW(BIRTHDAY_TODAY_SOUND, LPGENW("WhenWasIt"), LPGENW("Birthday today"));
Log("%s", "Leaving function " __FUNCTION__);
return 0;
diff --git a/plugins/WhenWasIt/src/notifiers.cpp b/plugins/WhenWasIt/src/notifiers.cpp index 96bf7fe280..739fbbb789 100644 --- a/plugins/WhenWasIt/src/notifiers.cpp +++ b/plugins/WhenWasIt/src/notifiers.cpp @@ -194,9 +194,9 @@ int DialogNotifyMissedBirthday(MCONTACT hContact, int dab, int age) int SoundNotifyBirthday(int dtb)
{
if (dtb == 0)
- Skin_PlaySound(BIRTHDAY_TODAY_SOUND);
+ SkinPlaySound(BIRTHDAY_TODAY_SOUND);
else if (dtb <= commonData.cSoundNearDays)
- Skin_PlaySound(BIRTHDAY_NEAR_SOUND);
+ SkinPlaySound(BIRTHDAY_NEAR_SOUND);
return 0;
}
diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp index 7c8a3e794c..bbc972fac2 100644 --- a/plugins/XSoundNotify/src/dialog.cpp +++ b/plugins/XSoundNotify/src/dialog.cpp @@ -137,14 +137,14 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP if (!db_get_ws(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
wchar_t longpath[MAX_PATH] = { 0 };
PathToAbsoluteW(dbv.ptszVal, longpath);
- Skin_PlaySoundFile(longpath);
+ SkinPlaySoundFile(longpath);
db_free(&dbv);
}
}
else {
wchar_t longpath[MAX_PATH] = { 0 };
PathToAbsoluteW(p->path, longpath);
- Skin_PlaySoundFile(longpath);
+ SkinPlaySoundFile(longpath);
}
break;
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp index fd5bc06ca8..f7735d774b 100644 --- a/plugins/XSoundNotify/src/options.cpp +++ b/plugins/XSoundNotify/src/options.cpp @@ -205,14 +205,14 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l if (!db_get_ws(NULL, SETTINGSNAME, pa->szModuleName, &dbv)) {
wchar_t longpath[MAX_PATH];
PathToAbsoluteW(dbv.ptszVal, longpath);
- Skin_PlaySoundFile(longpath);
+ SkinPlaySoundFile(longpath);
db_free(&dbv);
}
}
else {
wchar_t longpath[MAX_PATH] = { 0 };
PathToAbsoluteW(p->path, longpath);
- Skin_PlaySoundFile(longpath);
+ SkinPlaySoundFile(longpath);
}
}
else {
@@ -224,14 +224,14 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l if (!db_get_ws(hContact, SETTINGSNAME, SETTINGSKEY, &dbv)) {
wchar_t longpath[MAX_PATH];
PathToAbsoluteW(dbv.ptszVal, longpath);
- Skin_PlaySoundFile(longpath);
+ SkinPlaySoundFile(longpath);
db_free(&dbv);
}
}
else {
wchar_t longpath[MAX_PATH] = { 0 };
PathToAbsoluteW(p->path, longpath);
- Skin_PlaySoundFile(longpath);
+ SkinPlaySoundFile(longpath);
}
}
}
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index 417dd08dbd..b97d930f8d 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -78,7 +78,7 @@ void InitSelfSounds() wchar_t infobuf[256];
mir_snwprintf(infobuf, L"%s [%s]", TranslateT("Self status"), protos[i]->tszAccountName);
- Skin_AddSound(namebuf, infobuf, pcli->pfnGetStatusModeDescription(selfSounds[j].iStatus, 0));
+ SkinAddNewSoundExW(namebuf, infobuf, pcli->pfnGetStatusModeDescription(selfSounds[j].iStatus, 0));
}
}
}
@@ -91,7 +91,7 @@ static int ProtoAck(WPARAM, LPARAM lParam) if (selfSounds[i].iStatus == ack->lParam) {
char buf[128];
mir_snprintf(buf, "%s%s", ack->szModule, selfSounds[i].szName);
- Skin_PlaySound(buf);
+ SkinPlaySound(buf);
break;
}
}
@@ -121,7 +121,7 @@ static int ProcessEvent(WPARAM hContact, LPARAM lParam) wchar_t PlaySoundPath[MAX_PATH] = { 0 };
PathToAbsoluteW(dbv.ptszVal, PlaySoundPath);
isOwnSound = 0;
- Skin_PlaySoundFile(PlaySoundPath);
+ SkinPlaySoundFile(PlaySoundPath);
db_free(&dbv);
isOwnSound = 1;
return 0;
@@ -138,7 +138,7 @@ static int ProcessEvent(WPARAM hContact, LPARAM lParam) wchar_t PlaySoundPath[MAX_PATH] = { 0 };
PathToAbsoluteW(dbv.ptszVal, PlaySoundPath);
isAccSound = 0;
- Skin_PlaySoundFile(PlaySoundPath);
+ SkinPlaySoundFile(PlaySoundPath);
db_free(&dbv);
isAccSound = 1;
}
@@ -168,7 +168,7 @@ static int ProcessChatEvent(WPARAM, LPARAM lParam) wchar_t PlaySoundPath[MAX_PATH] = { 0 };
PathToAbsoluteW(dbv.ptszVal, PlaySoundPath);
isOwnSound = 0;
- Skin_PlaySoundFile(PlaySoundPath);
+ SkinPlaySoundFile(PlaySoundPath);
db_free(&dbv);
isOwnSound = 1;
return 0;
@@ -184,7 +184,7 @@ static int ProcessChatEvent(WPARAM, LPARAM lParam) wchar_t PlaySoundPath[MAX_PATH] = { 0 };
PathToAbsoluteW(dbv.ptszVal, PlaySoundPath);
isAccSound = 0;
- Skin_PlaySoundFile(PlaySoundPath);
+ SkinPlaySoundFile(PlaySoundPath);
db_free(&dbv);
isAccSound = 1;
}
diff --git a/plugins/YAMN/src/browser/badconnect.cpp b/plugins/YAMN/src/browser/badconnect.cpp index 90f5815d4e..31cbb57829 100644 --- a/plugins/YAMN/src/browser/badconnect.cpp +++ b/plugins/YAMN/src/browser/badconnect.cpp @@ -245,7 +245,7 @@ void __cdecl BadConnection(void *Param) DebugLog(SynchroFile,"BadConnect:ActualAccountSO-read enter\n");
#endif
if (ActualAccount->BadConnectN.Flags & YAMN_ACC_SND)
- Skin_PlaySound(YAMN_CONNECTFAILSOUND);
+ CallService(MS_SKIN_PLAYSOUND, 0, (LPARAM)YAMN_CONNECTFAILSOUND);
if (ActualAccount->BadConnectN.Flags & YAMN_ACC_MSG)
ShowWindow(hBadConnect, SW_SHOWNORMAL);
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp index 9342ecc1aa..64b7508f92 100644 --- a/plugins/YAMN/src/browser/mailbrowser.cpp +++ b/plugins/YAMN/src/browser/mailbrowser.cpp @@ -741,7 +741,7 @@ void DoMailActions(HWND hDlg, HACCOUNT ActualAccount, struct CMailNumbers *MN, D if (MN->Real.SoundNC + MN->Virtual.SoundNC != 0) if (nflags & YAMN_ACC_SND) - Skin_PlaySound(YAMN_NEWMAILSOUND); + SkinPlaySound(YAMN_NEWMAILSOUND); if ((nnflags & YAMN_ACC_POP) && (MN->Real.PopupRun + MN->Virtual.PopupRun == 0)) { POPUPDATAT NoNewMailPopup; diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index 9264edaf70..d13f61a6ba 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -324,8 +324,8 @@ extern "C" int __declspec(dllexport) Load(void) CreateServiceFunctions(); - Skin_AddSound(YAMN_NEWMAILSOUND, L"YAMN", YAMN_NEWMAILSNDDESC); - Skin_AddSound(YAMN_CONNECTFAILSOUND, L"YAMN", YAMN_CONNECTFAILSNDDESC); + SkinAddNewSoundEx(YAMN_NEWMAILSOUND, YAMN_DBMODULE, YAMN_NEWMAILSNDDESC); + SkinAddNewSoundEx(YAMN_CONNECTFAILSOUND, YAMN_DBMODULE, YAMN_CONNECTFAILSNDDESC); HookEvents(); diff --git a/plugins/YAMN/src/main.h b/plugins/YAMN/src/main.h index fd09d77b13..eacb470e69 100644 --- a/plugins/YAMN/src/main.h +++ b/plugins/YAMN/src/main.h @@ -1,8 +1,8 @@ #ifndef __MAIN_H
#define __MAIN_H
-#define YAMN_NEWMAILSNDDESC LPGENW("YAMN: new mail message")
-#define YAMN_CONNECTFAILSNDDESC LPGENW("YAMN: connect failed")
+#define YAMN_NEWMAILSNDDESC LPGEN("YAMN: new mail message")
+#define YAMN_CONNECTFAILSNDDESC LPGEN("YAMN: connect failed")
#define YAMN_CONNECTFAILSOUND "YAMN/Sound/ConnectFail"
#define YAMN_NEWMAILSOUND "YAMN/Sound/NewMail"
|