summaryrefslogtreecommitdiff
path: root/protocols/Tlen/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-09-11 22:27:34 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-09-12 12:43:48 +0300
commitf2656f118f63643151e53694bd223018c29b4a55 (patch)
tree2733f155bb5fd9313ea08255209da75f738bcedf /protocols/Tlen/src
parent69409021aced78b31da0c9f2def7332a4c4b973e (diff)
old good sound services became finally functions
Diffstat (limited to 'protocols/Tlen/src')
-rw-r--r--protocols/Tlen/src/tlen.cpp11
-rw-r--r--protocols/Tlen/src/tlen_thread.cpp6
2 files changed, 6 insertions, 11 deletions
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp
index 34f6828abf..db1a4bbfb1 100644
--- a/protocols/Tlen/src/tlen.cpp
+++ b/protocols/Tlen/src/tlen.cpp
@@ -230,19 +230,14 @@ INT_PTR TlenProtocol::MenuHandleInbox(WPARAM, LPARAM)
int TlenProtocol::OnModulesLoaded(WPARAM, LPARAM)
{
- char str[128];
/* Set all contacts to offline */
-
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
if (db_get_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
db_set_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE);
- strncpy_s(str, LPGEN("Incoming mail"), _TRUNCATE);
- SkinAddNewSoundEx("TlenMailNotify", m_szModuleName, str);
- strncpy_s(str, LPGEN("Alert"), _TRUNCATE);
- SkinAddNewSoundEx("TlenAlertNotify", m_szModuleName, str);
- strncpy_s(str, LPGEN("Voice chat"), _TRUNCATE);
- SkinAddNewSoundEx("TlenVoiceNotify", m_szModuleName, str);
+ Skin_AddSound("TlenMailNotify", m_tszUserName, LPGENW("Incoming mail"));
+ Skin_AddSound("TlenAlertNotify", m_tszUserName, LPGENW("Alert"));
+ Skin_AddSound("TlenVoiceNotify", m_tszUserName, LPGENW("Voice chat"));
HookProtoEvent(ME_USERINFO_INITIALISE, &TlenProtocol::UserInfoInit);
return 0;
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp
index 2528b62f9e..8396a9ab45 100644
--- a/protocols/Tlen/src/tlen_thread.cpp
+++ b/protocols/Tlen/src/tlen_thread.cpp
@@ -991,7 +991,7 @@ static void TlenProcessM(XmlNode *node, ThreadData *info)
else {
if (info->proto->tlenOptions.logAlerts)
TlenLogMessage(info->proto, hContact, 0, Translate("An alert has been received."));
- SkinPlaySound("TlenAlertNotify");
+ Skin_PlaySound("TlenAlertNotify");
}
}
}
@@ -1107,7 +1107,7 @@ static void TlenProcessN(XmlNode *node, ThreadData *info)
TlenStringAppend(&str, &strSize, "%s: %s", Translate("Subject"), s);
popupText = TlenTextDecode(str);
TlenMailPopup(info->proto, popupTitle, popupText);
- SkinPlaySound("TlenMailNotify");
+ Skin_PlaySound("TlenMailNotify");
mir_free(popupTitle);
mir_free(popupText);
@@ -1211,7 +1211,7 @@ static void TlenProcessV(XmlNode *node, ThreadData *info)
if ((e=TlenXmlGetAttrValue(node, "e")) != NULL) {
if (!mir_strcmp(e, "1")) {
if ((id=TlenXmlGetAttrValue(node, "i")) != NULL) {
- SkinPlaySound("TlenVoiceNotify");
+ Skin_PlaySound("TlenVoiceNotify");
TlenVoiceAccept(info->proto, id, from);
}
} else if (!mir_strcmp(e, "3")) {