1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-16 03:53:01 -05:00

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.

[originally from svn r698]
This commit is contained in:
Simon Tatham 2000-10-10 09:03:20 +00:00
parent ef5965e430
commit 6b620323e0

View File

@ -1743,14 +1743,16 @@ static int GenericMainDlgProc (HWND hwnd, UINT msg,
{ {
int n = SendDlgItemMessage (hwnd, IDC_SESSLIST, int n = SendDlgItemMessage (hwnd, IDC_SESSLIST,
LB_GETCURSEL, 0, 0); LB_GETCURSEL, 0, 0);
int isdef;
if (n == LB_ERR) { if (n == LB_ERR) {
MessageBeep(0); MessageBeep(0);
break; break;
} }
load_settings (sessions[n], isdef = !strcmp(sessions[n], "Default Settings");
!!strcmp(sessions[n], "Default Settings"), load_settings (sessions[n], !isdef, &cfg);
&cfg);
init_dlg_ctrls(hwnd); init_dlg_ctrls(hwnd);
if (!isdef)
SetDlgItemText(hwnd, IDC_SESSEDIT, sessions[n]);
} }
if (LOWORD(wParam) == IDC_SESSLIST) { if (LOWORD(wParam) == IDC_SESSLIST) {
/* /*