mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 17:10:56 +00:00
* Source/NSPopUpButtonCell.m (-initWithCoder:): If no selection
index is given select the first item. This should fix bug #34923. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34228 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8206073dbc
commit
0b555a3084
2 changed files with 20 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-11-28 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSPopUpButtonCell.m (-initWithCoder:): If no selection
|
||||
index is given select the first item. This should fix bug #34923.
|
||||
|
||||
2011-11-28 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSTextView.m (-buildUpTextNetwork:): Move setting the
|
||||
|
|
|
@ -204,6 +204,7 @@ static NSImage *_pbc_image[5];
|
|||
[self setMenuView: nil];
|
||||
}
|
||||
|
||||
// FIXME: Select the first or last item?
|
||||
[self selectItemAtIndex: [_menu numberOfItems] - 1];
|
||||
[self synchronizeTitleAndSelectedItem];
|
||||
}
|
||||
|
@ -1233,6 +1234,11 @@ static NSImage *_pbc_image[5];
|
|||
|
||||
[self setAltersStateOfSelectedItem: alters];
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSPullDown"])
|
||||
{
|
||||
BOOL pullDown = [aDecoder decodeBoolForKey: @"NSPullDown"];
|
||||
[self setPullsDown: pullDown];
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSUsesItemFromMenu"])
|
||||
{
|
||||
BOOL usesItem = [aDecoder decodeBoolForKey: @"NSUsesItemFromMenu"];
|
||||
|
@ -1256,13 +1262,17 @@ static NSImage *_pbc_image[5];
|
|||
{
|
||||
int selectedIdx = [aDecoder decodeIntForKey:
|
||||
@"NSSelectedIndex"];
|
||||
[self selectItem: [self itemAtIndex: selectedIdx]];
|
||||
[self selectItemAtIndex: selectedIdx];
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSPullDown"])
|
||||
else
|
||||
{
|
||||
BOOL pullDown = [aDecoder decodeBoolForKey: @"NSPullDown"];
|
||||
[self setPullsDown: pullDown];
|
||||
}
|
||||
[self selectItemAtIndex: 0];
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSMenuItem"])
|
||||
{
|
||||
NSMenuItem *item = [aDecoder decodeObjectForKey: @"NSMenuItem"];
|
||||
[self setMenuItem: item];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue