diff options
Diffstat (limited to 'Mac/Python/macglue.c')
-rw-r--r-- | Mac/Python/macglue.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Mac/Python/macglue.c b/Mac/Python/macglue.c index 00d6d2c..17bbff0 100644 --- a/Mac/Python/macglue.c +++ b/Mac/Python/macglue.c @@ -68,6 +68,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <GUSI.h> #endif +/* The ID of the Sioux apple menu */ +#define SIOUX_APPLEID 32000 + #ifndef HAVE_UNIVERSAL_HEADERS #define GetResourceSizeOnDisk(x) SizeResource(x) typedef DlgHookYDProcPtr DlgHookYDUPP; @@ -518,6 +521,35 @@ PyMac_Idle() #endif /* +** Install our menu bar. +*/ +void +PyMac_InitMenuBar() +{ + Handle bar; + MenuHandle applemenu; + + if ( (bar=GetMenuBar()) == NULL ) return; + if ( (applemenu=GetMHandle(SIOUX_APPLEID)) == NULL ) return; + SetMenuItemText(applemenu, 1, "\pAbout Python..."); +} + +/* +** Our replacement about box +*/ +void +SIOUXDoAboutBox(void) +{ + DialogPtr theDialog; + short item; + + if( (theDialog = GetNewDialog(ABOUT_ID, NULL, (WindowPtr)-1)) == NULL ) + return; + ModalDialog(NULL, &item); + DisposeDialog(theDialog); +} + +/* ** Returns true if the argument has a resource fork, and it contains ** a 'PYC ' resource of the correct name */ |