mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 16:30:53 +00:00
In NSMenu compare target for identity not equality.
Decoding and encoding for NSWindowController. Extend the responder chain of a window beyond itself. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26959 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5a50f7ad69
commit
3b4cc1196a
4 changed files with 103 additions and 81 deletions
|
@ -816,12 +816,13 @@ static BOOL menuBarVisible = YES;
|
|||
NSMenuItem *menuItem = [_items objectAtIndex: i];
|
||||
|
||||
if (actionSelector == 0 || sel_eq([menuItem action], actionSelector))
|
||||
{
|
||||
if ([[menuItem target] isEqual: anObject])
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
{
|
||||
// There are different possibilities to implement the check here
|
||||
if ([menuItem target] == anObject)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
@ -834,10 +835,10 @@ static BOOL menuBarVisible = YES;
|
|||
for (i = 0; i < count; i++)
|
||||
{
|
||||
if ([[[_items objectAtIndex: i] representedObject]
|
||||
isEqual: anObject])
|
||||
{
|
||||
return i;
|
||||
}
|
||||
isEqual: anObject])
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
@ -852,10 +853,10 @@ static BOOL menuBarVisible = YES;
|
|||
id item = [_items objectAtIndex: i];
|
||||
|
||||
if ([item hasSubmenu] &&
|
||||
[[item submenu] isEqual: anObject])
|
||||
{
|
||||
return i;
|
||||
}
|
||||
[[item submenu] isEqual: anObject])
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue