diff options
author | jingham <jingham> | 1998-11-11 17:28:50 (GMT) |
---|---|---|
committer | jingham <jingham> | 1998-11-11 17:28:50 (GMT) |
commit | ad5d4d015663fbed6bb4d8ea9d0b1bfda00d82ad (patch) | |
tree | 993d1f2ceab5039b6806719996992d39b39829da /mac/tkMacWm.c | |
parent | c7332617ba5dbb6c74ef23c5bca3ea821407ac7f (diff) | |
download | tk-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.c | 17 |
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; } } |