summaryrefslogtreecommitdiff
path: root/message_notify
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
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')
-rw-r--r--message_notify/common.h1
-rw-r--r--message_notify/messagenotify.cpp1
-rw-r--r--message_notify/options.cpp35
-rw-r--r--message_notify/resource.h2
-rw-r--r--message_notify/resource.rc8
5 files changed, 23 insertions, 24 deletions
diff --git a/message_notify/common.h b/message_notify/common.h
index a446c6c..cf0be72 100644
--- a/message_notify/common.h
+++ b/message_notify/common.h
@@ -29,6 +29,7 @@
#include <m_updater.h>
#include <m_metacontacts.h>
+#include "m_speak.h"
extern HINSTANCE hInst;
extern PLUGINLINK *pluginLink;
diff --git a/message_notify/messagenotify.cpp b/message_notify/messagenotify.cpp
index 03d88a4..fa29b07 100644
--- a/message_notify/messagenotify.cpp
+++ b/message_notify/messagenotify.cpp
@@ -10,7 +10,6 @@
#include <time.h>
#include "collection.h"
-#include "m_speak.h"
Map<HANDLE, HWND> open_msg_windows;
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;
}
diff --git a/message_notify/resource.h b/message_notify/resource.h
index 83486fc..b969029 100644
--- a/message_notify/resource.h
+++ b/message_notify/resource.h
@@ -14,12 +14,10 @@
#define IDC_CP_TXT 1008
#define IDC_CHK_TABS 1009
#define IDC_CHK_CLOSE 1010
-#define IDC_CHK_CLOSE2 1011
#define IDC_CHK_MSG 1011
#define IDC_LIST1 1012
#define IDC_LST_STATUS 1012
#define IDC_CHK_POPUPS 1013
-#define IDC_CHK_SPEACH 1014
#define IDC_CHK_SPEECH 1014
// Next default values for new objects
diff --git a/message_notify/resource.rc b/message_notify/resource.rc
index 1bfc075..e0bf111 100644
--- a/message_notify/resource.rc
+++ b/message_notify/resource.rc
@@ -60,15 +60,15 @@ BEGIN
CONTROL "Notify if window not open",IDC_RAD_CLOSED,"Button",BS_AUTORADIOBUTTON | WS_GROUP,13,21,132,10
CONTROL "Notify if window isn't 'foreground'",IDC_RAD_NFORE,
"Button",BS_AUTORADIOBUTTON,13,41,132,10
- CONTROL "Notify always",IDC_RAD_ALWAYS,"Button",BS_AUTORADIOBUTTON,13,77,132,10
CONTROL "Consider tabs",IDC_CHK_TABS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,29,57,112,10
- CONTROL "Close window on right click",IDC_CHK_CLOSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,40,129,132,10
+ CONTROL "Notify always",IDC_RAD_ALWAYS,"Button",BS_AUTORADIOBUTTON,13,77,132,10
GROUPBOX "Disable when",IDC_STATIC,155,7,107,94
CONTROL "",IDC_LST_STATUS,"SysListView32",LVS_REPORT | LVS_NOLABELWRAP | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_TABSTOP,159,17,99,80,WS_EX_CLIENTEDGE
- CONTROL "Include message text",IDC_CHK_MSG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,40,142,132,10
GROUPBOX "Notification Types",IDC_STATIC,7,103,255,71
CONTROL "Popups",IDC_CHK_POPUPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,116,104,10
- CONTROL "Speech",IDC_CHK_SPEECH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,154,104,10
+ CONTROL "Include message text",IDC_CHK_MSG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,40,142,132,10
+ CONTROL "Close window on right click",IDC_CHK_CLOSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,40,129,132,10
+ CONTROL "Speech",IDC_CHK_SPEECH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,156,104,10
END