]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winpgen.c
Use readonly edit controls in some Windows dialogs.
[PuTTY.git] / windows / winpgen.c
index 1086c08c1a30d644f8af960dff558cebfc8510e9..612692b4e669c1e77a5216f1e538720eda1e1a48 100644 (file)
@@ -141,7 +141,7 @@ struct PassphraseProcStruct {
 /*
  * Dialog-box function for the passphrase box.
  */
-static int CALLBACK PassphraseProc(HWND hwnd, UINT msg,
+static INT_PTR CALLBACK PassphraseProc(HWND hwnd, UINT msg,
                                   WPARAM wParam, LPARAM lParam)
 {
     static char **passphrase = NULL;
@@ -233,7 +233,7 @@ static int prompt_keyfile(HWND hwnd, char *dlgtitle,
 /*
  * Dialog-box function for the Licence box.
  */
-static int CALLBACK LicenceProc(HWND hwnd, UINT msg,
+static INT_PTR CALLBACK LicenceProc(HWND hwnd, UINT msg,
                                WPARAM wParam, LPARAM lParam)
 {
     switch (msg) {
@@ -253,6 +253,36 @@ static int CALLBACK LicenceProc(HWND hwnd, UINT msg,
                           rd.right - rd.left, rd.bottom - rd.top, TRUE);
        }
 
+            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)) {
@@ -272,7 +302,7 @@ static int CALLBACK LicenceProc(HWND hwnd, UINT msg,
 /*
  * Dialog-box function for the About box.
  */
-static int CALLBACK AboutProc(HWND hwnd, UINT msg,
+static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg,
                              WPARAM wParam, LPARAM lParam)
 {
     switch (msg) {
@@ -292,7 +322,14 @@ static int CALLBACK AboutProc(HWND hwnd, UINT msg,
                           rd.right - rd.left, rd.bottom - rd.top, TRUE);
        }
 
-       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)) {
@@ -749,7 +786,7 @@ void load_key_file(HWND hwnd, struct MainDlgState *state,
 /*
  * Dialog-box function for the main PuTTYgen dialog box.
  */
-static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
+static INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg,
                                WPARAM wParam, LPARAM lParam)
 {
     static const char generating_msg[] =
@@ -790,7 +827,7 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
            AppendMenu(menu1, MF_ENABLED, IDC_SAVE, "&Save private key");
            AppendMenu(menu1, MF_SEPARATOR, 0, 0);
            AppendMenu(menu1, MF_ENABLED, IDC_QUIT, "E&xit");
-           AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT) menu1, "&File");
+           AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT_PTR) menu1, "&File");
            state->filemenu = menu1;
 
            menu1 = CreateMenu();
@@ -801,7 +838,7 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
            AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH2DSA, "SSH-2 &DSA key");
             AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH2ECDSA, "SSH-2 &ECDSA key");
             AppendMenu(menu1, MF_ENABLED, IDC_KEYSSH2ED25519, "SSH-2 ED&25519 key");
-           AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT) menu1, "&Key");
+           AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT_PTR) menu1, "&Key");
            state->keymenu = menu1;
 
            menu1 = CreateMenu();
@@ -813,7 +850,7 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
                       "Export &OpenSSH key (force new file format)");
            AppendMenu(menu1, MF_ENABLED, IDC_EXPORT_SSHCOM,
                       "Export &ssh.com key");
-           AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT) menu1,
+           AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT_PTR) menu1,
                       "Con&versions");
            state->cvtmenu = menu1;
 
@@ -821,7 +858,7 @@ static int CALLBACK MainDlgProc(HWND hwnd, UINT msg,
            AppendMenu(menu1, MF_ENABLED, IDC_ABOUT, "&About");
            if (has_help())
                AppendMenu(menu1, MF_ENABLED, IDC_GIVEHELP, "&Help");
-           AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT) menu1, "&Help");
+           AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT_PTR) menu1, "&Help");
 
            SetMenu(hwnd, menu);
        }