mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 22:01:54 +00:00
For NSPopUpButtonCell keyed unarchiving, fixed broken selection and removed
setAutoenableItems: and -setEnabled: use to match Cocoa doc and behavior. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31585 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ac4fa2c49a
commit
15c2a78b6e
2 changed files with 15 additions and 7 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,9 +1,18 @@
|
|||
2010-11-03 Quentin Mathe <quentin.mathe@gmail.com>
|
||||
|
||||
* Source/NSPopUpButtonCell.m (-initWithCoder:): Fixed broken selection
|
||||
with keyed unarchiver. -selectMenuItem: was given a nil item because
|
||||
the menu was not yet unarchived.
|
||||
Removed setAutoenableItems: and -setEnabled: use to match Cocoa doc
|
||||
and IB behavior. By default, -autoenableItems is YES and is archived
|
||||
by the menu. A popup can be disabled and archived as such.
|
||||
|
||||
2010-11-02 Jonathan Gillaspie <jonathan.gillaspie@testplant.com>
|
||||
|
||||
* Source/NSView.m: Added some basic santity checkts that the views
|
||||
are in windows when converting rectangles.
|
||||
|
||||
22010-10-31 Quentin Mathe <quentin.mathe@gmail.com>
|
||||
2010-10-31 Quentin Mathe <quentin.mathe@gmail.com>
|
||||
|
||||
* Source/NSOpenPanel.m (-runModal): Added. NSOpenPanel overrides
|
||||
NSSavePanel version to take in account -allowedFileTypes as documented
|
||||
|
|
|
@ -1202,6 +1202,11 @@ static NSImage *_pbc_image[5];
|
|||
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
/* First decode menu, menu items must be available to set the selection */
|
||||
menu = [aDecoder decodeObjectForKey: @"NSMenu"];
|
||||
[self setMenu: nil];
|
||||
[self setMenu: menu];
|
||||
|
||||
if ([aDecoder containsValueForKey: @"NSAltersState"])
|
||||
{
|
||||
BOOL alters = [aDecoder decodeBoolForKey: @"NSAltersState"];
|
||||
|
@ -1238,12 +1243,6 @@ static NSImage *_pbc_image[5];
|
|||
BOOL pullDown = [aDecoder decodeBoolForKey: @"NSPullDown"];
|
||||
[self setPullsDown: pullDown];
|
||||
}
|
||||
|
||||
menu = [aDecoder decodeObjectForKey: @"NSMenu"];
|
||||
[self setMenu: nil];
|
||||
[self setMenu: menu];
|
||||
[self setAutoenablesItems: NO];
|
||||
[self setEnabled: YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue