]> granicus.if.org Git - python/commitdiff
macglue: added PyMac_AppRefNum
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 6 Sep 1996 22:18:40 +0000 (22:18 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 6 Sep 1996 22:18:40 +0000 (22:18 +0000)
pythonresources: elaborated comment on preferences, added new options

Mac/Include/macglue.h
Mac/Include/pythonresources.h

index 035b51fb6f2e3833ff4b12772a4157492be6aad6..af1e21ab61ebe4405d6c2b411269a3d7bfa57375 100644 (file)
@@ -51,6 +51,8 @@ extern int PyMac_ConsoleIsDead;                       /* True when exiting */
 extern void PyMac_SetGUSISpin(void);   /* Install our private GUSI spin routine */
 #endif
 
+extern short PyMac_AppRefNum;                  /* RefNum of application rsrcfork (from macmain.c) */
+
 extern PyObject *PyMac_OSErrException;         /* Exception for OSErr */
 PyObject *PyMac_GetOSErrException(void);       /* Initialize & return it */
 
index dd847ff70ee5e66ee29cd15176911786b2c061a1..02607bd39b5036cacf13a6efbf36c31318843e93 100644 (file)
 /*
 ** The following are valid both in the binary (or shared library)
 ** and in the Preferences file.
-** For all three the override is tried first, through all current
-** resource files. This allows an applet to override standard settings
-** by providing a resource of the correct type.
+** For all these the override is tried first, in the application resource fork
+** only, this allows an applet to override standard settings.
+** If there is no override resource the preferences file is added to the head
+** of the resource file chain and the non-override version of the resource is
+** searched in any resource file.
+**
+** The effect of this is that, for example, a 'Popt' of 128 in the application or
+** shared library provides default options for use when no preferences are set,
+** while a 'Popt' of 129 (in the application *only*) overrides any options in the
+** preferences file.
 */
 
 /* The STR# resource for sys.path initialization */
 #define POPT_DEBUGGING 4
 #define POPT_KEEPNORM  5
 #define POPT_KEEPERR   6
+#define POPT_NOINTOPT  7       /* Not settable interactively */
+#define POPT_NOARGS            8       /* Not settable interactively */
 
-/* Our menu bar */
-#define MENUBAR_ID 128
+/* The GUSI options resources */
+#define GUSIOPTIONS_ID 10240
+#define GUSIOPTIONSOVERRIDE_ID 10241
 
 /* From macgetpath.c: */
 void PyMac_PreferenceOptions Py_PROTO((int *inspect, int *verbose, int *suppress_print,