summaryrefslogtreecommitdiffstats
path: root/mac/tkMacWm.c
diff options
context:
space:
mode:
authorjingham <jingham>1998-11-11 17:28:50 (GMT)
committerjingham <jingham>1998-11-11 17:28:50 (GMT)
commitad5d4d015663fbed6bb4d8ea9d0b1bfda00d82ad (patch)
tree993d1f2ceab5039b6806719996992d39b39829da /mac/tkMacWm.c
parentc7332617ba5dbb6c74ef23c5bca3ea821407ac7f (diff)
downloadtk-ad5d4d015663fbed6bb4d8ea9d0b1bfda00d82ad.zip
tk-ad5d4d015663fbed6bb4d8ea9d0b1bfda00d82ad.tar.gz
tk-ad5d4d015663fbed6bb4d8ea9d0b1bfda00d82ad.tar.bz2
Make the Macintosh Menu's adopt the current Theme Appearance if the Appearance extension (version 1.0.1 or later) is installed
Diffstat (limited to 'mac/tkMacWm.c')
-rw-r--r--mac/tkMacWm.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/mac/tkMacWm.c b/mac/tkMacWm.c
index 2833553..ba32f5e 100644
--- a/mac/tkMacWm.c
+++ b/mac/tkMacWm.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacWm.c,v 1.4 1998/09/14 18:23:40 stanton Exp $
+ * RCS: @(#) $Id: tkMacWm.c,v 1.5 1998/11/11 17:31:51 jingham Exp $
*/
#include <Gestalt.h>
@@ -4196,10 +4196,13 @@ TkpWmSetState(winPtr, state)
* TkMacHaveAppearance --
*
* Determine if the appearance manager is available on this Mac.
- * We cache the result so future calls are fast.
+ * We cache the result so future calls are fast. Return a different
+ * value if 1.0.1 is present, since many interfaces were added in
+ * 1.0.1
*
* Results:
- * True if the appearance manager is present, false otherwise.
+ * 1 if the appearance manager is present, 2 if the appearance
+ * manager version is 1.0.1 or greater, 0 if it is not present.
*
* Side effects:
* Calls Gestalt to query system values.
@@ -4211,14 +4214,18 @@ int
TkMacHaveAppearance()
{
static initialized = false;
- static int TkMacHaveAppearance = false;
+ static int TkMacHaveAppearance = 0;
long response = 0;
OSErr err = noErr;
if (!initialized) {
err = Gestalt(gestaltAppearanceAttr, &response);
if (err == noErr) {
- TkMacHaveAppearance = true;
+ TkMacHaveAppearance = 1;
+ }
+ err = Gestalt(gestaltAppearanceVersion, &response);
+ if (err == noErr) {
+ TkMacHaveAppearance = 2;
}
}