From 928158d25b533037df6ba4a1b1daedeefb05bbbb Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 4 Oct 2014 01:14:11 +0000 Subject: Tox: - tox id is key again - reworked tox profile logic git-svn-id: http://svn.miranda-ng.org/main/trunk@10679 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_utils.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'protocols/Tox/src/tox_utils.cpp') diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index a290e6a76e..f45c8d937e 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -33,29 +33,31 @@ int CToxProto::ToxToMirandaStatus(TOX_USERSTATUS userstatus) return status; } -void CToxProto::ShowNotification(const wchar_t *caption, const wchar_t *message, int flags, MCONTACT hContact) +void CToxProto::ShowNotification(const TCHAR *caption, const TCHAR *message, int flags, MCONTACT hContact) { if (Miranda_Terminated()) + { return; + } if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1)) { - POPUPDATAW ppd = { 0 }; + POPUPDATAT ppd = { 0 }; ppd.lchContact = hContact; wcsncpy(ppd.lpwzContactName, caption, MAX_CONTACTNAME); wcsncpy(ppd.lpwzText, message, MAX_SECONDLINE); ppd.lchIcon = Skin_GetIcon("Tox_main"); - if (!PUAddPopupW(&ppd)) + if (!PUAddPopupT(&ppd)) return; } - MessageBoxW(NULL, message, caption, MB_OK | flags); + MessageBox(NULL, message, caption, MB_OK | flags); } -void CToxProto::ShowNotification(const wchar_t *message, int flags, MCONTACT hContact) +void CToxProto::ShowNotification(const TCHAR *message, int flags, MCONTACT hContact) { - ShowNotification(TranslateT(MODULE), message, flags, hContact); + ShowNotification(_T(MODULE), message, flags, hContact); } HANDLE CToxProto::AddDbEvent(MCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, DWORD cbBlob, PBYTE pBlob) -- cgit v1.2.3