int *selitems;
selcount = SendDlgItemMessage(hwnd, IDN_LIST,
LB_GETSELCOUNT, 0, 0);
- selitems = malloc(selcount * sizeof(int));
+ selitems = smalloc(selcount * sizeof(int));
if (selitems) {
int count = SendDlgItemMessage(hwnd, IDN_LIST,
LB_GETSELITEMS,
for (i = 0; i < count; i++)
size += strlen(events[selitems[i]]) + sizeof(sel_nl);
- clipdata = malloc(size);
+ clipdata = smalloc(size);
if (clipdata) {
char *p = clipdata;
for (i = 0; i < count; i++) {
p += sizeof(sel_nl);
}
write_clip(clipdata, size, TRUE);
- free(clipdata);
+ sfree(clipdata);
}
- free(selitems);
+ sfree(selitems);
for (i = 0; i < nevents; i++)
SendDlgItemMessage(hwnd, IDN_LIST, LB_SETSEL,
IDC_AGENTFWD,
IDC_CMDSTATIC,
IDC_CMDEDIT,
+ IDC_COMPRESS,
sshpanelend,
selectionpanelstart,
SetDlgItemText (hwnd, IDC_TTEDIT, cfg.termtype);
SetDlgItemText (hwnd, IDC_LOGEDIT, cfg.username);
CheckDlgButton (hwnd, IDC_NOPTY, cfg.nopty);
+ CheckDlgButton (hwnd, IDC_COMPRESS, cfg.compression);
CheckDlgButton (hwnd, IDC_BUGGYMAC, cfg.buggymac);
CheckDlgButton (hwnd, IDC_AGENTFWD, cfg.agentfwd);
CheckRadioButton (hwnd, IDC_CIPHER3DES, IDC_CIPHERDES,
SendMessage(tvstatic, WM_SETFONT, font, MAKELPARAM(TRUE, 0));
r.left = 3; r.right = r.left + 75;
- r.top = 13; r.bottom = r.top + 196;
+ r.top = 13; r.bottom = r.top + 206;
MapDialogRect(hwnd, &r);
treeview = CreateWindowEx(WS_EX_CLIENTEDGE, WC_TREEVIEW, "",
WS_CHILD | WS_VISIBLE |
beginbox(&cp, "Protocol options",
IDC_BOX_SSH3, IDC_BOXT_SSH3);
checkbox(&cp, "Don't allocate a &pseudo-terminal", IDC_NOPTY);
+ checkbox(&cp, "Enable compr&ession", IDC_COMPRESS);
radioline(&cp, "Preferred SSH protocol version:",
IDC_SSHPROTSTATIC, 2,
"&1", IDC_SSHPROT1, "&2", IDC_SSHPROT2, NULL);
init_dlg_ctrls(hwnd);
if (!isdef)
SetDlgItemText(hwnd, IDC_SESSEDIT, sessions[n]);
+ else
+ SetDlgItemText(hwnd, IDC_SESSEDIT, "");
}
if (LOWORD(wParam) == IDC_SESSLIST) {
/*
HIWORD(wParam) == BN_DOUBLECLICKED)
cfg.nopty = IsDlgButtonChecked (hwnd, IDC_NOPTY);
break;
+ case IDC_COMPRESS:
+ if (HIWORD(wParam) == BN_CLICKED ||
+ HIWORD(wParam) == BN_DOUBLECLICKED)
+ cfg.compression = IsDlgButtonChecked (hwnd, IDC_COMPRESS);
+ break;
case IDC_BUGGYMAC:
if (HIWORD(wParam) == BN_CLICKED ||
HIWORD(wParam) == BN_DOUBLECLICKED)