summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_utils.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-06-03 18:39:15 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-06-03 18:39:15 +0000
commit9abbc99874c8558fab7995ef30a05fc40beddd81 (patch)
tree6f014ab837b0c9853b572427833ec27851f09b69 /protocols/Steam/src/steam_utils.cpp
parent4c533c2fd10ff3d0e40ec384f5828c71e8b0e0f8 (diff)
Steam:
- add notifications - add user info updating - minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@9407 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam/src/steam_utils.cpp')
-rw-r--r--protocols/Steam/src/steam_utils.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/protocols/Steam/src/steam_utils.cpp b/protocols/Steam/src/steam_utils.cpp
index 1ac29f593c..1e7d27b3ec 100644
--- a/protocols/Steam/src/steam_utils.cpp
+++ b/protocols/Steam/src/steam_utils.cpp
@@ -143,4 +143,29 @@ HANDLE CSteamProto::AddDBEvent(MCONTACT hContact, WORD type, DWORD timestamp, DW
dbei.flags = flags;
return db_event_add(hContact, &dbei);
+}
+
+void CSteamProto::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("Skype_main");
+
+ if (!PUAddPopupW(&ppd))
+ return;
+ }
+
+ MessageBoxW(NULL, message, caption, MB_OK | flags);
+}
+
+void CSteamProto::ShowNotification(const wchar_t *message, int flags, MCONTACT hContact)
+{
+ ShowNotification(TranslateT(MODULE), message, flags, hContact);
} \ No newline at end of file