* 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:
fredkiefer 2011-11-06 17:10:10 +00:00
parent a978e01752
commit 0a2c48a1ab
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> 2011-11-05 Fred Kiefer <FredKiefer@gmx.de>
* Headers/Additions/GNUstepGUI/GSXibLoading.h, * Headers/Additions/GNUstepGUI/GSXibLoading.h,

View file

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