From 68368a3478231511990298a666289c920319206e Mon Sep 17 00:00:00 2001 From: sje Date: Mon, 9 Jul 2007 13:44:27 +0000 Subject: added sounds for notification events git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@261 4f64403b-2f21-0410-a795-97e2b3489a10 --- MySpace/notifications.cpp | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'MySpace/notifications.cpp') diff --git a/MySpace/notifications.cpp b/MySpace/notifications.cpp index 3e01416..d0e46c0 100644 --- a/MySpace/notifications.cpp +++ b/MySpace/notifications.cpp @@ -56,6 +56,10 @@ void NotifyMail() { ppd.iSeconds = -1; PUAddPopUpT(&ppd); + + char temp[512]; + mir_snprintf(temp, 512, "%s/Mail", MODULE); + SkinPlaySound(temp); } @@ -109,6 +113,10 @@ void NotifyBlogComment() { ppd.iSeconds = -1; PUAddPopUpT(&ppd); + + char temp[512]; + mir_snprintf(temp, 512, "%s/BlogComment", MODULE); + SkinPlaySound(temp); } LRESULT CALLBACK ProfileCommentPopupWindowProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam ) @@ -165,6 +173,10 @@ void NotifyProfileComment() { ppd.iSeconds = -1; PUAddPopUpT(&ppd); + + char temp[512]; + mir_snprintf(temp, 512, "%s/ProfileComment", MODULE); + SkinPlaySound(temp); } LRESULT CALLBACK FriendRequestPopupWindowProc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam ) @@ -217,4 +229,40 @@ void NotifyFriendRequest() { ppd.iSeconds = -1; PUAddPopUpT(&ppd); + + char temp[512]; + mir_snprintf(temp, 512, "%s/FriendRequest", MODULE); + SkinPlaySound(temp); } + +void InitNotifications() { + SKINSOUNDDESCEX sd = {0}; + sd.cbSize = sizeof(sd); + char temp[512]; + mir_snprintf(temp, 512, "%s Notifications", MODULE); + sd.pszSection = temp; + + mir_snprintf(temp, 512, "%s/Mail", MODULE); + sd.pszName = temp; + sd.pszDescription = "Mail"; + CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&sd); + + mir_snprintf(temp, 512, "%s/BlogComment", MODULE); + sd.pszName = temp; + sd.pszDescription = "New blog comment"; + CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&sd); + + mir_snprintf(temp, 512, "%s/ProfileComment", MODULE); + sd.pszName = temp; + sd.pszDescription = "New profile comment"; + CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&sd); + + mir_snprintf(temp, 512, "%s/FriendRequest", MODULE); + sd.pszName = temp; + sd.pszDescription = "New friend request"; + CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&sd); +} + +void DeinitNotifications() { +} + -- cgit v1.2.3