mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-12 18:13:50 -05:00
Ability to specify a remote command in PuTTY proper
[originally from svn r664]
This commit is contained in:
parent
c1e5815add
commit
e9caa5e3b6
@ -123,6 +123,8 @@
|
||||
#define IDC3_SSHPROT1 1028
|
||||
#define IDC3_SSHPROT2 1029
|
||||
#define IDC3_AGENTFWD 1030
|
||||
#define IDC3_CMDSTATIC 1031
|
||||
#define IDC3_CMDEDIT 1032
|
||||
|
||||
#define IDC4_MBSTATIC 1001
|
||||
#define IDC4_MBWINDOWS 1002
|
||||
|
@ -237,7 +237,7 @@ BEGIN
|
||||
NEXT
|
||||
END
|
||||
|
||||
/* Accelerators used: [aco] 123abdhkmptu */
|
||||
/* Accelerators used: [aco] 123abdhkmprtu */
|
||||
IDD_PANEL35 DIALOG DISCARDABLE 6, 30, 168, 163
|
||||
STYLE WS_CHILD | WS_VISIBLE | NOT WS_BORDER
|
||||
FONT 8, "MS Sans Serif"
|
||||
@ -270,6 +270,9 @@ BEGIN
|
||||
GRID(4,4,24)
|
||||
LTEXT "Public &key file:", IDC3_PKSTATIC, COL(1), SS(3,2)
|
||||
EDITTEXT IDC3_PKEDIT, ADJ(8) COL(1), SS(3,3), ES_AUTOHSCROLL
|
||||
NEXT(2)
|
||||
LTEXT "&Remote command:", IDC3_CMDSTATIC, COL(1), SS(3,2)
|
||||
EDITTEXT IDC3_CMDEDIT, ADJ(8) COL(1), SS(3,3), ES_AUTOHSCROLL
|
||||
GRID(4,12,24)
|
||||
PUSHBUTTON "C&hange...", IDC3_PKBUTTON, ADJ(8) COL(4), SS(1)
|
||||
NEXT
|
||||
|
@ -237,7 +237,7 @@ BEGIN
|
||||
|
||||
END
|
||||
|
||||
/* Accelerators used: [aco] 123abdhkmptu */
|
||||
/* Accelerators used: [aco] 123abdhkmprtu */
|
||||
IDD_PANEL35 DIALOG DISCARDABLE 6, 30, 168, 163
|
||||
STYLE WS_CHILD | WS_VISIBLE | NOT WS_BORDER
|
||||
FONT 8, "MS Sans Serif"
|
||||
@ -271,10 +271,13 @@ BEGIN
|
||||
LTEXT "Public &key file:", IDC3_PKSTATIC, 3, 85, 119, 8
|
||||
EDITTEXT IDC3_PKEDIT, 3, 93, 119, 12, ES_AUTOHSCROLL
|
||||
|
||||
PUSHBUTTON "C&hange...", IDC3_PKBUTTON, 129, 93, 35, 12
|
||||
LTEXT "&Remote command:", IDC3_CMDSTATIC, 3, 111, 119, 8
|
||||
EDITTEXT IDC3_CMDEDIT, 3, 119, 119, 12, ES_AUTOHSCROLL
|
||||
|
||||
PUSHBUTTON "C&hange...", IDC3_PKBUTTON, 129, 119, 35, 12
|
||||
|
||||
|
||||
AUTOCHECKBOX "Allow &agent forwarding", IDC3_AGENTFWD, 3, 109, 162, 8
|
||||
AUTOCHECKBOX "Allow &agent forwarding", IDC3_AGENTFWD, 3, 135, 162, 8
|
||||
END
|
||||
|
||||
/* Accelerators used: [aco] stwx */
|
||||
|
9
windlg.c
9
windlg.c
@ -93,6 +93,7 @@ static void save_settings (char *section, int do_host) {
|
||||
write_setting_i (sesskey, "AuthTIS", cfg.try_tis_auth);
|
||||
write_setting_i (sesskey, "SshProt", cfg.sshprot);
|
||||
write_setting_s (sesskey, "PublicKeyFile", cfg.keyfile);
|
||||
write_setting_s (sesskey, "RemoteCommand", cfg.remote_cmd);
|
||||
write_setting_i (sesskey, "RFCEnviron", cfg.rfc_environ);
|
||||
write_setting_i (sesskey, "BackspaceIsDelete", cfg.bksp_is_delete);
|
||||
write_setting_i (sesskey, "RXVTHomeEnd", cfg.rxvt_homeend);
|
||||
@ -211,6 +212,8 @@ static void load_settings (char *section, int do_host) {
|
||||
gppi (sesskey, "SshProt", 1, &cfg.sshprot);
|
||||
gppi (sesskey, "AuthTIS", 0, &cfg.try_tis_auth);
|
||||
gpps (sesskey, "PublicKeyFile", "", cfg.keyfile, sizeof(cfg.keyfile));
|
||||
gpps (sesskey, "RemoteCommand", "", cfg.remote_cmd,
|
||||
sizeof(cfg.remote_cmd));
|
||||
gppi (sesskey, "RFCEnviron", 0, &cfg.rfc_environ);
|
||||
gppi (sesskey, "BackspaceIsDelete", 1, &cfg.bksp_is_delete);
|
||||
gppi (sesskey, "RXVTHomeEnd", 0, &cfg.rxvt_homeend);
|
||||
@ -996,6 +999,7 @@ static int CALLBACK SshProc (HWND hwnd, UINT msg,
|
||||
cfg.sshprot == 1 ? IDC3_SSHPROT1 : IDC3_SSHPROT2);
|
||||
CheckDlgButton (hwnd, IDC3_AUTHTIS, cfg.try_tis_auth);
|
||||
SetDlgItemText (hwnd, IDC3_PKEDIT, cfg.keyfile);
|
||||
SetDlgItemText (hwnd, IDC3_CMDEDIT, cfg.remote_cmd);
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam)) {
|
||||
@ -1052,6 +1056,11 @@ static int CALLBACK SshProc (HWND hwnd, UINT msg,
|
||||
GetDlgItemText (hwnd, IDC3_PKEDIT, cfg.keyfile,
|
||||
sizeof(cfg.keyfile)-1);
|
||||
break;
|
||||
case IDC3_CMDEDIT:
|
||||
if (HIWORD(wParam) == EN_CHANGE)
|
||||
GetDlgItemText (hwnd, IDC3_CMDEDIT, cfg.remote_cmd,
|
||||
sizeof(cfg.remote_cmd)-1);
|
||||
break;
|
||||
case IDC3_PKBUTTON:
|
||||
/*
|
||||
* FIXME: this crashes. Find out why.
|
||||
|
Loading…
x
Reference in New Issue
Block a user