projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update copyright dates to 2001 :-)
[u/mdw/putty]
/
windlg.c
diff --git
a/windlg.c
b/windlg.c
index
84674a7
..
f164f3e
100644
(file)
--- a/
windlg.c
+++ b/
windlg.c
@@
-3,6
+3,7
@@
#include <commdlg.h>
#include <stdio.h>
#include <stdlib.h>
#include <commdlg.h>
#include <stdio.h>
#include <stdlib.h>
+#include <ctype.h>
#include "ssh.h"
#include "putty.h"
#include "ssh.h"
#include "putty.h"
@@
-203,6
+204,9
@@
enum { IDCX_ABOUT = IDC_ABOUT, IDCX_TVSTATIC, IDCX_TREEVIEW, controlstartvalue,
IDC_SESSSAVE,
IDC_SESSDEL,
IDC_CLOSEEXIT,
IDC_SESSSAVE,
IDC_SESSDEL,
IDC_CLOSEEXIT,
+ IDC_COEALWAYS,
+ IDC_COENEVER,
+ IDC_COENORMAL,
sessionpanelend,
loggingpanelstart,
sessionpanelend,
loggingpanelstart,
@@
-536,7
+540,9
@@
static void init_dlg_ctrls(HWND hwnd) {
CheckDlgButton (hwnd, IDC_BLINKCUR, cfg.blink_cur);
CheckDlgButton (hwnd, IDC_SCROLLBAR, cfg.scrollbar);
CheckDlgButton (hwnd, IDC_LOCKSIZE, cfg.locksize);
CheckDlgButton (hwnd, IDC_BLINKCUR, cfg.blink_cur);
CheckDlgButton (hwnd, IDC_SCROLLBAR, cfg.scrollbar);
CheckDlgButton (hwnd, IDC_LOCKSIZE, cfg.locksize);
- CheckDlgButton (hwnd, IDC_CLOSEEXIT, cfg.close_on_exit);
+ CheckRadioButton (hwnd, IDC_COEALWAYS, IDC_COENORMAL,
+ cfg.close_on_exit==COE_NORMAL ? IDC_COENORMAL :
+ cfg.close_on_exit==COE_NEVER ? IDC_COENEVER : IDC_COEALWAYS);
CheckDlgButton (hwnd, IDC_CLOSEWARN, cfg.warn_on_close);
SetDlgItemText (hwnd, IDC_TTEDIT, cfg.termtype);
CheckDlgButton (hwnd, IDC_CLOSEWARN, cfg.warn_on_close);
SetDlgItemText (hwnd, IDC_TTEDIT, cfg.termtype);
@@
-658,7
+664,7
@@
static HTREEITEM treeview_insert(struct treeview_faff *faff,
*/
static void create_controls(HWND hwnd, int dlgtype, int panel) {
if (panel == sessionpanelstart) {
*/
static void create_controls(HWND hwnd, int dlgtype, int panel) {
if (panel == sessionpanelstart) {
- /* The Session panel. Accelerators used: [acgo] nprtih elsd
x
*/
+ /* The Session panel. Accelerators used: [acgo] nprtih elsd
w
*/
struct ctlpos cp;
ctlposinit(&cp, hwnd, 80, 3, 13);
bartitle(&cp, "Basic options for your PuTTY session",
struct ctlpos cp;
ctlposinit(&cp, hwnd, 80, 3, 13);
bartitle(&cp, "Basic options for your PuTTY session",
@@
-698,7
+704,10
@@
static void create_controls(HWND hwnd, int dlgtype, int panel) {
endbox(&cp);
}
beginbox(&cp, NULL, IDC_BOX_SESSION3);
endbox(&cp);
}
beginbox(&cp, NULL, IDC_BOX_SESSION3);
- checkbox(&cp, "Close Window on E&xit", IDC_CLOSEEXIT);
+ radioline(&cp, "Close &window on exit:", IDC_CLOSEEXIT, 4,
+ "Always", IDC_COEALWAYS,
+ "Never", IDC_COENEVER,
+ "Only on clean exit", IDC_COENORMAL, NULL);
endbox(&cp);
}
endbox(&cp);
}
@@
-1595,11
+1604,16
@@
static int GenericMainDlgProc (HWND hwnd, UINT msg,
GetDlgItemText (hwnd, IDC_WINEDIT, cfg.wintitle,
sizeof(cfg.wintitle)-1);
break;
GetDlgItemText (hwnd, IDC_WINEDIT, cfg.wintitle,
sizeof(cfg.wintitle)-1);
break;
- case IDC_CLOSEEXIT:
- if (HIWORD(wParam) == BN_CLICKED ||
- HIWORD(wParam) == BN_DOUBLECLICKED)
- cfg.close_on_exit = IsDlgButtonChecked (hwnd, IDC_CLOSEEXIT);
- break;
+ case IDC_COEALWAYS:
+ case IDC_COENEVER:
+ case IDC_COENORMAL:
+ if (HIWORD(wParam) == BN_CLICKED ||
+ HIWORD(wParam) == BN_DOUBLECLICKED) {
+ cfg.close_on_exit = IsDlgButtonChecked (hwnd, IDC_COEALWAYS) ? COE_ALWAYS :
+ IsDlgButtonChecked (hwnd, IDC_COENEVER) ? COE_NEVER :
+ COE_NORMAL;
+ }
+ break;
case IDC_CLOSEWARN:
if (HIWORD(wParam) == BN_CLICKED ||
HIWORD(wParam) == BN_DOUBLECLICKED)
case IDC_CLOSEWARN:
if (HIWORD(wParam) == BN_CLICKED ||
HIWORD(wParam) == BN_DOUBLECLICKED)
@@
-1968,8
+1982,6
@@
static int GenericMainDlgProc (HWND hwnd, UINT msg,
static int CALLBACK MainDlgProc (HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam) {
static int CALLBACK MainDlgProc (HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam) {
- static HWND page = NULL;
-
if (msg == WM_COMMAND && LOWORD(wParam) == IDOK) {
}
if (msg == WM_COMMAND && LOWORD(wParam) == IDCX_ABOUT) {
if (msg == WM_COMMAND && LOWORD(wParam) == IDOK) {
}
if (msg == WM_COMMAND && LOWORD(wParam) == IDCX_ABOUT) {
@@
-1984,7
+1996,6
@@
static int CALLBACK MainDlgProc (HWND hwnd, UINT msg,
static int CALLBACK ReconfDlgProc (HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam) {
static int CALLBACK ReconfDlgProc (HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam) {
- static HWND page;
return GenericMainDlgProc (hwnd, msg, wParam, lParam, 1);
}
return GenericMainDlgProc (hwnd, msg, wParam, lParam, 1);
}