]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/windlg.c
Use readonly edit controls in some Windows dialogs.
[PuTTY.git] / windows / windlg.c
index 5bedd1309933a492c6e9a6a9b44fbd19dfb843d3..826876e3cbd30bc713ae02b106187b2d65afe4a4 100644 (file)
@@ -170,6 +170,37 @@ static int CALLBACK LicenceProc(HWND hwnd, UINT msg,
            char *str = dupprintf("%s Licence", appname);
            SetWindowText(hwnd, str);
            sfree(str);
+
+            SetDlgItemText(hwnd, IDA_TEXT,
+       "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:
@@ -197,8 +228,14 @@ static int CALLBACK AboutProc(HWND hwnd, UINT msg,
        str = dupprintf("About %s", appname);
        SetWindowText(hwnd, str);
        sfree(str);
-       SetDlgItemText(hwnd, IDA_TEXT1, appname);
-       SetDlgItemText(hwnd, IDA_VERSION, ver);
+        {
+            char *text = dupprintf
+                ("%s\r\n\r\n%s\r\n\r\n%s",
+                 appname, ver,
+                 "\251 1997-2015 Simon Tatham. All rights reserved.");
+            SetDlgItemText(hwnd, IDA_TEXT, text);
+            sfree(text);
+        }
        return 1;
       case WM_COMMAND:
        switch (LOWORD(wParam)) {
@@ -505,6 +542,7 @@ static int CALLBACK GenericMainDlgProc(HWND hwnd, UINT msg,
              * And create the actual control set for that panel, to
              * match the initial treeview selection.
              */
+            assert(firstpath);   /* config.c must have given us _something_ */
             create_controls(hwnd, firstpath);
            dlg_refresh(NULL, &dp);    /* and set up control values */
        }