From 7deea6cec5d2173f66d4c2dd75ca0b633b887bc7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 May 2018 00:17:30 +0300 Subject: sounds packed into CMPlugin (reduces usage of hLangpack) --- plugins/Alarms/src/alarmlist.cpp | 6 +++--- plugins/AutoShutdown/src/shutdownsvc.cpp | 2 +- plugins/AvatarHistory/src/AvatarHistory.cpp | 4 ++-- plugins/BuddyExpectator/src/BuddyExpectator.cpp | 8 ++++---- plugins/ChangeKeyboardLayout/src/hook_events.cpp | 4 ++-- plugins/ClientChangeNotify/src/ClientChangeNotify.cpp | 2 +- plugins/ConnectionNotify/src/ConnectionNotify.cpp | 5 ++++- plugins/ContactsPlus/src/main.cpp | 4 ++-- plugins/FTPFileYM/src/ftpfile.cpp | 4 ++-- plugins/GmailNotifier/src/main.cpp | 2 +- plugins/LotusNotify/src/LotusNotify.cpp | 2 +- plugins/MirLua/src/m_sounds.cpp | 7 ++++++- plugins/NewAwaySysMod/src/AwaySys.cpp | 2 +- plugins/NewXstatusNotify/src/main.cpp | 4 ++-- plugins/NotesAndReminders/src/main.cpp | 6 +++--- plugins/NotifyAnything/src/main.cpp | 2 +- plugins/Nudge/src/main.cpp | 6 +++--- plugins/Ping/src/ping.cpp | 4 ++-- plugins/PluginUpdater/src/PluginUpdater.cpp | 4 ++-- plugins/SMS/src/SMS_svc.cpp | 4 ++-- plugins/Scriver/src/msgs.cpp | 12 ++++++------ plugins/SecureIM/src/main.cpp | 4 ++-- plugins/SeenPlugin/src/main.cpp | 8 ++++---- plugins/TabSRMM/src/globals.cpp | 12 ++++++------ plugins/TabSRMM/src/typingnotify.cpp | 4 ++-- plugins/TooltipNotify/src/TooltipNotify.cpp | 8 ++++---- plugins/UserInfoEx/src/svc_reminder.cpp | 6 +++--- plugins/Weather/src/weather.cpp | 4 ++-- plugins/WebView/src/main.cpp | 2 +- plugins/WhenWasIt/src/WhenWasIt.cpp | 4 ++-- plugins/XSoundNotify/src/xsn_main.cpp | 2 +- plugins/YAMN/src/main.cpp | 4 ++-- 32 files changed, 80 insertions(+), 72 deletions(-) (limited to 'plugins') diff --git a/plugins/Alarms/src/alarmlist.cpp b/plugins/Alarms/src/alarmlist.cpp index 4d39c16e1c..0cbacdff46 100755 --- a/plugins/Alarms/src/alarmlist.cpp +++ b/plugins/Alarms/src/alarmlist.cpp @@ -777,9 +777,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")); + g_plugin.addSound("Triggered1", LPGENW("Alarms"), LPGENW("Alert 1")); + g_plugin.addSound("Triggered2", LPGENW("Alarms"), LPGENW("Alert 2")); + g_plugin.addSound("Triggered3", LPGENW("Alarms"), LPGENW("Alert 3")); // load last checked time DBVARIANT dbv; diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp index 377da09040..699820190c 100644 --- a/plugins/AutoShutdown/src/shutdownsvc.cpp +++ b/plugins/AutoShutdown/src/shutdownsvc.cpp @@ -495,7 +495,7 @@ void InitShutdownSvc(void) { /* Shutdown Dialog */ hwndShutdownDlg = nullptr; - Skin_AddSound("AutoShutdown_Countdown", LPGENW("Alerts"), LPGENW("Automatic shutdown countdown")); + g_plugin.addSound("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 789e210640..6c2cd9ff99 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -331,8 +331,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")); + g_plugin.addSound("avatar_changed", LPGENW("Avatar history"), LPGENW("Contact changed avatar")); + g_plugin.addSound("avatar_removed", LPGENW("Avatar history"), LPGENW("Contact removed avatar")); hAvatarWindowsList = WindowList_Create(); diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index db853ebe9e..4b8d9fab79 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -585,10 +585,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")); + g_plugin.addSound("buddyExpectatorReturn", LPGENW("BuddyExpectator"), LPGENW("Contact returned")); + g_plugin.addSound("buddyExpectatorStillAbsent", LPGENW("BuddyExpectator"), LPGENW("Contact still absent")); + g_plugin.addSound("buddyExpectatorMissYou", LPGENW("BuddyExpectator"), LPGENW("Miss you event")); + g_plugin.addSound("buddyExpectatorHide", LPGENW("BuddyExpectator"), LPGENW("Hide contact event")); timer_id = SetTimer(nullptr, 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 c7148fb985..22fc9ddc7d 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")); + g_plugin.addSound(SND_ChangeLayout, ModuleNameW, LPGENW("Changing Layout")); + g_plugin.addSound(SND_ChangeCase, ModuleNameW, LPGENW("Changing Case")); // Хук на нажатие клавиши kbHook_All = SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC)Keyboard_Hook, nullptr, GetCurrentThreadId()); diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index bd7044e69b..5c11b907fb 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -316,7 +316,7 @@ int MirandaLoaded(WPARAM, LPARAM) HookEvent(ME_SYSTEM_MODULEUNLOAD, ModuleLoad); HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ContactSettingChanged); - Skin_AddSound(CLIENTCHANGED_SOUND, nullptr, LPGENW("ClientChangeNotify: Client changed")); + g_plugin.addSound(CLIENTCHANGED_SOUND, nullptr, LPGENW("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 69892a4ef4..9f997ea8ff 100644 --- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp +++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp @@ -866,11 +866,14 @@ 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")); + g_plugin.addSound(PLUGINNAME_NEWSOUND, PLUGINNAMEW, LPGENW("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 assert(hHookModulesLoaded); + hHookPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, preshutdown); return 0; } diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp index 872f18d593..b114990165 100644 --- a/plugins/ContactsPlus/src/main.cpp +++ b/plugins/ContactsPlus/src/main.cpp @@ -211,8 +211,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"); + g_plugin.addSound("RecvContacts", LPGENW("Events"), LPGENW("Incoming Contacts"), L"contacts.wav"); + g_plugin.addSound("SentContacts", LPGENW("Events"), LPGENW("Outgoing Contacts"), L"ocontacts.wav"); return 0; } diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp index 9324f618ad..0df76f1e23 100644 --- a/plugins/FTPFileYM/src/ftpfile.cpp +++ b/plugins/FTPFileYM/src/ftpfile.cpp @@ -346,8 +346,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")); + g_plugin.addSound(SOUND_UPCOMPLETE, LPGENW("FTP File"), LPGENW("File upload complete")); + g_plugin.addSound(SOUND_CANCEL, LPGENW("FTP File"), LPGENW("Upload canceled")); curl_global_init(CURL_GLOBAL_ALL); diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp index e36b288309..13544edddd 100644 --- a/plugins/GmailNotifier/src/main.cpp +++ b/plugins/GmailNotifier/src/main.cpp @@ -90,7 +90,7 @@ extern "C" int __declspec(dllexport) Load() mir_getLP(&pluginInfoEx); pcli = Clist_GetInterface(); - Skin_AddSound("Gmail", LPGENW("Other"), LPGENW("Gmail: New thread(s)")); + g_plugin.addSound("Gmail", LPGENW("Other"), LPGENW("Gmail: New thread(s)")); HookEvent(ME_CLIST_DOUBLECLICKED, OpenBrowser); NETLIBUSER nlu = {}; diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index 542e7eece9..69006c457a 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -1733,7 +1733,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")); + g_plugin.addSound("LotusNotify", LPGENW("Lotus Notify"), LPGENW("New Lotus document detected")); HookEvent(ME_OPT_INITIALISE, LotusNotifyOptInit); //register service to hook option call HookEvent(ME_SYSTEM_MODULESLOADED, modulesloaded); //hook event that all plugins are loaded diff --git a/plugins/MirLua/src/m_sounds.cpp b/plugins/MirLua/src/m_sounds.cpp index cd9a089ce4..e6737ed705 100644 --- a/plugins/MirLua/src/m_sounds.cpp +++ b/plugins/MirLua/src/m_sounds.cpp @@ -7,7 +7,12 @@ static int lua_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, CMLuaEnvironment::GetEnvironmentId(L)); + int res; + CMPluginBase *pPlugin = GetPluginByLangId(CMLuaEnvironment::GetEnvironmentId(L)); + if (pPlugin != nullptr) + res = pPlugin->addSound(name, section, description, filePath); + else + res = 1; lua_pushboolean(L, res == 0); return 1; diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index a36c064cf9..6c4afc8c36 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -680,7 +680,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")); + g_plugin.addSound(AWAYSYS_STATUSMSGREQUEST_SOUND, nullptr, LPGENW("NewAwaySys: Incoming status message request")); if (ServiceExists(MS_VARS_REGISTERTOKEN)) { CreateServiceFunction(MS_AWAYSYS_FREEVARMEM, srvFreeVarMem); diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 311b419b87..e9383fa63c 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -1099,10 +1099,10 @@ void InitMainMenuItem() static 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); + g_plugin.addSound(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); + g_plugin.addSound(StatusListEx[i].lpzSkinSoundName, LPGENW("Status Notify"), StatusListEx[i].lpzSkinSoundDesc); } static int InitTopToolbar(WPARAM, LPARAM) diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp index 7a412c5198..30c88eab08 100644 --- a/plugins/NotesAndReminders/src/main.cpp +++ b/plugins/NotesAndReminders/src/main.cpp @@ -157,9 +157,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)")); + g_plugin.addSound("AlertReminder", LPGENW("Alerts"), LPGENW("Reminder triggered")); + g_plugin.addSound("AlertReminder2", LPGENW("Alerts"), LPGENW("Reminder triggered (Alternative 1)")); + g_plugin.addSound("AlertReminder3", LPGENW("Alerts"), LPGENW("Reminder triggered (Alternative 2)")); // register menu command services diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp index b7d697feec..4b05c673ad 100644 --- a/plugins/NotifyAnything/src/main.cpp +++ b/plugins/NotifyAnything/src/main.cpp @@ -144,7 +144,7 @@ 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()); + g_plugin.addSound(_T2A(id.c_str()), LPGENW("Notify Anything"), desc.c_str(), file.c_str()); } HICON getIcon(const std::wstring &name) diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index aae1e09f51..d32aaedcd0 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -357,7 +357,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); + g_plugin.addSound(p->NudgeSoundname, LPGENW("Nudge"), soundDesc); arNudges.insert(p); } @@ -373,9 +373,9 @@ static 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")); + g_plugin.addSound(DefaultNudge.NudgeSoundname, LPGENW("Nudge"), LPGENW("Default Nudge")); + DefaultNudge.Load(); - GlobalNudge.Load(); for (auto &pa : Accounts()) diff --git a/plugins/Ping/src/ping.cpp b/plugins/Ping/src/ping.cpp index 8e2a1be6b2..01d99dedd4 100644 --- a/plugins/Ping/src/ping.cpp +++ b/plugins/Ping/src/ping.cpp @@ -135,8 +135,8 @@ extern "C" __declspec(dllexport) int Load(void) LoadOptions(); - Skin_AddSound("PingTimeout", LPGENW("Ping"), LPGENW("Timeout")); - Skin_AddSound("PingReply", LPGENW("Ping"), LPGENW("Reply")); + g_plugin.addSound("PingTimeout", LPGENW("Ping"), LPGENW("Timeout")); + g_plugin.addSound("PingReply", LPGENW("Ping"), LPGENW("Reply")); HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); HookEvent(ME_OPT_INITIALISE, PingOptInit); diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index 49baa4f787..00e23eb0c8 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -99,8 +99,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")); + g_plugin.addSound("updatecompleted", LPGENW("Plugin Updater"), LPGENW("Update completed")); + g_plugin.addSound("updatefailed", LPGENW("Plugin Updater"), LPGENW("Update failed")); // Upgrade old settings if (-1 == db_get_b(0, MODNAME, DB_SETTING_UPDATE_MODE, -1)) { diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp index 92542c268e..1543d4bb77 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")); + g_plugin.addSound("RecvSMSMsg", PROTOCOL_NAMEW, LPGENW("Incoming SMS Message")); + g_plugin.addSound("RecvSMSConfirmation", PROTOCOL_NAMEW, LPGENW("Incoming SMS Confirmation")); RefreshAccountList(NULL, NULL); return 0; diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index cb41109d0e..6537265502 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -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")); + g_plugin.addSound("RecvMsgActive", LPGENW("Instant messages"), LPGENW("Incoming (focused window)")); + g_plugin.addSound("RecvMsgInactive", LPGENW("Instant messages"), LPGENW("Incoming (unfocused window)")); + g_plugin.addSound("AlertMsg", LPGENW("Instant messages"), LPGENW("Incoming (new session)")); + g_plugin.addSound("SendMsg", LPGENW("Instant messages"), LPGENW("Outgoing")); + g_plugin.addSound("TNStart", LPGENW("Instant messages"), LPGENW("Contact started typing")); + g_plugin.addSound("TNStop", LPGENW("Instant messages"), LPGENW("Contact stopped typing")); hDragCursor = LoadCursor(g_plugin.getInst(), MAKEINTRESOURCE(IDC_DRAGCURSOR)); diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index b69c0ad649..e40c7ca475 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"); + g_plugin.addSound("IncomingSecureMessage", LPGENW("SecureIM"), LPGENW("Incoming Secure Message"), L"Sounds\\iSecureMessage.wav"); + g_plugin.addSound("OutgoingSecureMessage", LPGENW("SecureIM"), LPGENW("Outgoing Secure Message"), L"Sounds\\oSecureMessage.wav"); // init extra icons for (int i = 0; i < _countof(g_IEC); i++) diff --git a/plugins/SeenPlugin/src/main.cpp b/plugins/SeenPlugin/src/main.cpp index 058eec0d1c..d9ffefc59b 100644 --- a/plugins/SeenPlugin/src/main.cpp +++ b/plugins/SeenPlugin/src/main.cpp @@ -113,10 +113,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")); + g_plugin.addSound("LastSeenTrackedStatusChange", LPGENW("LastSeen"), LPGENW("User status change")); + g_plugin.addSound("LastSeenTrackedStatusOnline", LPGENW("LastSeen"), LPGENW("Changed to Online")); + g_plugin.addSound("LastSeenTrackedStatusOffline", LPGENW("LastSeen"), LPGENW("User Logged Off")); + g_plugin.addSound("LastSeenTrackedStatusFromOffline", LPGENW("LastSeen"), LPGENW("User Logged In")); return 0; } diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 1a3f9fe099..d6db557e01 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -67,11 +67,11 @@ void CGlobals::reloadSystemStartup() PluginConfig.g_hMenuContext = LoadMenu(g_plugin.getInst(), 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")); + g_plugin.addSound("RecvMsgActive", LPGENW("Instant messages"), LPGENW("Incoming (focused window)")); + g_plugin.addSound("RecvMsgInactive", LPGENW("Instant messages"), LPGENW("Incoming (unfocused window)")); + g_plugin.addSound("AlertMsg", LPGENW("Instant messages"), LPGENW("Incoming (new session)")); + g_plugin.addSound("SendMsg", LPGENW("Instant messages"), LPGENW("Outgoing")); + g_plugin.addSound("SendError", LPGENW("Instant messages"), LPGENW("Message send error")); hCurSplitNS = LoadCursor(nullptr, IDC_SIZENS); hCurSplitWE = LoadCursor(nullptr, IDC_SIZEWE); @@ -210,7 +210,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")); + g_plugin.addSound("SoundOnTyping", LPGENW("Other"), LPGENW("TabSRMM: typing")); m_TypingSoundAdded = true; } m_bAllowOfflineMultisend = M.GetBool("AllowOfflineMultisend", true); diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index 2f6383b2de..b6f6261fc8 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -546,8 +546,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")); + g_plugin.addSound("TNStart", LPGENW("Instant messages"), LPGENW("Contact started typing")); + g_plugin.addSound("TNStop", LPGENW("Instant messages"), LPGENW("Contact stopped typing")); return 0; } diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index 5b0e55ae4b..952ec98a40 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -133,10 +133,10 @@ 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"); + g_plugin.addSound(SND_ONLINE, LPGENW("Tooltip Notify"), LPGENW("Online"), L"online.wav"); + g_plugin.addSound(SND_OFFLINE, LPGENW("Tooltip Notify"), LPGENW("Offline"), L"offline.wav"); + g_plugin.addSound(SND_OTHER, LPGENW("Tooltip Notify"), LPGENW("Other"), L"other.wav"); + g_plugin.addSound(SND_TYPING, LPGENW("Tooltip Notify"), LPGENW("Typing"), L"typing.wav"); // register fonts RegisterFonts(); diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index b2dafa8374..2ea030b83e 100644 --- a/plugins/UserInfoEx/src/svc_reminder.cpp +++ b/plugins/UserInfoEx/src/svc_reminder.cpp @@ -893,9 +893,9 @@ 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"); + g_plugin.addSound(SOUND_BIRTHDAY_TODAY, LPGENW("Birthday reminder"), L"Sounds\\BirthDay.wav"); + g_plugin.addSound(SOUND_BIRTHDAY_SOON, LPGENW("Birthday reminder: it's coming"), L"Sounds\\BirthDayComing.wav"); + g_plugin.addSound(SOUND_ANNIVERSARY, LPGENW("Anniversary Reminder"), L"Sounds\\Reminder.wav"); // create service functions CreateServiceFunction(MS_USERINFO_REMINDER_CHECK, CheckService); diff --git a/plugins/Weather/src/weather.cpp b/plugins/Weather/src/weather.cpp index b3f1b4706e..4e8637c590 100644 --- a/plugins/Weather/src/weather.cpp +++ b/plugins/Weather/src/weather.cpp @@ -200,8 +200,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")); + g_plugin.addSound("weatherupdated", _A2W(WEATHERPROTONAME), LPGENW("Weather Condition Changed")); + g_plugin.addSound("weatheralert", _A2W(WEATHERPROTONAME), LPGENW("Weather Alert Issued")); // window needed for popup commands wchar_t SvcFunc[100]; diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp index 76deec0957..eaaeee3d07 100644 --- a/plugins/WebView/src/main.cpp +++ b/plugins/WebView/src/main.cpp @@ -123,7 +123,7 @@ extern "C" int __declspec(dllexport) Load() InitServices(); //add sound event to options - Skin_AddSound("webviewalert", _A2W(MODULENAME), LPGENW("Alert event")); + g_plugin.addSound("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/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp index c9be02faa9..eaccb2a2c5 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")); + g_plugin.addSound(BIRTHDAY_NEAR_SOUND, LPGENW("WhenWasIt"), LPGENW("Birthday near")); + g_plugin.addSound(BIRTHDAY_TODAY_SOUND, LPGENW("WhenWasIt"), LPGENW("Birthday today")); Log("%s", "Leaving function " __FUNCTION__); return 0; diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index e56d6b5d98..7e7166f6d6 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -70,7 +70,7 @@ void InitSelfSounds() wchar_t infobuf[256]; mir_snwprintf(infobuf, L"%s [%s]", TranslateT("Self status"), pa->tszAccountName); - Skin_AddSound(namebuf, infobuf, Clist_GetStatusModeDescription(selfSounds[j].iStatus, 0)); + g_plugin.addSound(namebuf, infobuf, Clist_GetStatusModeDescription(selfSounds[j].iStatus, 0)); } } } diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index 150d9e8a55..db71aa8e05 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -297,8 +297,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); + g_plugin.addSound(YAMN_NEWMAILSOUND, L"YAMN", YAMN_NEWMAILSNDDESC); + g_plugin.addSound(YAMN_CONNECTFAILSOUND, L"YAMN", YAMN_CONNECTFAILSNDDESC); HookEvents(); -- cgit v1.2.3