Changes to support menuing code changes.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5206 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Lazaro Saz 1999-11-16 22:11:19 +00:00
parent 55e90741fb
commit 021c583cd3

View file

@ -1296,8 +1296,8 @@ NSAssert([event retainCount] > 0, NSInternalInconsistencyException);
- (void) setMainMenu: (NSMenu*)aMenu
{
unsigned i, j;
NSMenuItem *mc;
NSArray *mi;
NSMenuItem *anItem;
NSArray *menuItems;
if (main_menu != nil && main_menu != aMenu)
{
@ -1311,15 +1311,15 @@ NSAssert([event retainCount] > 0, NSInternalInconsistencyException);
/*
* Find a menucell with the title Windows this is the default windows menu
*/
mi = [main_menu itemArray];
j = [mi count];
menuItems = [main_menu itemArray];
j = [menuItems count];
windows_menu = nil;
for (i = 0; i < j; ++i)
{
mc = [mi objectAtIndex: i];
if ([[mc stringValue] compare: @"Windows"] == NSOrderedSame)
anItem = [menuItems objectAtIndex: i];
if ([[anItem title] compare: @"Windows"] == NSOrderedSame)
{
windows_menu = mc;
windows_menu = anItem;
break;
}
}