X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/7dcd1f879d7a6d11cc7c4f67ee75a745578a46ad..f160b7b8908cac4a7ca37b49928b7855fe0a11fe:/mac/mac_res.r diff --git a/mac/mac_res.r b/mac/mac_res.r index cefcfbeb..1a8246fe 100644 --- a/mac/mac_res.r +++ b/mac/mac_res.r @@ -1,6 +1,6 @@ -/* $Id: mac_res.r,v 1.26 2003/02/07 01:38:12 ben Exp $ */ +/* $Id$ */ /* - * Copyright (c) 1999, 2002 Ben Harris + * Copyright (c) 1999, 2002, 2003 Ben Harris * All rights reserved. * * Permission is hereby granted, free of charge, to any person @@ -41,11 +41,7 @@ /* Get resource IDs we share with C code */ #include "macresid.h" -/* - * Current PuTTY version number. Minor is in BCD - */ -#define VERSION_MAJOR 0x00 -#define VERSION_MINOR 0x53 +#include "version.r" /* * Finder-related resources @@ -61,10 +57,10 @@ resource 'pTTY' (0, purgeable) { resource 'SIZE' (-1) { reserved, - ignoreSuspendResumeEvents, + acceptSuspendResumeEvents, reserved, canBackground, - needsActivateOnFGSwitch, + doesActivateOnFGSwitch, backgroundAndForeground, dontGetFrontClicks, ignoreAppDiedEvents, @@ -76,8 +72,8 @@ resource 'SIZE' (-1) { reserved, reserved, reserved, + 2048 * 1024, /* Preferred size */ 1024 * 1024, /* Minimum size */ - 1024 * 1024, /* Preferred size */ }; #define FREF_APPL 128 @@ -166,6 +162,36 @@ resource 'kind' (129) { } }; +#if TARGET_API_MAC_CARBON +/* + * Mac OS X Info.plist. + * See Tech Note TN2013 for details. + * We don't bother with things that Mac OS X seems to be able to get from + * other resources. + */ +type 'plst' as 'TEXT'; + +resource 'plst' (0) { + "\n" + "\n" + "\n" + " \n" + " CFBundleInfoDictionaryVersion 6.0\n" + " CFBundleIdentifier\n" + " org.tartarus.projects.putty.putty\n" + " CFBundleName PuTTY\n" + " CFBundlePackageType APPL\n" + " CFBundleSignature pTTY\n" + " \n" + "\n" +}; + +/* Mac OS X doesn't use this, but Mac OS 9 does. */ +type 'carb' as 'TEXT'; +resource 'carb' (0) { "" }; +#endif + /* Icons, courtesy of DeRez */ /* Application icon */ @@ -814,54 +840,6 @@ resource 'ics8' (FREF_Seed) { $"00FFFFFFFFFFFFFFFFFFFFFFFFFF" }; -resource 'vers' (1, purgeable) { -#ifdef RELEASE - VERSION_MAJOR, VERSION_MINOR, - beta, -#else - VERSION_MAJOR, VERSION_MINOR + 1, - development, -#endif - 0, /* No prerelease version */ - verBritain, -#ifdef RELEASESTR - RELEASESTR, - "Release " RELEASESTR, -#else -#ifdef SNAPSHOTSTR - SNAPSHOTSTR, - "Development snapshot " SNAPSHOTSTR, -#else - "unknown", - "Unidentified build, " $$Date " " $$Time, -#endif -#endif -}; - -resource 'vers' (2, purgeable) { -#ifdef RELEASE - VERSION_MAJOR, VERSION_MINOR, - beta, -#else - VERSION_MAJOR, VERSION_MINOR + 1, - development, -#endif - 0, /* No prerelease version */ - verBritain, -#ifdef RELEASESTR - RELEASESTR, - "PuTTY " RELEASESTR, -#else -#ifdef SNAPSHOTSTR - SNAPSHOTSTR, - "PuTTY snapshot " SNAPSHOTSTR, -#else - "unknown", - "PuTTY", -#endif -#endif -}; - /* * Resources to copy into created files */ @@ -917,13 +895,15 @@ resource 'MENU' (mApple, preload) { resource 'MENU' (mFile, preload) { mFile, textMenuProc, - 0b11111111111111111111111101111011, + 0b11111111111111111111110111101011, enabled, - "Session", + "File", { "New", noicon, "N", nomark, plain, "Open\0xc9", noicon, "O", nomark, plain, "-", noicon, nokey, nomark, plain, + "Change Settings", noicon, nokey, nomark, plain, + "-", noicon, nokey, nomark, plain, "Close", noicon, "W", nomark, plain, "Save", noicon, "S", nomark, plain, "Save As\0xc9", noicon, nokey, nomark, plain, @@ -993,6 +973,186 @@ resource 'DITL' (wFatal, "fatalbox", purgeable) { } }; +/* Caution box. Stolen from the Finder. */ + +resource 'ALRT' (wQuestion, "questionbox", purgeable) { + {54, 67, 152, 435}, + wQuestion, + beepStages, + alertPositionMainScreen +}; + +resource 'DITL' (wQuestion, "fatalbox", purgeable) { + { /* array DITLarray: 3 elements */ + /* [1] */ + {68, 299, 88, 358}, + Button { + enabled, + "OK" + }, + /* [2] */ + {68, 227, 88, 286}, + Button { + enabled, + "Cancel" + }, + /* [3] */ + {7, 74, 55, 358}, + StaticText { + disabled, + "^0" + } + } +}; + +/* Absent host key */ + +resource 'ALRT' (wAbsent, "absent", purgeable) { + {37, 67, 337, 435}, + wAbsent, + beepStages, + alertPositionMainScreen +}; + +resource 'DITL' (wAbsent, "absent", purgeable) { + { /* array DITLarray: 8 elements */ + /* [1] */ + {10, 72, 60, 357}, + StaticText { + disabled, + "The server's host key is not cached. You " + "have no guarantee that the server is the " + "computer you think it is." + }, + /* [2] */ + {65, 72, 113, 355}, + StaticText { + disabled, + "The server's ^0 key fingerprint is:\n^1" + }, + /* [3] */ + {121, 72, 172, 354}, + StaticText { + disabled, + "If you trust this host, hit Add Key to add " + "the key to ^2's cache and carry on " + "connecting." + }, + /* [4] */ + {178, 72, 226, 354}, + StaticText { + disabled, + "If you want to carry on connecting just " + "once, without adding the key to the cache, " + "select Just Once." + }, + /* [5] */ + {233, 72, 271, 353}, + StaticText { + disabled, + "If you do not trust this host, hit Cancel " + "to abandon the connection." + }, + /* [6] */ + {275, 72, 295, 139}, + Button { + enabled, + "Add Key" + }, + /* [7] */ + {275, 217, 295, 277}, + Button { + enabled, + "Cancel" + }, + /* [8] */ + {275, 290, 295, 360}, + Button { + enabled, + "Just Once" + } + } +}; + +/* Wrong host key */ + +resource 'ALRT' (wWrong, "wrong", purgeable) { + {32, 67, 422, 435}, + wWrong, + beepStages, + alertPositionMainScreen +}; + +resource 'DITL' (wWrong, "wrong", purgeable) { + { /* array DITLarray: 9 elements */ + /* [1] */ + {10, 72, 26, 358}, + StaticText { + disabled, + "WARNING - POTENTIAL SECURITY BREACH!" + }, + /* [2] */ + {32, 72, 131, 357}, + StaticText { + disabled, + "The server's host key does not match the " + "one ^0 has cached. This means that either " + "the server administrator has changed " + "the host key, or you have actually connected " + "to another computer pretending to be the " + "server." + }, + /* [3] */ + {136, 72, 190, 356}, + StaticText { + disabled, + "The new ^1 key fingerprint is:\n^2" + }, + /* [4] */ + {190, 72, 238, 357}, + StaticText { + disabled, + "If you were expecting this change and " + "trust the new key, hit Update Key to update " + "^0's cache and continue connecting." + }, + /* [5] */ + {246, 72, 294, 358}, + StaticText { + disabled, + "If you want to carry on connecting just " + "once, without adding the key to the cache, " + "select Just Once." + }, + /* [6] */ + {301, 72, 349, 358}, + StaticText { + disabled, + "If you do not trust this host, hit Cancel " + "to abandon the connection. This is the " + "ONLY guaranteed safe choice." + }, + /* [7] */ + {360, 72, 380, 163}, + Button { + enabled, + "Update Key" + }, + /* [8] */ + {360, 217, 380, 277}, + Button { + enabled, + "Cancel" + }, + /* [9] */ + {360, 290, 380, 360}, + Button { + enabled, + "Just Once" + } + } +}; + /* Terminal window */ resource 'WIND' (wTerminal, "terminal", purgeable) { @@ -1013,30 +1173,16 @@ resource 'CNTL' (cVScroll, "vscroll", purgeable) { /* Settings dialogue */ -resource 'DLOG' (wSettings, "settings", purgeable) { - { 0, 0, 46, 240 }, +resource 'WIND' (wSettings, "settings", purgeable) { + { 0, 0, 432, 626 }, noGrowDocProc, invisible, goAway, - wSettings, - wSettings, - "Settings", + 0x0, + "untitled", staggerParentWindowScreen }; -resource 'dlgx' (wSettings, "settings", purgeable) { - versionZero { - kDialogFlagsUseThemeBackground | kDialogFlagsUseThemeControls - } -}; - -resource 'DITL' (wSettings, "settings", purgeable) { - { - { 13, 13, 33, 227 }, - Button { enabled, "Open" }, - } -}; - /* Event log */ resource 'WIND' (wEventLog, "event log", purgeable) { { 0, 0, 200, 200 }, @@ -1075,7 +1221,7 @@ resource 'DITL' (wAbout, "about", purgeable) { StaticText { disabled, "PuTTY"}, { 42, 13, 74, 227 }, StaticText { disabled, "Some version or other\n" - "Copyright © 1997-9 Simon Tatham"}, + "Copyright © 1997-2008 Simon Tatham"}, } }; @@ -1096,11 +1242,12 @@ type 'TEXT' { }; resource 'TEXT' (wLicence, "licence", purgeable) { - "PuTTY is copyright 1997-2003 Simon Tatham.\n" + "PuTTY is copyright 1997-2008 Simon Tatham.\n" "\n" - "Portions copyright Robert de Bath, Joris van Rantwijk, Delian" - "Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry," - "Justin Bradford, Ben Harris, and CORE SDI S.A.\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, and CORE SDI S.A.\n" "\n" "Permission is hereby granted, free of charge, to any person " "obtaining a copy of this software and associated documentation " @@ -1123,3 +1270,31 @@ resource 'TEXT' (wLicence, "licence", purgeable) { "CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE " "SOFTWARE." }; + +/* Custom xDEFs */ + +data 'CDEF' (CDEF_EditBox) { + $"4EF9 00000000" +}; +data 'CDEF' (CDEF_Default) { + $"4EF9 00000000" +}; +data 'CDEF' (CDEF_ListBox) { + $"4EF9 00000000" +}; +data 'CDEF' (CDEF_GroupBox) { + $"43F9 00000000" +}; + +/* List box template */ + +resource 'ldes' (ldes_Default) { + versionZero { + 0, /* rows */ + 1, /* cols */ + 0, 0, /* default cell size */ + hasVertScroll, noHorizScroll, + 0, /* LDEF number */ + noGrowSpace + } +};