[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix: NSMenu.m, -performActionForItemAtIndex:
From: |
Georg Fleischmann |
Subject: |
Fix: NSMenu.m, -performActionForItemAtIndex: |
Date: |
Tue, 11 Jun 2002 22:43:16 GMT |
Hi again,
here is a patch for PopUp Menus, which selects the item also for actions send
from the item (not only for actions send by the popUpButtonCell).
That's it.
Thanks for the Color-Panel, that's a great improvement :-)
Georg
2002-06-11 Georg Fleischmann
* gui/Source/NSMenu.m [NSMenu -performActionForItemAtIndex:]:
select item for any kind of popup action
*** gui/Source/NSMenu.m.old Mon Jun 3 23:23:33 2002
--- gui/Source/NSMenu.m Tue Jun 11 21:31:46 2002
***************
*** 735,740 ****
--- 735,743 ----
[nc postNotificationName: NSMenuWillSendActionNotification
object: self
userInfo: d];
+ // Tell the popup button, which item was selected
+ if (_popUpButtonCell != nil)
+ [_popUpButtonCell selectItemAtIndex: index];
if (NULL != (action = [item action]))
{
[NSApp sendAction: action
***************
*** 743,750 ****
}
else if (_popUpButtonCell != nil)
{
- // Tell the popup button, which item was selected
- [_popUpButtonCell selectItemAtIndex: index];
if (NULL != (action = [_popUpButtonCell action]))
[NSApp sendAction: action
to: [_popUpButtonCell target]
--- 746,751 ----
- Fix: NSMenu.m, -performActionForItemAtIndex:,
Georg Fleischmann <=