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/NoHistory.mdsp | 6 +++--- no_history/NoHistory.rc | 24 ++++++++++++++---------- no_history/options.cpp | 13 +++++++++++++ no_history/private.h | 4 ++-- no_history/resource.h | 5 ++++- 5 files changed, 36 insertions(+), 16 deletions(-) diff --git a/no_history/NoHistory.mdsp b/no_history/NoHistory.mdsp index 481aebb..81baa2e 100644 --- a/no_history/NoHistory.mdsp +++ b/no_history/NoHistory.mdsp @@ -95,8 +95,8 @@ extraResourceOptions= 1=resource.rc [Other] [History] -options.cpp,8160 +private.h,701 common.h,481 -..\..\protocols\sametime_meanwhile\sametime\sametime.cpp,21164 dllmain.cpp,0 -private.h,278 +..\tipper\options.cpp,37918 +options.cpp,5229 diff --git a/no_history/NoHistory.rc b/no_history/NoHistory.rc index 2753283..b9c8d8b 100644 --- a/no_history/NoHistory.rc +++ b/no_history/NoHistory.rc @@ -7,8 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" - +#include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -57,12 +56,12 @@ END 3 TEXTINCLUDE BEGIN - "\r\n" + "\r\0" END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#include ""afxres.h""\r\0" END #endif // APSTUDIO_INVOKED @@ -78,10 +77,14 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE | WS_SYSMENU FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN CONTROL "Custom1",IDC_LIST,"CListControl",WS_TABSTOP | 0x1d0,7,7,298,177,WS_EX_CLIENTEDGE - ICON IDI_HKEEP,IDC_PIC_KEEP,8,203,12,12 - LTEXT "Keep history for this contact",IDC_STATIC,26,205,279,8,SS_NOPREFIX | SS_CENTERIMAGE - ICON IDI_HREMOVE,IDC_PIC_REMOVE,8,218,12,12 - LTEXT "Disable history for this contact",IDC_STATIC,26,220,279,8,SS_NOPREFIX | SS_CENTERIMAGE + ICON IDI_HKEEP,IDC_PIC_KEEP,8,203,20,20 + LTEXT "Keep history for this contact",IDC_STATIC,42,204,136,8,SS_NOPREFIX | SS_CENTERIMAGE + ICON IDI_HREMOVE,IDC_PIC_REMOVE,8,218,21,20 + LTEXT "Disable history for this contact",IDC_STATIC,42,220,136,8,SS_NOPREFIX | SS_CENTERIMAGE + LTEXT "Delete after",IDC_STATIC,177,204,61,8 + LTEXT "secs",IDC_STATIC,283,204,21,8 + EDITTEXT IDC_ED_TIMEOUT,239,202,30,12,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPN_TIMEOUT,"msctls_updown32",UDS_SETBUDDYINT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,269,202,10,13 END @@ -99,8 +102,10 @@ BEGIN RIGHTMARGIN, 305 VERTGUIDE, 42 VERTGUIDE, 49 + VERTGUIDE, 177 TOPMARGIN, 7 BOTTOMMARGIN, 228 + HORZGUIDE, 212 END END #endif // APSTUDIO_INVOKED @@ -115,8 +120,7 @@ END // // Generated from the TEXTINCLUDE 3 resource. // - - + ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED 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; } } diff --git a/no_history/private.h b/no_history/private.h index f78e5bc..497a017 100644 --- a/no_history/private.h +++ b/no_history/private.h @@ -4,8 +4,8 @@ /* VERSION DEFINITIONS */ #define VER_MAJOR 0 #define VER_MINOR 1 -#define VER_RELEASE 0 -#define VER_BUILD 2 +#define VER_RELEASE 1 +#define VER_BUILD 0 #define __STRINGIZE(x) #x #define VER_STRING __STRINGIZE( VER_MAJOR.VER_MINOR.VER_RELEASE.VER_BUILD ) diff --git a/no_history/resource.h b/no_history/resource.h index 2361f87..5640d91 100644 --- a/no_history/resource.h +++ b/no_history/resource.h @@ -10,6 +10,9 @@ #define IDC_PIC_KEEP 1001 #define IDC_PIC_REMOVE 1002 #define IDC_BUTTON1 1003 +#define IDC_ED_TIMEOUT 1004 +#define IDC_SPIN1 1005 +#define IDC_SPN_TIMEOUT 1005 // Next default values for new objects // @@ -17,7 +20,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 104 #define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1004 +#define _APS_NEXT_CONTROL_VALUE 1006 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif -- cgit v1.2.3