[Python-checkins] CVS: python/dist/src/Mac/Python macglue.c,1.108,1.109

Jack Jansen jackjansen@users.sourceforge.net
2001年12月10日 08:08:09 -0800


Update of /cvsroot/python/python/dist/src/Mac/Python
In directory usw-pr-cvs1:/tmp/cvs-serv12958/python/Mac/Python
Modified Files:
	macglue.c 
Log Message:
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.
Index: macglue.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Python/macglue.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -C2 -d -r1.108 -r1.109
*** macglue.c	2001年11月30日 14:16:34	1.108
--- macglue.c	2001年12月10日 16:08:06	1.109
***************
*** 721,724 ****
--- 721,726 ----
 {
 	MenuHandle applemenu;
+ 	Str255 about_text;
+ 	static unsigned char about_sioux[] = "\pAbout SIOUX";
 	
 	if ( sioux_mbar ) return;
***************
*** 738,742 ****
 	}
 	if ( (applemenu=GetMenuHandle(SIOUX_APPLEID)) == NULL ) return;
! 	SetMenuItemText(applemenu, 1, "\pAbout Python...");
 }
 
--- 740,747 ----
 	}
 	if ( (applemenu=GetMenuHandle(SIOUX_APPLEID)) == NULL ) return;
! 	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...");
 }
 

AltStyle によって変換されたページ (->オリジナル) /