summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-10-05 00:31:29 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-10-05 00:31:29 +0000
commit6ec3acedb40bf8f499cbb00e20c2126367c211fc (patch)
tree1053f7381dc622ae24b2577a12a306ac0f011a3b
parentdf1c8cf224cee0c442a9f6b438b2c767326e4059 (diff)
added options page for notifications
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@354 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r--MySpace/MySpace.rc23
-rw-r--r--MySpace/options.cpp44
-rw-r--r--MySpace/resource.h11
-rw-r--r--MySpace/version.h2
4 files changed, 76 insertions, 4 deletions
diff --git a/MySpace/MySpace.rc b/MySpace/MySpace.rc
index ef5592d..9547155 100644
--- a/MySpace/MySpace.rc
+++ b/MySpace/MySpace.rc
@@ -115,6 +115,21 @@ BEGIN
CTEXT "Fill in the box above and click the button to see whether the nick name you have chosen is allowed.",IDC_ST_MSG,95,106,149,42
END
+IDD_OPTNOTIFY DIALOGEX 0, 0, 289, 203
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE | WS_SYSMENU
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ GROUPBOX "Notifications",IDC_STATIC,34,23,223,150
+ CONTROL "Mail",IDC_CHK_NOTIFYMAIL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,55,43,168,10
+ CONTROL "Blog comments",IDC_CHK_NOTIFYBLOGCOMMENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,55,60,168,10
+ CONTROL "Profile comments",IDC_CHK_NOTIFYPROFILECOMMENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,55,77,168,10
+ CONTROL "Friend requests",IDC_CHK_NOTIFYFRIENDREQUESTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,55,94,168,10
+ CONTROL "Picture comments",IDC_CHK_NOTIFYPICTURECOMMENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,55,111,168,10
+ CONTROL "Blog subscription posts",IDC_CHK_NOTIFYBLOGPOSTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,55,128,168,10
+ CONTROL "Unknown messages from server",IDC_CHK_NOTIFYUNKNOWN,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,55,145,168,10
+END
+
/////////////////////////////////////////////////////////////////////////////
//
@@ -131,6 +146,14 @@ BEGIN
TOPMARGIN, 7
BOTTOMMARGIN, 168
END
+
+ IDD_OPTNOTIFY, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 282
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 196
+ END
END
#endif // APSTUDIO_INVOKED
diff --git a/MySpace/options.cpp b/MySpace/options.cpp
index 5b0dae3..ce27f0b 100644
--- a/MySpace/options.cpp
+++ b/MySpace/options.cpp
@@ -74,7 +74,7 @@ void SaveOptions() {
DBWriteContactSettingByte(0, MODULE, "EnableLinkHandling", options.handle_links ? 1 : 0);
}
-BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+BOOL CALLBACK DlgProcOpt1(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
//static HANDLE hItemAll;
switch ( msg ) {
@@ -127,6 +127,42 @@ BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
return 0;
}
+BOOL CALLBACK DlgProcOptNotify(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+ //static HANDLE hItemAll;
+
+ switch ( msg ) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault( hwndDlg );
+ CheckDlgButton(hwndDlg, IDC_CHK_NOTIFYMAIL, DBGetContactSettingByte(0, MODULE, "NotifyMail", 1));
+ CheckDlgButton(hwndDlg, IDC_CHK_NOTIFYBLOGCOMMENTS, DBGetContactSettingByte(0, MODULE, "NotifyBlogComment", 1));
+ CheckDlgButton(hwndDlg, IDC_CHK_NOTIFYPROFILECOMMENTS, DBGetContactSettingByte(0, MODULE, "NotifyProfileComment", 1));
+ CheckDlgButton(hwndDlg, IDC_CHK_NOTIFYFRIENDREQUESTS, DBGetContactSettingByte(0, MODULE, "NotifyFriendRequest", 1));
+ CheckDlgButton(hwndDlg, IDC_CHK_NOTIFYPICTURECOMMENTS, DBGetContactSettingByte(0, MODULE, "NotifyPicComment", 1));
+ CheckDlgButton(hwndDlg, IDC_CHK_NOTIFYBLOGPOSTS, DBGetContactSettingByte(0, MODULE, "NotifyBlogSubscription", 1));
+ CheckDlgButton(hwndDlg, IDC_CHK_NOTIFYUNKNOWN, DBGetContactSettingByte(0, MODULE, "NotifyUnknown", 1));
+ return FALSE;
+ case WM_NOTIFY:
+ switch(((LPNMHDR)lParam)->idFrom) {
+ case 0:
+ switch (((LPNMHDR)lParam)->code)
+ {
+ case PSN_APPLY:
+ DBWriteContactSettingByte(0, MODULE, "NotifyMail", IsDlgButtonChecked(hwndDlg, IDC_CHK_NOTIFYMAIL) ? 1 : 0);
+ DBWriteContactSettingByte(0, MODULE, "NotifyBlogComment", IsDlgButtonChecked(hwndDlg, IDC_CHK_NOTIFYBLOGCOMMENTS) ? 1 : 0);
+ DBWriteContactSettingByte(0, MODULE, "NotifyProfileComment", IsDlgButtonChecked(hwndDlg, IDC_CHK_NOTIFYPROFILECOMMENTS) ? 1 : 0);
+ DBWriteContactSettingByte(0, MODULE, "NotifyFriendRequest", IsDlgButtonChecked(hwndDlg, IDC_CHK_NOTIFYFRIENDREQUESTS) ? 1 : 0);
+ DBWriteContactSettingByte(0, MODULE, "NotifyPicComment", IsDlgButtonChecked(hwndDlg, IDC_CHK_NOTIFYPICTURECOMMENTS) ? 1 : 0);
+ DBWriteContactSettingByte(0, MODULE, "NotifyBlogSubscription", IsDlgButtonChecked(hwndDlg, IDC_CHK_NOTIFYBLOGPOSTS) ? 1 : 0);
+ DBWriteContactSettingByte(0, MODULE, "NotifyUnknown", IsDlgButtonChecked(hwndDlg, IDC_CHK_NOTIFYUNKNOWN) ? 1 : 0);
+ }
+ break;
+ }
+ break;
+ }
+
+ return 0;
+}
+
int OptInit(WPARAM wParam, LPARAM lParam) {
OPTIONSDIALOGPAGE odp = { 0 };
@@ -139,7 +175,11 @@ int OptInit(WPARAM wParam, LPARAM lParam) {
odp.pszTab = Translate("Account");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT1);
- odp.pfnDlgProc = DlgProcOpts;
+ odp.pfnDlgProc = DlgProcOpt1;
+ CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+ odp.pszTab = Translate("Notifications");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTNOTIFY);
+ odp.pfnDlgProc = DlgProcOptNotify;
CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
return 0;
diff --git a/MySpace/resource.h b/MySpace/resource.h
index d5fd912..c13a36b 100644
--- a/MySpace/resource.h
+++ b/MySpace/resource.h
@@ -6,6 +6,7 @@
#define IDD_NICK 121
#define IDI_MYSPACE 122
#define IDI_ZAPS 123
+#define IDD_OPTNOTIFY 125
#define IDC_ED_EMAIL 1001
#define IDC_ED_PW 1002
#define IDC_ED_NICK 1002
@@ -14,12 +15,20 @@
#define IDC_LNK_NEWACCOUNT 1005
#define IDC_CHECK1 1006
#define IDC_CHK_LINKS 1006
+#define IDC_CHK_NOTIFYMAIL 1006
+#define IDC_CHK_NOTIFYBLOGCOMMENTS 1007
+#define IDC_CHK_NOTIFYPROFILECOMMENTS 1008
+#define IDC_CHK_NOTIFYFRIENDREQUESTS 1009
+#define IDC_CHK_NOTIFYPICTURECOMMENTS 1010
+#define IDC_CHK_NOTIFYBLOGPOSTS 1011
+#define IDC_CHECK7 1012
+#define IDC_CHK_NOTIFYUNKNOWN 1012
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 125
+#define _APS_NEXT_RESOURCE_VALUE 126
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1007
#define _APS_NEXT_SYMED_VALUE 101
diff --git a/MySpace/version.h b/MySpace/version.h
index 926e37d..2420811 100644
--- a/MySpace/version.h
+++ b/MySpace/version.h
@@ -5,7 +5,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 0
#define __RELEASE_NUM 5
-#define __BUILD_NUM 16
+#define __BUILD_NUM 17
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM