diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-08-16 17:26:20 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-08-16 17:26:20 +0000 |
commit | 63afce56f08e031e45a6a33f56af0f312c8bfc91 (patch) | |
tree | 0cca881dcd3b05a80879c97d33c6de9e7b4919cd /protocols/Tox/src/tox_utils.cpp | |
parent | 2e93497d5b19b4fc46f84cb18267bce357e48747 (diff) |
Tox: added tox icon
git-svn-id: http://svn.miranda-ng.org/main/trunk@10204 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_utils.cpp')
-rw-r--r-- | protocols/Tox/src/tox_utils.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp index 4fb527df27..9f47d67de1 100644 --- a/protocols/Tox/src/tox_utils.cpp +++ b/protocols/Tox/src/tox_utils.cpp @@ -33,6 +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)
+{
+ if (Miranda_Terminated())
+ return;
+
+ if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1))
+ {
+ POPUPDATAW 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))
+ return;
+ }
+
+ MessageBoxW(NULL, message, caption, MB_OK | flags);
+}
+
+void CToxProto::ShowNotification(const wchar_t *message, int flags, MCONTACT hContact)
+{
+ ShowNotification(TranslateT(MODULE), message, flags, hContact);
+}
+
HANDLE CToxProto::AddDbEvent(MCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, DWORD cbBlob, PBYTE pBlob)
{
DBEVENTINFO dbei = { sizeof(dbei) };
|