From 69409021aced78b31da0c9f2def7332a4c4b973e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 12 Sep 2017 12:14:57 +0300 Subject: Revert "Merge branch 'master' of https://github.com/miranda-ng/miranda-ng" This reverts commit e09448dd03e3647717166e92ee818e395041993a, reversing changes made to b0f44b16bd1138de85a5d17bb42151742f9c8298. --- protocols/Tlen/src/tlen.cpp | 11 ++++++++--- protocols/Tlen/src/tlen_thread.cpp | 6 +++--- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'protocols/Tlen/src') diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp index db1a4bbfb1..34f6828abf 100644 --- a/protocols/Tlen/src/tlen.cpp +++ b/protocols/Tlen/src/tlen.cpp @@ -230,14 +230,19 @@ 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); - Skin_AddSound("TlenMailNotify", m_tszUserName, LPGENW("Incoming mail")); - Skin_AddSound("TlenAlertNotify", m_tszUserName, LPGENW("Alert")); - Skin_AddSound("TlenVoiceNotify", m_tszUserName, LPGENW("Voice chat")); + 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); 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 8396a9ab45..2528b62f9e 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.")); - Skin_PlaySound("TlenAlertNotify"); + SkinPlaySound("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); - Skin_PlaySound("TlenMailNotify"); + SkinPlaySound("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) { - Skin_PlaySound("TlenVoiceNotify"); + SkinPlaySound("TlenVoiceNotify"); TlenVoiceAccept(info->proto, id, from); } } else if (!mir_strcmp(e, "3")) { -- cgit v1.2.3