mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 16:00:37 +00:00
Revert change from r34642 which has broken OS X compatibility and fix
sender of a pop up button's action when it is sent through one of the menu items. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34781 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d83aa2565a
commit
744e61d204
3 changed files with 20 additions and 8 deletions
|
@ -1310,17 +1310,18 @@ static BOOL menuBarVisible = YES;
|
|||
[_popUpButtonCell selectItemAtIndex: index];
|
||||
}
|
||||
|
||||
if (_popUpButtonCell != nil && (action = [_popUpButtonCell action]) != NULL)
|
||||
if ((action = [item action]) != NULL)
|
||||
{
|
||||
[NSApp sendAction: action
|
||||
to: [_popUpButtonCell target]
|
||||
from: [_popUpButtonCell controlView]];
|
||||
to: [item target]
|
||||
from: item];
|
||||
}
|
||||
else if ((action = [item action]) != NULL)
|
||||
else if (_popUpButtonCell != nil)
|
||||
{
|
||||
[NSApp sendAction: action
|
||||
to: [item target]
|
||||
from: item];
|
||||
if ((action = [_popUpButtonCell action]) != NULL)
|
||||
[NSApp sendAction: action
|
||||
to: [_popUpButtonCell target]
|
||||
from: [_popUpButtonCell controlView]];
|
||||
}
|
||||
|
||||
[nc postNotificationName: NSMenuDidSendActionNotification
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue