summaryrefslogtreecommitdiff
path: root/message_notify/options.cpp
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-10-30 04:59:55 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-10-30 04:59:55 +0000
commitada33e15355aaf0e222f7aa93063ab1efcdd21a1 (patch)
tree18bb5c8f64486aa98f77651175d3e89bb32eb410 /message_notify/options.cpp
parent24472a77e5cf7619a284134d4eea7da8849b98ad (diff)
fixed to options
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@373 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'message_notify/options.cpp')
-rw-r--r--message_notify/options.cpp35
1 files changed, 18 insertions, 17 deletions
diff --git a/message_notify/options.cpp b/message_notify/options.cpp
index cb2058c..e5ea989 100644
--- a/message_notify/options.cpp
+++ b/message_notify/options.cpp
@@ -3,7 +3,7 @@
Options options;
-static BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
switch ( msg ) {
case WM_INITDIALOG:
@@ -71,15 +71,20 @@ static BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
CheckDlgButton(hwndDlg, IDC_CHK_CLOSE, options.close_win ? TRUE : FALSE);
CheckDlgButton(hwndDlg, IDC_CHK_MSG, options.show_msg ? TRUE : FALSE);
- CheckDlgButton(hwndDlg, IDC_CHK_SPEECH, (options.flags & MNNF_SPEAK));
+ CheckDlgButton(hwndDlg, IDC_CHK_SPEECH, (options.flags & MNNF_SPEAK) ? TRUE : FALSE);
if(options.flags & MNNF_POPUP) {
CheckDlgButton(hwndDlg, IDC_CHK_POPUPS, TRUE);
- HWND hwnd = GetDlgItem(hwndDlg, IDC_CHK_CLOSE);
- EnableWindow(hwndDlg, FALSE);
- hwnd = GetDlgItem(hwndDlg, IDC_CHK_MSG);
- EnableWindow(hwndDlg, FALSE);
} else {
CheckDlgButton(hwndDlg, IDC_CHK_POPUPS, FALSE);
+ HWND hwnd = GetDlgItem(hwndDlg, IDC_CHK_CLOSE);
+ EnableWindow(hwnd, FALSE);
+ hwnd = GetDlgItem(hwndDlg, IDC_CHK_MSG);
+ EnableWindow(hwnd, FALSE);
+ }
+
+ if(!ServiceExists(MS_SPEAK_SAYEX)) {
+ HWND hwnd = GetDlgItem(hwndDlg, IDC_CHK_SPEECH);
+ EnableWindow(hwnd, FALSE);
}
}
@@ -112,9 +117,9 @@ static BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
{
bool checked = IsDlgButtonChecked(hwndDlg, IDC_CHK_POPUPS) ? true : false;
HWND hwnd = GetDlgItem(hwndDlg, IDC_CHK_CLOSE);
- EnableWindow(hwndDlg, checked ? TRUE : FALSE);
+ EnableWindow(hwnd, checked ? TRUE : FALSE);
hwnd = GetDlgItem(hwndDlg, IDC_CHK_MSG);
- EnableWindow(hwndDlg, checked ? TRUE : FALSE);
+ EnableWindow(hwnd, checked ? TRUE : FALSE);
}
SendMessage( GetParent( hwndDlg ), PSM_CHANGED, 0, 0 );
return TRUE;
@@ -174,20 +179,16 @@ static BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
int OptInit(WPARAM wParam,LPARAM lParam)
{
OPTIONSDIALOGPAGE odp = { 0 };
-#define OPTIONPAGE_OLD_SIZE2 60
- //odp.cbSize = sizeof(odp);
- odp.cbSize = OPTIONPAGE_OLD_SIZE2;
- odp.position = -790000000;
+ odp.cbSize = sizeof(odp);
+ odp.flags = ODPF_BOLDGROUPS;
odp.hInstance = hInst;
+ odp.pszGroup = "Popups";
+ odp.pszTitle = MODULE;
+
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.pszTitle = Translate(MODULE);
- odp.pszGroup = Translate("Popups");
- odp.flags = ODPF_BOLDGROUPS;
- odp.nIDBottomSimpleControl = 0;
odp.pfnDlgProc = DlgProcOpts;
CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
-
return 0;
}