From 65b709741e177e28dd33fecb924f127a90b0c0ec Mon Sep 17 00:00:00 2001 From: sje Date: Fri, 22 Jun 2007 12:55:27 +0000 Subject: added event timeout to options git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@208 4f64403b-2f21-0410-a795-97e2b3489a10 --- no_history/options.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'no_history/options.cpp') diff --git a/no_history/options.cpp b/no_history/options.cpp index 6f2733f..349a2b0 100644 --- a/no_history/options.cpp +++ b/no_history/options.cpp @@ -128,11 +128,16 @@ static BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l SetAllContactIcons(GetDlgItem(hwndDlg,IDC_LIST)); SetListGroupIcons(GetDlgItem(hwndDlg,IDC_LIST),(HANDLE)SendDlgItemMessage(hwndDlg,IDC_LIST,CLM_GETNEXTITEM,CLGN_ROOT,0),hItemAll,NULL); + SendDlgItemMessage(hwndDlg, IDC_SPN_TIMEOUT, UDM_SETRANGE, 0, (LPARAM)MAKELONG(60 * 60, 1)); + SetDlgItemInt(hwndDlg, IDC_ED_TIMEOUT, event_timeout, FALSE); + return FALSE; case WM_SETFOCUS: SetFocus(GetDlgItem(hwndDlg,IDC_LIST)); break; case WM_COMMAND: + if ( HIWORD( wParam ) == EN_CHANGE && ( HWND )lParam == GetFocus()) + SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); break; case WM_NOTIFY: switch(((LPNMHDR)lParam)->idFrom) { @@ -222,6 +227,14 @@ static BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l } } } while(hContact=(HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0)); + + BOOL trans; + int val = GetDlgItemInt(hwndDlg, IDC_ED_TIMEOUT, &trans, FALSE); + if(trans) { + event_timeout = val; + DBWriteContactSettingDword(0, MODULE, "EventTimeout", event_timeout); + } + return TRUE; } } -- cgit v1.2.3