mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
* Headers/AppKit/NSInterfaceStyle.h: Remove GSNativeInterfaceStyle.
* Source/NSComboBoxCell.m (-encodeWithCoder:, -initWithCoder:): Add a few more keyed coding values. Fixes bug #36426. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35146 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
023f0030e2
commit
82a110d152
3 changed files with 53 additions and 13 deletions
|
@ -1,3 +1,10 @@
|
|||
2012-05-07 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/AppKit/NSInterfaceStyle.h: Remove
|
||||
GSNativeInterfaceStyle.
|
||||
* Source/NSComboBoxCell.m (-encodeWithCoder:, -initWithCoder:):
|
||||
Add a few more keyed coding values. Fixes bug #36426.
|
||||
|
||||
2012-05-05 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/GSXibLoader.m: Add some (currently unused) helper code
|
||||
|
|
|
@ -49,13 +49,7 @@ typedef enum {
|
|||
/*
|
||||
* GNUstep specific. Blame: Michael Hanni.
|
||||
*/
|
||||
GSWindowMakerInterfaceStyle = 4,
|
||||
|
||||
/*
|
||||
* GNUstep specific style for native menus.
|
||||
*/
|
||||
GSNativeInterfaceStyle = 5
|
||||
|
||||
GSWindowMakerInterfaceStyle = 4
|
||||
} NSInterfaceStyle;
|
||||
|
||||
APPKIT_EXPORT NSString *NSInterfaceStyleDefault;
|
||||
|
|
|
@ -1546,6 +1546,13 @@ static inline NSRect buttonCellFrameFromRect(NSRect cellRect)
|
|||
{
|
||||
[coder encodeBool: [self hasVerticalScroller] forKey: @"NSHasVerticalScroller"];
|
||||
[coder encodeInt: [self numberOfVisibleItems] forKey: @"NSVisibleItemCount"];
|
||||
[coder encodeBool: [self completes] forKey: @"NSCompletes"];
|
||||
[coder encodeDouble: _intercellSpacing.width forKey: @"NSIntercellSpacingWidth"];
|
||||
[coder encodeDouble: _intercellSpacing.height forKey: @"NSIntercellSpacingHeight"];
|
||||
[coder encodeDouble: [self itemHeight] forKey: @"NSRowHeight"];
|
||||
[coder encodeBool: [self usesDataSource] forKey: @"NSUsesDataSource"];
|
||||
[coder encodeObject: [self dataSource] forKey: @"NSDataSource"];
|
||||
[coder encodeObject: _popUpList forKey: @"NSPopUpListData"];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1579,8 +1586,6 @@ static inline NSRect buttonCellFrameFromRect(NSRect cellRect)
|
|||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
//id delegate = [aDecoder decodeObjectForKey: @"NSDelegate"];
|
||||
// FIXME: This does not match the way GNUstep currently implements
|
||||
// the list of popup items.
|
||||
//id table = [aDecoder decodeObjectForKey: @"NSTableView"];
|
||||
|
||||
if ([aDecoder containsValueForKey: @"NSHasVerticalScroller"])
|
||||
|
@ -1593,16 +1598,50 @@ static inline NSRect buttonCellFrameFromRect(NSRect cellRect)
|
|||
[self setNumberOfVisibleItems: [aDecoder decodeIntForKey:
|
||||
@"NSVisibleItemCount"]];
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSCompletes"])
|
||||
{
|
||||
[self setCompletes: [aDecoder decodeBoolForKey: @"NSCompletes"]];
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSIntercellSpacingWidth"])
|
||||
{
|
||||
_intercellSpacing.width = [aDecoder decodeDoubleForKey:
|
||||
@"NSIntercellSpacingWidth"];
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSIntercellSpacingHeight"])
|
||||
{
|
||||
_intercellSpacing.height = [aDecoder decodeDoubleForKey:
|
||||
@"NSIntercellSpacingHeight"];
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSRowHeight"])
|
||||
{
|
||||
[self setItemHeight: [aDecoder decodeDoubleForKey:
|
||||
@"NSRowHeight"]];
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSUsesDataSource"])
|
||||
{
|
||||
[self setUsesDataSource: [aDecoder decodeBoolForKey:
|
||||
@"NSUsesDataSource"]];
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSDataSource"])
|
||||
{
|
||||
[self setDataSource: [aDecoder decodeObjectForKey: @"NSDataSource"]];
|
||||
}
|
||||
if ([aDecoder containsValueForKey: @"NSPopUpListData"])
|
||||
{
|
||||
ASSIGN(_popUpList, [aDecoder decodeObjectForKey: @"NSPopUpListData"]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOL dummy;
|
||||
id previouslyEncodedButton;
|
||||
|
||||
if ([aDecoder versionForClassName: @"NSComboBoxCell"] < 2)
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &previouslyEncodedButton];
|
||||
// In previous version we decode _buttonCell, we just discard the decoded value here
|
||||
|
||||
{
|
||||
// In previous version we decode _buttonCell, we just discard the decoded value here
|
||||
id previouslyEncodedButton;
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &previouslyEncodedButton];
|
||||
}
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_popUpList];
|
||||
RETAIN(_popUpList);
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_usesDataSource];
|
||||
|
|
Loading…
Reference in a new issue