mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-16 03:53:01 -05:00
Improve the tab order in the Tunnels box: the `Add' button should
happen _after_ all the controls that set up the forwarding, since that's the obvious order you'd want to use them in. [originally from svn r2346]
This commit is contained in:
parent
99b870dbc6
commit
297e5d8e45
23
winctrls.c
23
winctrls.c
@ -1139,14 +1139,17 @@ void progressbar(struct ctlpos *cp, int id)
|
|||||||
* Another special control: the forwarding options setter. First a
|
* Another special control: the forwarding options setter. First a
|
||||||
* list box; next a static header line, introducing a pair of edit
|
* list box; next a static header line, introducing a pair of edit
|
||||||
* boxes with associated statics, another button, and a radio
|
* boxes with associated statics, another button, and a radio
|
||||||
* button pair.
|
* button pair. Then we have a bareradioline, which is included in
|
||||||
|
* this control group because it belongs before the `Add' button in
|
||||||
|
* the tab order.
|
||||||
*/
|
*/
|
||||||
void fwdsetter(struct ctlpos *cp, int listid, char *stext, int sid,
|
void fwdsetter(struct ctlpos *cp, int listid, char *stext, int sid,
|
||||||
char *e1stext, int e1sid, int e1id,
|
char *e1stext, int e1sid, int e1id,
|
||||||
char *e2stext, int e2sid, int e2id,
|
char *e2stext, int e2sid, int e2id,
|
||||||
char *btext, int bid)
|
char *btext, int bid,
|
||||||
|
char *r1text, int r1id, char *r2text, int r2id)
|
||||||
{
|
{
|
||||||
RECT r;
|
RECT r, button_r;
|
||||||
const int height = (STATICHEIGHT > EDITHEIGHT
|
const int height = (STATICHEIGHT > EDITHEIGHT
|
||||||
&& STATICHEIGHT >
|
&& STATICHEIGHT >
|
||||||
PUSHBTNHEIGHT ? STATICHEIGHT : EDITHEIGHT >
|
PUSHBTNHEIGHT ? STATICHEIGHT : EDITHEIGHT >
|
||||||
@ -1195,11 +1198,19 @@ void fwdsetter(struct ctlpos *cp, int listid, char *stext, int sid,
|
|||||||
WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL,
|
WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL,
|
||||||
WS_EX_CLIENTEDGE, "", j == 0 ? e1id : e2id);
|
WS_EX_CLIENTEDGE, "", j == 0 ? e1id : e2id);
|
||||||
} else if (i == 3) {
|
} else if (i == 3) {
|
||||||
doctl(cp, r, "BUTTON",
|
/*
|
||||||
WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON,
|
* We postpone creation of the button until we've
|
||||||
0, btext, bid);
|
* done everything else, since it belongs last in
|
||||||
|
* the tab order.
|
||||||
|
*/
|
||||||
|
button_r = r; /* structure copy */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cp->ypos += height + GAPWITHIN;
|
cp->ypos += height + GAPWITHIN;
|
||||||
}
|
}
|
||||||
|
bareradioline(cp, 2, r1text, r1id, r2text, r2id, NULL);
|
||||||
|
/* Create the postponed button. */
|
||||||
|
doctl(cp, button_r, "BUTTON",
|
||||||
|
WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON,
|
||||||
|
0, btext, bid);
|
||||||
}
|
}
|
||||||
|
7
windlg.c
7
windlg.c
@ -2037,10 +2037,9 @@ static void create_controls(HWND hwnd, int dlgtype, int panel)
|
|||||||
"Add new forwarded port:", IDC_PFWDSTATIC2,
|
"Add new forwarded port:", IDC_PFWDSTATIC2,
|
||||||
"&Source port", IDC_SPORTSTATIC, IDC_SPORTEDIT,
|
"&Source port", IDC_SPORTSTATIC, IDC_SPORTEDIT,
|
||||||
"Dest&ination", IDC_DPORTSTATIC, IDC_DPORTEDIT,
|
"Dest&ination", IDC_DPORTSTATIC, IDC_DPORTEDIT,
|
||||||
"A&dd", IDC_PFWDADD);
|
"A&dd", IDC_PFWDADD,
|
||||||
bareradioline(&cp, 2,
|
"&Local", IDC_PFWDLOCAL,
|
||||||
"&Local", IDC_PFWDLOCAL,
|
"Re&mote", IDC_PFWDREMOTE);
|
||||||
"Re&mote", IDC_PFWDREMOTE, NULL);
|
|
||||||
endbox(&cp);
|
endbox(&cp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -170,7 +170,8 @@ void progressbar(struct ctlpos *cp, int id);
|
|||||||
void fwdsetter(struct ctlpos *cp, int listid, char *stext, int sid,
|
void fwdsetter(struct ctlpos *cp, int listid, char *stext, int sid,
|
||||||
char *e1stext, int e1sid, int e1id,
|
char *e1stext, int e1sid, int e1id,
|
||||||
char *e2stext, int e2sid, int e2id,
|
char *e2stext, int e2sid, int e2id,
|
||||||
char *btext, int bid);
|
char *btext, int bid,
|
||||||
|
char *r1text, int r1id, char *r2text, int r2id);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Exports from windlg.c.
|
* Exports from windlg.c.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user