From 57b8bf11164ae575c86b7b739c79d0aa112f28fc Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 10 Oct 2000 09:03:20 +0000 Subject: [PATCH] Now when a saved session is loaded, its name appears in the IDC_SESSEDIT box, so that clicking Save will save over it. Useful for people who want to load, modify, and re-save. Special case: this doesn't apply to Default Settings, because I think people will be more likely to load DS, modify it, and save under a _different_ name, so it's good not to allow a single mouse click to screw them up. git-svn-id: svn://svn.tartarus.org/sgt/putty@698 cda61777-01e9-0310-a592-d414129be87e --- windlg.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/windlg.c b/windlg.c index 57a444b3..7cc1de22 100644 --- a/windlg.c +++ b/windlg.c @@ -1743,14 +1743,16 @@ static int GenericMainDlgProc (HWND hwnd, UINT msg, { int n = SendDlgItemMessage (hwnd, IDC_SESSLIST, LB_GETCURSEL, 0, 0); + int isdef; if (n == LB_ERR) { MessageBeep(0); break; } - load_settings (sessions[n], - !!strcmp(sessions[n], "Default Settings"), - &cfg); + isdef = !strcmp(sessions[n], "Default Settings"); + load_settings (sessions[n], !isdef, &cfg); init_dlg_ctrls(hwnd); + if (!isdef) + SetDlgItemText(hwnd, IDC_SESSEDIT, sessions[n]); } if (LOWORD(wParam) == IDC_SESSLIST) { /* -- 2.11.0