*i = val;
}
-typedef struct {
- void *posn;
- void *temp;
- char dataspace[2048];
-} DTemplate;
-
static HINSTANCE hinst;
static char **sessions;
static int nsessions;
+static int readytogo;
+
static void save_settings (char *section, int do_host) {
int i;
HKEY subkey1, sesskey;
cfg.protocol==PROT_SSH ? IDC0_PROTSSH : IDC0_PROTTELNET);
CheckDlgButton (hwnd, IDC0_CLOSEEXIT, cfg.close_on_exit);
break;
+ case WM_LBUTTONUP:
+ /*
+ * Button release should trigger WM_OK if there was a
+ * previous double click on the session list.
+ */
+ ReleaseCapture();
+ if (readytogo)
+ SendMessage (GetParent(hwnd), WM_COMMAND, IDOK, 0);
+ break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC0_PROTTELNET:
* Unless it's Default Settings or some other
* host-less set of saved settings.
*/
- if (*cfg.host)
- SendMessage (GetParent(hwnd), WM_COMMAND, IDOK, 0);
+ if (*cfg.host) {
+ readytogo = TRUE;
+ SetCapture(hwnd);
+ }
}
break;
case IDC0_SESSDEL:
return GeneralPanelProc (hwnd, msg, wParam, lParam);
}
-static DTemplate negot, main, reconf, panels[NPANELS];
static DLGPROC panelproc[NPANELS] = {
ConnectionProc, KeyboardProc, TerminalProc,
TelnetProc, SshProc, SelectionProc, ColourProc