summaryrefslogtreecommitdiffstats
path: root/Mac/Python
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-12-10 16:08:14 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-12-10 16:08:14 (GMT)
commit52306a780b622ebe90f80f4296a311e6921d274a (patch)
tree538e894de73b43030e55857898749f68b05f4451 /Mac/Python
parent1d961f5e5fb80a77f37cbdf350e78718e6131abf (diff)
downloadcpython-52306a780b622ebe90f80f4296a311e6921d274a.zip
cpython-52306a780b622ebe90f80f4296a311e6921d274a.tar.gz
cpython-52306a780b622ebe90f80f4296a311e6921d274a.tar.bz2
The new menu initialization code would also add the SIOUX menus if a (frozen) Python program had installed its own menubar previously. We now guard against this, with a bit of a hack: FrameWork uses the same Menu ID as Sioux, and the init code checks that the text in the menu is "About SIOUX" before replacing it.
Diffstat (limited to 'Mac/Python')
-rw-r--r--Mac/Python/macglue.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Mac/Python/macglue.c b/Mac/Python/macglue.c
index f9c9aff..e66ab83 100644
--- a/Mac/Python/macglue.c
+++ b/Mac/Python/macglue.c
@@ -720,6 +720,8 @@ void
PyMac_InitMenuBar()
{
MenuHandle applemenu;
+ Str255 about_text;
+ static unsigned char about_sioux[] = "\pAbout SIOUX";
if ( sioux_mbar ) return;
#if 0
@@ -737,7 +739,10 @@ PyMac_InitMenuBar()
return;
}
if ( (applemenu=GetMenuHandle(SIOUX_APPLEID)) == NULL ) return;
- SetMenuItemText(applemenu, 1, "\pAbout Python...");
+ GetMenuItemText(applemenu, 1, about_text);
+ if ( about_text[0] == about_sioux[0] &&
+ strncmp((char *)(about_text+1), (char *)(about_sioux+1), about_text[0]) == 0 )
+ SetMenuItemText(applemenu, 1, "\pAbout Python...");
}
/*