summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/msgs.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-10 16:43:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-10 16:43:25 +0000
commit247b795b92ea954f376d029a24b945d45458ab10 (patch)
treedea0fdfbc92dbbf8438e8899eea0b10ef3d6fc34 /plugins/Scriver/src/msgs.cpp
parentc4a4d10f023ced1fdab492f1b92d0aa0a39ebc3b (diff)
typing notification's sounds for Scriver
git-svn-id: http://svn.miranda-ng.org/main/trunk@5636 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Scriver/src/msgs.cpp')
-rw-r--r--plugins/Scriver/src/msgs.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 3f3a01f577..8872f21165 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -207,17 +207,19 @@ static INT_PTR TypingMessageCommand(WPARAM wParam, LPARAM lParam)
static int TypingMessage(WPARAM wParam, LPARAM lParam)
{
- HWND hwnd;
-
- if (!(g_dat.flags2&SMF2_SHOWTYPING))
+ if (!(g_dat.flags2 & SMF2_SHOWTYPING))
return 0;
- if ((hwnd = WindowList_Find(g_dat.hMessageWindowList, (HANDLE)wParam))) {
+
+ SkinPlaySound((lParam) ? "TNStart" : "TNStop");
+
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HANDLE)wParam);
+ if (hwnd)
SendMessage(hwnd, DM_TYPING, 0, lParam);
- } else if ((int) lParam && (g_dat.flags2&SMF2_SHOWTYPINGTRAY)) {
+ else if (lParam && (g_dat.flags2 & SMF2_SHOWTYPINGTRAY)) {
TCHAR szTip[256];
mir_sntprintf(szTip, SIZEOF(szTip), TranslateT("%s is typing a message"), (TCHAR *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, GCDNF_TCHAR));
- if (ServiceExists(MS_CLIST_SYSTRAY_NOTIFY) && !(g_dat.flags2&SMF2_SHOWTYPINGCLIST)) {
+ if ( ServiceExists(MS_CLIST_SYSTRAY_NOTIFY) && !(g_dat.flags2 & SMF2_SHOWTYPINGCLIST)) {
MIRANDASYSTRAYNOTIFY tn;
tn.szProto = NULL;
tn.cbSize = sizeof(tn);
@@ -559,6 +561,9 @@ int OnLoadModule(void)
SkinAddNewSoundEx("RecvMsgInactive", LPGEN("Instant messages"), LPGEN("Incoming (Unfocused Window)"));
SkinAddNewSoundEx("AlertMsg", LPGEN("Instant messages"), LPGEN("Incoming (New Session)"));
SkinAddNewSoundEx("SendMsg", LPGEN("Instant messages"), LPGEN("Outgoing"));
+ SkinAddNewSoundEx("TNStart", LPGEN("Instant messages"), LPGEN("Contact started typing"));
+ SkinAddNewSoundEx("TNStop", LPGEN("Instant messages"), LPGEN("Contact stopped typing"));
+
hCurSplitNS = LoadCursor(NULL, IDC_SIZENS);
hCurSplitWE = LoadCursor(NULL, IDC_SIZEWE);
hCurHyperlinkHand = LoadCursor(NULL, IDC_HAND);