mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-16 03:53:01 -05:00
Add the Appearance panel and reorganise things a bit
[originally from svn r757]
This commit is contained in:
parent
372a4e1e7e
commit
ea0d42801a
101
windlg.c
101
windlg.c
@ -228,18 +228,8 @@ enum { IDCX_ABOUT = IDC_ABOUT, IDCX_TVSTATIC, IDCX_TREEVIEW, controlstartvalue,
|
|||||||
terminalpanelstart,
|
terminalpanelstart,
|
||||||
IDC_TITLE_TERMINAL,
|
IDC_TITLE_TERMINAL,
|
||||||
IDC_BOX_TERMINAL1, IDC_BOXT_TERMINAL1,
|
IDC_BOX_TERMINAL1, IDC_BOXT_TERMINAL1,
|
||||||
IDC_BOX_TERMINAL2, IDC_BOXT_TERMINAL2,
|
|
||||||
IDC_BOX_TERMINAL3, IDC_BOXT_TERMINAL3,
|
|
||||||
IDC_WRAPMODE,
|
IDC_WRAPMODE,
|
||||||
IDC_DECOM,
|
IDC_DECOM,
|
||||||
IDC_DIMSTATIC,
|
|
||||||
IDC_ROWSSTATIC,
|
|
||||||
IDC_ROWSEDIT,
|
|
||||||
IDC_COLSSTATIC,
|
|
||||||
IDC_COLSEDIT,
|
|
||||||
IDC_LOCKSIZE,
|
|
||||||
IDC_FONTSTATIC,
|
|
||||||
IDC_CHOOSEFONT,
|
|
||||||
IDC_LFHASCR,
|
IDC_LFHASCR,
|
||||||
IDC_BEEP,
|
IDC_BEEP,
|
||||||
IDC_BCE,
|
IDC_BCE,
|
||||||
@ -251,13 +241,13 @@ enum { IDCX_ABOUT = IDC_ABOUT, IDCX_TVSTATIC, IDCX_TREEVIEW, controlstartvalue,
|
|||||||
IDC_TITLE_WINDOW,
|
IDC_TITLE_WINDOW,
|
||||||
IDC_BOX_WINDOW1, IDC_BOXT_WINDOW1,
|
IDC_BOX_WINDOW1, IDC_BOXT_WINDOW1,
|
||||||
IDC_BOX_WINDOW2, IDC_BOXT_WINDOW2,
|
IDC_BOX_WINDOW2, IDC_BOXT_WINDOW2,
|
||||||
IDC_BOX_WINDOW3, IDC_BOXT_WINDOW3,
|
IDC_BOX_WINDOW3,
|
||||||
IDC_BOX_WINDOW4,
|
IDC_ROWSSTATIC,
|
||||||
IDC_WINNAME,
|
IDC_ROWSEDIT,
|
||||||
IDC_BLINKCUR,
|
IDC_COLSSTATIC,
|
||||||
|
IDC_COLSEDIT,
|
||||||
|
IDC_LOCKSIZE,
|
||||||
IDC_SCROLLBAR,
|
IDC_SCROLLBAR,
|
||||||
IDC_WINTITLE,
|
|
||||||
IDC_WINEDIT,
|
|
||||||
IDC_CLOSEWARN,
|
IDC_CLOSEWARN,
|
||||||
IDC_SAVESTATIC,
|
IDC_SAVESTATIC,
|
||||||
IDC_SAVEEDIT,
|
IDC_SAVEEDIT,
|
||||||
@ -268,6 +258,19 @@ enum { IDCX_ABOUT = IDC_ABOUT, IDCX_TVSTATIC, IDCX_TREEVIEW, controlstartvalue,
|
|||||||
IDC_SCROLLDISP,
|
IDC_SCROLLDISP,
|
||||||
windowpanelend,
|
windowpanelend,
|
||||||
|
|
||||||
|
appearancepanelstart,
|
||||||
|
IDC_TITLE_APPEARANCE,
|
||||||
|
IDC_BOX_APPEARANCE1, IDC_BOXT_APPEARANCE1,
|
||||||
|
IDC_BOX_APPEARANCE2, IDC_BOXT_APPEARANCE2,
|
||||||
|
IDC_BOX_APPEARANCE3, IDC_BOXT_APPEARANCE3,
|
||||||
|
IDC_BLINKCUR,
|
||||||
|
IDC_FONTSTATIC,
|
||||||
|
IDC_CHOOSEFONT,
|
||||||
|
IDC_WINTITLE,
|
||||||
|
IDC_WINEDIT,
|
||||||
|
IDC_WINNAME,
|
||||||
|
appearancepanelend,
|
||||||
|
|
||||||
connectionpanelstart,
|
connectionpanelstart,
|
||||||
IDC_TITLE_CONNECTION,
|
IDC_TITLE_CONNECTION,
|
||||||
IDC_BOX_CONNECTION1, IDC_BOXT_CONNECTION1,
|
IDC_BOX_CONNECTION1, IDC_BOXT_CONNECTION1,
|
||||||
@ -687,26 +690,14 @@ static int GenericMainDlgProc (HWND hwnd, UINT msg,
|
|||||||
hsession = treeview_insert(&tvfaff, 0, "Session");
|
hsession = treeview_insert(&tvfaff, 0, "Session");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The Terminal panel. Accelerators used: [acgo] rmkh&dlbenu */
|
/* The Terminal panel. Accelerators used: [acgo] &dlbenu */
|
||||||
{
|
{
|
||||||
struct ctlpos cp;
|
struct ctlpos cp;
|
||||||
ctlposinit(&cp, hwnd, 80, 3, 13);
|
ctlposinit(&cp, hwnd, 80, 3, 13);
|
||||||
bartitle(&cp, "Options controlling the terminal emulation",
|
bartitle(&cp, "Options controlling the terminal emulation",
|
||||||
IDC_TITLE_TERMINAL);
|
IDC_TITLE_TERMINAL);
|
||||||
beginbox(&cp, "Set the size of the terminal window",
|
|
||||||
IDC_BOX_TERMINAL1, IDC_BOXT_TERMINAL1);
|
|
||||||
multiedit(&cp,
|
|
||||||
"&Rows", IDC_ROWSSTATIC, IDC_ROWSEDIT, 50,
|
|
||||||
"Colu&mns", IDC_COLSSTATIC, IDC_COLSEDIT, 50,
|
|
||||||
NULL);
|
|
||||||
checkbox(&cp, "Loc&k window size against resizing", IDC_LOCKSIZE);
|
|
||||||
endbox(&cp);
|
|
||||||
beginbox(&cp, "Set the font used in the terminal window",
|
|
||||||
IDC_BOX_TERMINAL2, IDC_BOXT_TERMINAL2);
|
|
||||||
staticbtn(&cp, "", IDC_FONTSTATIC, "C&hange...", IDC_CHOOSEFONT);
|
|
||||||
endbox(&cp);
|
|
||||||
beginbox(&cp, "Set various terminal options",
|
beginbox(&cp, "Set various terminal options",
|
||||||
IDC_BOX_TERMINAL3, IDC_BOXT_TERMINAL3);
|
IDC_BOX_TERMINAL1, IDC_BOXT_TERMINAL1);
|
||||||
checkbox(&cp, "Auto &wrap mode initially on", IDC_WRAPMODE);
|
checkbox(&cp, "Auto &wrap mode initially on", IDC_WRAPMODE);
|
||||||
checkbox(&cp, "&DEC Origin Mode initially on", IDC_DECOM);
|
checkbox(&cp, "&DEC Origin Mode initially on", IDC_DECOM);
|
||||||
checkbox(&cp, "Implicit CR in every &LF", IDC_LFHASCR);
|
checkbox(&cp, "Implicit CR in every &LF", IDC_LFHASCR);
|
||||||
@ -758,26 +749,22 @@ static int GenericMainDlgProc (HWND hwnd, UINT msg,
|
|||||||
treeview_insert(&tvfaff, 1, "Keyboard");
|
treeview_insert(&tvfaff, 1, "Keyboard");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The Window panel. Accelerators used: [acgo] tibsdkw4ylp */
|
/* The Window panel. Accelerators used: [acgo] bsdkw4ylp */
|
||||||
{
|
{
|
||||||
struct ctlpos cp;
|
struct ctlpos cp;
|
||||||
ctlposinit(&cp, hwnd, 80, 3, 13);
|
ctlposinit(&cp, hwnd, 80, 3, 13);
|
||||||
bartitle(&cp, "Options controlling PuTTY's window",
|
bartitle(&cp, "Options controlling PuTTY's window",
|
||||||
IDC_TITLE_WINDOW);
|
IDC_TITLE_WINDOW);
|
||||||
beginbox(&cp, "Adjust the use of the window title",
|
beginbox(&cp, "Set the size of the window",
|
||||||
IDC_BOX_WINDOW1, IDC_BOXT_WINDOW1);
|
IDC_BOX_WINDOW1, IDC_BOXT_WINDOW1);
|
||||||
if (dlgtype == 0)
|
multiedit(&cp,
|
||||||
multiedit(&cp,
|
"&Rows", IDC_ROWSSTATIC, IDC_ROWSEDIT, 50,
|
||||||
"Initial window &title:", IDC_WINTITLE,
|
"Colu&mns", IDC_COLSSTATIC, IDC_COLSEDIT, 50,
|
||||||
IDC_WINEDIT, 100, NULL);
|
NULL);
|
||||||
checkbox(&cp, "Avoid ever using &icon title", IDC_WINNAME);
|
checkbox(&cp, "Loc&k window size against resizing", IDC_LOCKSIZE);
|
||||||
endbox(&cp);
|
|
||||||
beginbox(&cp, "Adjust the use of the cursor",
|
|
||||||
IDC_BOX_WINDOW2, IDC_BOXT_WINDOW2);
|
|
||||||
checkbox(&cp, "Cursor &blinks", IDC_BLINKCUR);
|
|
||||||
endbox(&cp);
|
endbox(&cp);
|
||||||
beginbox(&cp, "Control the scrollback in the window",
|
beginbox(&cp, "Control the scrollback in the window",
|
||||||
IDC_BOX_WINDOW3, IDC_BOXT_WINDOW3);
|
IDC_BOX_WINDOW2, IDC_BOXT_WINDOW2);
|
||||||
staticedit(&cp, "Lines of &scrollback",
|
staticedit(&cp, "Lines of &scrollback",
|
||||||
IDC_SAVESTATIC, IDC_SAVEEDIT, 50);
|
IDC_SAVESTATIC, IDC_SAVEEDIT, 50);
|
||||||
checkbox(&cp, "&Display scrollbar", IDC_SCROLLBAR);
|
checkbox(&cp, "&Display scrollbar", IDC_SCROLLBAR);
|
||||||
@ -785,7 +772,7 @@ static int GenericMainDlgProc (HWND hwnd, UINT msg,
|
|||||||
checkbox(&cp, "Reset scrollback on dis&play activity",
|
checkbox(&cp, "Reset scrollback on dis&play activity",
|
||||||
IDC_SCROLLDISP);
|
IDC_SCROLLDISP);
|
||||||
endbox(&cp);
|
endbox(&cp);
|
||||||
beginbox(&cp, NULL, IDC_BOX_WINDOW4, 0);
|
beginbox(&cp, NULL, IDC_BOX_WINDOW3, 0);
|
||||||
checkbox(&cp, "&Warn before closing window", IDC_CLOSEWARN);
|
checkbox(&cp, "&Warn before closing window", IDC_CLOSEWARN);
|
||||||
checkbox(&cp, "Window closes on ALT-F&4", IDC_ALTF4);
|
checkbox(&cp, "Window closes on ALT-F&4", IDC_ALTF4);
|
||||||
checkbox(&cp, "S&ystem menu appears on ALT-Space", IDC_ALTSPACE);
|
checkbox(&cp, "S&ystem menu appears on ALT-Space", IDC_ALTSPACE);
|
||||||
@ -795,6 +782,32 @@ static int GenericMainDlgProc (HWND hwnd, UINT msg,
|
|||||||
treeview_insert(&tvfaff, 0, "Window");
|
treeview_insert(&tvfaff, 0, "Window");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The Appearance panel. Accelerators used: [acgo] rmkhti */
|
||||||
|
{
|
||||||
|
struct ctlpos cp;
|
||||||
|
ctlposinit(&cp, hwnd, 80, 3, 13);
|
||||||
|
bartitle(&cp, "Options controlling PuTTY's appearance",
|
||||||
|
IDC_TITLE_WINDOW);
|
||||||
|
beginbox(&cp, "Adjust the use of the cursor",
|
||||||
|
IDC_BOX_APPEARANCE1, IDC_BOXT_APPEARANCE1);
|
||||||
|
checkbox(&cp, "Cursor &blinks", IDC_BLINKCUR);
|
||||||
|
endbox(&cp);
|
||||||
|
beginbox(&cp, "Set the font used in the terminal window",
|
||||||
|
IDC_BOX_APPEARANCE2, IDC_BOXT_APPEARANCE2);
|
||||||
|
staticbtn(&cp, "", IDC_FONTSTATIC, "C&hange...", IDC_CHOOSEFONT);
|
||||||
|
endbox(&cp);
|
||||||
|
beginbox(&cp, "Adjust the use of the window title",
|
||||||
|
IDC_BOX_APPEARANCE3, IDC_BOXT_APPEARANCE3);
|
||||||
|
if (dlgtype == 0)
|
||||||
|
multiedit(&cp,
|
||||||
|
"Initial window &title:", IDC_WINTITLE,
|
||||||
|
IDC_WINEDIT, 100, NULL);
|
||||||
|
checkbox(&cp, "Avoid ever using &icon title", IDC_WINNAME);
|
||||||
|
endbox(&cp);
|
||||||
|
|
||||||
|
treeview_insert(&tvfaff, 1, "Appearance");
|
||||||
|
}
|
||||||
|
|
||||||
/* The Translation panel. Accelerators used: [acgo] xbepnkis */
|
/* The Translation panel. Accelerators used: [acgo] xbepnkis */
|
||||||
{
|
{
|
||||||
struct ctlpos cp;
|
struct ctlpos cp;
|
||||||
@ -1018,6 +1031,8 @@ static int GenericMainDlgProc (HWND hwnd, UINT msg,
|
|||||||
hide(hwnd, FALSE, terminalpanelstart, terminalpanelend);
|
hide(hwnd, FALSE, terminalpanelstart, terminalpanelend);
|
||||||
if (!strcmp(buffer, "Window"))
|
if (!strcmp(buffer, "Window"))
|
||||||
hide(hwnd, FALSE, windowpanelstart, windowpanelend);
|
hide(hwnd, FALSE, windowpanelstart, windowpanelend);
|
||||||
|
if (!strcmp(buffer, "Appearance"))
|
||||||
|
hide(hwnd, FALSE, appearancepanelstart, appearancepanelend);
|
||||||
if (!strcmp(buffer, "Connection"))
|
if (!strcmp(buffer, "Connection"))
|
||||||
hide(hwnd, FALSE, connectionpanelstart, connectionpanelend);
|
hide(hwnd, FALSE, connectionpanelstart, connectionpanelend);
|
||||||
if (!strcmp(buffer, "Telnet"))
|
if (!strcmp(buffer, "Telnet"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user