POV-Ray : Newsgroups : povray.beta-test : No Quit in OS X : Re: No Quit in OS X Server Time
29 Jul 2024 22:22:32 EDT (-0400)
  Re: No Quit in OS X  
From: Rene
Date: 27 Feb 2002 11:44:28
Message: <1f89yb5.1mbrmmv1tweq3yN%smellenbergh@skynet.be>
Thorsten Froehlich <tho### [at] trfde> wrote:


> POV-Ray handles apple events correctly.  As Mac OS X does not allow me to
> disable the Quit menu item in the application menu the only way to prevent
> this nonsense menu to cause damage is to add code to prevent POV-Ray from
> receiving the Quit apple event from the application menu (two lines of code).
> I would rather remove it, but as that isn't an option...
You can disable the quit menu item like this:

first:
 Are we running os X? (more than one way of doing this)
    SInt32 result;
    Boolean HostIsMacOSX=false;
    Gestalt( gestaltMenuMgrAttr, &result);
    if (result & gestaltMenuMgrAquaLayoutMask)
      HostIsMacOSX=true;

And now only one line, simplicity of os X ;-) :-) 
    if ( HostIsMacOSX )
      DisableMenuCommand(NULL, 'quit');


Yvo


-- 
e-mail:sme### [at] skynetbe

http://users.skynet.be/smellenbergh


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.