diff options
-rw-r--r-- | MySpace/MySpace.cpp | 3 | ||||
-rw-r--r-- | MySpace/common.h | 1 | ||||
-rw-r--r-- | MySpace/notifications.cpp | 48 | ||||
-rw-r--r-- | MySpace/notifications.h | 3 | ||||
-rw-r--r-- | MySpace/version.h | 2 |
5 files changed, 56 insertions, 1 deletions
diff --git a/MySpace/MySpace.cpp b/MySpace/MySpace.cpp index 1785be4..f9abd6a 100644 --- a/MySpace/MySpace.cpp +++ b/MySpace/MySpace.cpp @@ -7,6 +7,7 @@ #include "net.h"
#include "menu.h"
#include "arc4.h"
+#include "notifications.h"
///////////////////////////////////////////////
// Common Plugin Stuff
@@ -139,6 +140,7 @@ extern "C" __declspec (dllexport) int Load(PLUGINLINK *link) { }
InitARC4Module();
+ InitNotifications();
InitOptions();
/////////////
@@ -159,6 +161,7 @@ extern "C" __declspec (dllexport) int Unload(void) { DeinitNetlib();
DeinitProto();
DeinitOptions();
+ DeinitNotifications();
DeinitARC4Module();
return 0;
diff --git a/MySpace/common.h b/MySpace/common.h index 138fa5c..65f05d4 100644 --- a/MySpace/common.h +++ b/MySpace/common.h @@ -47,6 +47,7 @@ #include <m_utils.h>
#include <m_langpack.h>
#include <m_idle.h>
+#include <m_skin.h>
#include <m_popup.h>
#include <m_updater.h>
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() {
+}
+
diff --git a/MySpace/notifications.h b/MySpace/notifications.h index eeae6e6..9b14d72 100644 --- a/MySpace/notifications.h +++ b/MySpace/notifications.h @@ -6,5 +6,8 @@ void NotifyBlogComment(); void NotifyProfileComment();
void NotifyFriendRequest();
+void InitNotifications();
+void DeinitNotifications();
+
#endif
diff --git a/MySpace/version.h b/MySpace/version.h index 4ca9e2c..100d794 100644 --- a/MySpace/version.h +++ b/MySpace/version.h @@ -5,7 +5,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 0
#define __RELEASE_NUM 3
-#define __BUILD_NUM 3
+#define __BUILD_NUM 4
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
|