1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-06 22:12:47 -05:00

Use readonly edit controls in some Windows dialogs.

This makes the About and Licence boxes copy-and-pasteable, similarly
to what I've just done on Unix.

(But unlike on the Unix side, here I haven't touched the host key
prompt dialog, because that's a standard Windows MessageBox and not
easy to mess around with. Plus, in any case, you can already hit ^C to
copy the whole text out of a MessageBox. Same goes for the PGP
fingerprints dialog.)

As a side effect, several copies of the copyright notice and licence
text have moved from .rc files into C source. I've updated
CHECKLST.txt, but they won't stay there for long.

(cherry picked from commit 2eb952ca31)

Conflicts:
	windows/pageant.rc
	windows/puttygen.rc
	windows/win_res.rc2

(cherry-picker's notes: the conflict was just because several copies
of the licence text were deleted, and they weren't quite the same
between branches)
This commit is contained in:
Simon Tatham
2016-02-25 20:42:00 +00:00
parent 7a5d434e34
commit 4327fe71fe
8 changed files with 144 additions and 128 deletions

View File

@ -183,6 +183,36 @@ static int CALLBACK LicenceProc(HWND hwnd, UINT msg,
{
switch (msg) {
case WM_INITDIALOG:
SetDlgItemText(hwnd, 1000,
"Copyright 1997-2015 Simon Tatham.\r\n\r\n"
"Portions copyright Robert de Bath, Joris van Rantwijk, Delian "
"Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas "
"Barry, Justin Bradford, Ben Harris, Malcolm Smith, Ahmad Khalifa, "
"Markus Kuhn, Colin Watson, Christopher Staite, and CORE SDI S.A.\r\n\r\n"
"Permission is hereby granted, free of charge, to any person "
"obtaining a copy of this software and associated documentation "
"files (the ""Software""), to deal in the Software without restriction, "
"including without limitation the rights to use, copy, modify, merge, "
"publish, distribute, sublicense, and/or sell copies of the Software, "
"and to permit persons to whom the Software is furnished to do so, "
"subject to the following conditions:\r\n\r\n"
"The above copyright notice and this permission notice shall be "
"included in all copies or substantial portions of the Software.\r\n\r\n"
"THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT "
"WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, "
"INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF "
"MERCHANTABILITY, FITNESS FOR A PARTICULAR "
"PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE "
"COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES "
"OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, "
"TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN "
"CONNECTION WITH THE SOFTWARE OR THE USE OR "
"OTHER DEALINGS IN THE SOFTWARE."
);
return 1;
case WM_COMMAND:
switch (LOWORD(wParam)) {
@ -207,7 +237,14 @@ static int CALLBACK AboutProc(HWND hwnd, UINT msg,
{
switch (msg) {
case WM_INITDIALOG:
SetDlgItemText(hwnd, 100, ver);
{
char *text = dupprintf
("Pageant\r\n\r\n%s\r\n\r\n%s",
ver,
"\251 1997-2015 Simon Tatham. All rights reserved.");
SetDlgItemText(hwnd, 1000, text);
sfree(text);
}
return 1;
case WM_COMMAND:
switch (LOWORD(wParam)) {