* Source/NSMenu.m (-performActionForItemAtIndex:): Check for the

popup button cell and its action, before checking for the item
action. This caused a problem due to NIB decoding changes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34642 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2012-01-26 22:38:50 +00:00
parent 2d2026e7fc
commit 899ce772cb
2 changed files with 13 additions and 8 deletions

View file

@ -1,3 +1,9 @@
2012-01-26 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSMenu.m (-performActionForItemAtIndex:): Check for the
popup button cell and its action, before checking for the item
action. This caused a problem due to NIB decoding changes.
2012-01-26 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTextView.m (-updateRuler): Replace last change with one

View file

@ -1310,18 +1310,17 @@ static BOOL menuBarVisible = YES;
[_popUpButtonCell selectItemAtIndex: index];
}
if ((action = [item action]) != NULL)
if (_popUpButtonCell != nil && (action = [_popUpButtonCell action]) != NULL)
{
[NSApp sendAction: action
to: [item target]
from: item];
to: [_popUpButtonCell target]
from: [_popUpButtonCell controlView]];
}
else if (_popUpButtonCell != nil)
else if ((action = [item action]) != NULL)
{
if ((action = [_popUpButtonCell action]) != NULL)
[NSApp sendAction: action
to: [_popUpButtonCell target]
from: [_popUpButtonCell controlView]];
[NSApp sendAction: action
to: [item target]
from: item];
}
[nc postNotificationName: NSMenuDidSendActionNotification