mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 09:12:24 +00:00
Handle the Aqua menu layout, in which the system provides a "quit" option
for us, correctly. [originally from svn r2899]
This commit is contained in:
parent
b11ffdcd6f
commit
000acf446c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: mac.c,v 1.51 2003/02/23 11:58:59 ben Exp $ */
|
/* $Id: mac.c,v 1.52 2003/02/27 23:34:59 ben Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2003 Ben Harris
|
* Copyright (c) 1999, 2003 Ben Harris
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -157,6 +157,9 @@ static void mac_startup(void) {
|
|||||||
if (Gestalt(gestaltWindowMgrAttr, &mac_gestalts.windattr) != noErr ||
|
if (Gestalt(gestaltWindowMgrAttr, &mac_gestalts.windattr) != noErr ||
|
||||||
&SetWindowContentColor == kUnresolvedCFragSymbolAddress)
|
&SetWindowContentColor == kUnresolvedCFragSymbolAddress)
|
||||||
mac_gestalts.windattr = 0;
|
mac_gestalts.windattr = 0;
|
||||||
|
/* Mac OS 8.5 Menu Manager? */
|
||||||
|
if (Gestalt(gestaltMenuMgrAttr, &mac_gestalts.menuattr) != noErr)
|
||||||
|
mac_gestalts.menuattr = 0;
|
||||||
#endif
|
#endif
|
||||||
/* Text Encoding Conversion Manager? */
|
/* Text Encoding Conversion Manager? */
|
||||||
if (
|
if (
|
||||||
@ -189,6 +192,8 @@ static void mac_startup(void) {
|
|||||||
fatalbox("Unable to create menu bar.");
|
fatalbox("Unable to create menu bar.");
|
||||||
SetMenuBar(menuBar);
|
SetMenuBar(menuBar);
|
||||||
AppendResMenu(GetMenuHandle(mApple), 'DRVR');
|
AppendResMenu(GetMenuHandle(mApple), 'DRVR');
|
||||||
|
if (mac_gestalts.menuattr & gestaltMenuMgrAquaLayoutMask)
|
||||||
|
DeleteMenuItem(GetMenuHandle(mFile), iQuit);
|
||||||
mac_adjustmenus();
|
mac_adjustmenus();
|
||||||
DrawMenuBar();
|
DrawMenuBar();
|
||||||
InitCursor();
|
InitCursor();
|
||||||
|
@ -27,6 +27,7 @@ struct mac_gestalts {
|
|||||||
long apprvers;
|
long apprvers;
|
||||||
long cntlattr;
|
long cntlattr;
|
||||||
long windattr;
|
long windattr;
|
||||||
|
long menuattr;
|
||||||
long encvvers; /* TEC version (from TECGetInfo()) */
|
long encvvers; /* TEC version (from TECGetInfo()) */
|
||||||
long uncvattr; /* Unicode Converter attributes (frem TECGetInfo()) */
|
long uncvattr; /* Unicode Converter attributes (frem TECGetInfo()) */
|
||||||
long navsvers; /* Navigation Services version */
|
long navsvers; /* Navigation Services version */
|
||||||
|
Loading…
Reference in New Issue
Block a user