* Source/NSPopUpButtonCell.m (-insertItemWithTitle:atIndex:): Set

the action on the menu item to -_popUpItemAction:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34126 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2011-11-06 17:10:10 +00:00
parent 407da1b829
commit 4b64d6f2f6
2 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2011-11-06 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSPopUpButtonCell.m (-insertItemWithTitle:atIndex:): Set
the action on the menu item to -_popUpItemAction:.
2011-11-05 Fred Kiefer <FredKiefer@gmx.de>
* Headers/Additions/GNUstepGUI/GSXibLoading.h,

View file

@ -425,8 +425,8 @@ static NSImage *_pbc_image[5];
//[anItem setAction: [self action]];
//[anItem setTarget: [self target]];
// Or
//[anItem setAction: @selector(_popUpItemAction:)];
//[anItem setTarget: self];
[anItem setAction: @selector(_popUpItemAction:)];
[anItem setTarget: self];
// Select the new item if there isn't any selection.
if (_selectedItem == nil)
@ -1332,9 +1332,9 @@ static NSImage *_pbc_image[5];
- (void) _popUpItemAction: (id)sender
{
// first, if sender is one of our items, set it as our selected item
int index = [_menu indexOfItem:sender];
int index = [_menu indexOfItem: sender];
if (index != NSNotFound)
[self selectItemAtIndex:index];
[self selectItemAtIndex: index];
if (_control_view)
{