1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Implement writing RTF to the clipboard (off by default), so that if

you enable it text will paste into Word et al in the same font as
PuTTY itself is displaying in. In particular, this will be a fixed-
pitch font, so tables and `ls' and the like will naturally line up.

[originally from svn r1373]
This commit is contained in:
Simon Tatham
2001-11-07 22:22:53 +00:00
parent 4e77787527
commit 7f1e73904a
5 changed files with 136 additions and 8 deletions

View File

@ -488,6 +488,7 @@ enum { IDCX_ABOUT =
IDC_CCSTATIC2,
IDC_CCEDIT,
IDC_RAWCNP,
IDC_RTFPASTE,
selectionpanelend,
colourspanelstart,
@ -772,6 +773,7 @@ static void init_dlg_ctrls(HWND hwnd, int keepsess)
cfg.rect_select == 0 ? IDC_SELTYPELEX : IDC_SELTYPERECT);
CheckDlgButton(hwnd, IDC_MOUSEOVERRIDE, cfg.mouse_override);
CheckDlgButton(hwnd, IDC_RAWCNP, cfg.rawcnp);
CheckDlgButton(hwnd, IDC_RTFPASTE, cfg.rtf_paste);
{
static int tabs[4] = { 25, 61, 96, 128 };
SendDlgItemMessage(hwnd, IDC_CCLIST, LB_SETTABSTOPS, 4,
@ -1145,7 +1147,7 @@ static void create_controls(HWND hwnd, int dlgtype, int panel)
}
if (panel == selectionpanelstart) {
/* The Selection panel. Accelerators used: [acgo] d wxp hst nr */
/* The Selection panel. Accelerators used: [acgo] df wxp hst nr */
struct ctlpos cp;
ctlposinit(&cp, hwnd, 80, 3, 13);
bartitle(&cp, "Options controlling copy and paste",
@ -1155,6 +1157,9 @@ static void create_controls(HWND hwnd, int dlgtype, int panel)
checkbox(&cp,
"&Don't translate line drawing chars into +, - and |",
IDC_RAWCNP);
checkbox(&cp,
"Paste to clipboard in RT&F as well as plain text",
IDC_RTFPASTE);
endbox(&cp);
beginbox(&cp, "Control which mouse button does which thing",
IDC_BOX_SELECTION2);
@ -2412,6 +2417,9 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg,
case IDC_RAWCNP:
cfg.rawcnp = IsDlgButtonChecked(hwnd, IDC_RAWCNP);
break;
case IDC_RTFPASTE:
cfg.rtf_paste = IsDlgButtonChecked(hwnd, IDC_RTFPASTE);
break;
case IDC_MBWINDOWS:
case IDC_MBXTERM:
cfg.mouse_is_xterm = IsDlgButtonChecked(hwnd, IDC_MBXTERM);