that you don't end up with twice as many items after clicking Load
git-svn-id: svn://svn.tartarus.org/sgt/putty@697
cda61777-01e9-0310-a592-
d414129be87e
SetDlgItemText (hwnd, IDC_HOST, cfg.host);
SetDlgItemText (hwnd, IDC_SESSEDIT, savedsession);
SetDlgItemInt (hwnd, IDC_PORT, cfg.port, FALSE);
SetDlgItemText (hwnd, IDC_HOST, cfg.host);
SetDlgItemText (hwnd, IDC_SESSEDIT, savedsession);
SetDlgItemInt (hwnd, IDC_PORT, cfg.port, FALSE);
- for (i = 0; i < nsessions; i++)
- SendDlgItemMessage (hwnd, IDC_SESSLIST, LB_ADDSTRING,
- 0, (LPARAM) (sessions[i]));
CheckRadioButton (hwnd, IDC_PROTRAW, IDC_PROTSSH,
cfg.protocol==PROT_SSH ? IDC_PROTSSH :
cfg.protocol==PROT_TELNET ? IDC_PROTTELNET : IDC_PROTRAW );
CheckRadioButton (hwnd, IDC_PROTRAW, IDC_PROTSSH,
cfg.protocol==PROT_SSH ? IDC_PROTSSH :
cfg.protocol==PROT_TELNET ? IDC_PROTTELNET : IDC_PROTRAW );
+ for (i = 0; i < nsessions; i++)
+ SendDlgItemMessage (hwnd, IDC_SESSLIST, LB_ADDSTRING,
+ 0, (LPARAM) (sessions[i]));
/*
* Hide all the controls to start with.
/*
* Hide all the controls to start with.