mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Move toolbar ivar from NSWindowTemplate5 to NSWindowTemplate.
This commit is contained in:
parent
eae3f9e991
commit
3ac76af826
4 changed files with 20 additions and 11 deletions
|
@ -1,3 +1,10 @@
|
|||
2020-01-22 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/GSXib5KeyedUnarchiver.m,
|
||||
* Headers/Additions/GNUstepGUI/GSNibLoading.h,
|
||||
* Source/GSXibLoading.m: Move toolbar ivar from NSWindowTemplate5
|
||||
to NSWindowTemplate.
|
||||
|
||||
2020-01-22 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* TextConverters/RTF/rtfScanner.m: Add RTFansicpg.
|
||||
|
|
|
@ -143,6 +143,7 @@ typedef struct _GSWindowTemplateFlags
|
|||
GSWindowTemplateFlags _flags;
|
||||
NSString *_autosaveName;
|
||||
Class _baseWindowClass;
|
||||
NSToolbar *_toolbar;
|
||||
}
|
||||
- (id) initWithWindow: (NSWindow *)window
|
||||
className: (NSString *)windowClass
|
||||
|
|
|
@ -424,6 +424,11 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
_windowStyle |= NSTitledWindowMask;
|
||||
}
|
||||
|
||||
if ([coder containsValueForKey: @"NSToolbar"])
|
||||
{
|
||||
_toolbar = [coder decodeObjectForKey: @"NSToolbar"];
|
||||
}
|
||||
|
||||
_baseWindowClass = [NSWindow class];
|
||||
}
|
||||
else
|
||||
|
@ -455,6 +460,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
[aCoder encodeRect: rect forKey: @"NSWindowRect"];
|
||||
[aCoder encodeObject: _title forKey: @"NSWindowTitle"];
|
||||
[aCoder encodeObject: _autosaveName forKey: @"NSFrameAutosaveName"];
|
||||
[aCoder encodeObject: _toolbar forKey: @"NSToolbar"];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -514,6 +520,10 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
// FIXME: No idea what is going on here
|
||||
[_realObject setToolbar: (NSToolbar*)_viewClass];
|
||||
}
|
||||
if (_toolbar)
|
||||
{
|
||||
[_realObject setToolbar: _toolbar];
|
||||
}
|
||||
|
||||
[_realObject setContentMinSize: _minSize];
|
||||
[_realObject setContentMaxSize: _maxSize];
|
||||
|
|
|
@ -116,7 +116,6 @@ static NSString *ApplicationClass = nil;
|
|||
@interface NSWindowTemplate5 : NSWindowTemplate
|
||||
{
|
||||
BOOL _visibleAtLaunch;
|
||||
NSToolbar *_toolbar;
|
||||
}
|
||||
@end
|
||||
|
||||
|
@ -130,11 +129,8 @@ static NSString *ApplicationClass = nil;
|
|||
_visibleAtLaunch = YES;
|
||||
|
||||
if ([coder containsValueForKey: @"visibleAtLaunch"])
|
||||
_visibleAtLaunch = [coder decodeBoolForKey: @"visibleAtLaunch"];
|
||||
|
||||
if ([coder containsValueForKey: @"NSToolbar"])
|
||||
{
|
||||
_toolbar = [coder decodeObjectForKey: @"NSToolbar"];
|
||||
_visibleAtLaunch = [coder decodeBoolForKey: @"visibleAtLaunch"];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -148,11 +144,6 @@ static NSString *ApplicationClass = nil;
|
|||
// Instantiate the real object...
|
||||
[super nibInstantiate];
|
||||
|
||||
if (_toolbar)
|
||||
{
|
||||
[(NSWindow *)_realObject setToolbar: _toolbar];
|
||||
}
|
||||
|
||||
// >= XIB 5 - startup visible windows...
|
||||
if (_visibleAtLaunch)
|
||||
{
|
||||
|
@ -635,7 +626,7 @@ static NSArray *XmlBoolDefaultYes = nil;
|
|||
// The parent of connections array element is the object ID we need...
|
||||
GSXibElement *parent = [stack objectAtIndex: [stack count] - 1];
|
||||
NSString *parentId = [parent attributeForKey: @"id"];
|
||||
NSString *objKey = [@"IBActionConnection5" isEqualToString: [element attributeForKey: @"class"]] ?
|
||||
NSString *objKey = [@"action" isEqualToString: [element attributeForKey: @"key"]] ?
|
||||
@"destination" : @"source";
|
||||
|
||||
if (parentId == nil)
|
||||
|
|
Loading…
Reference in a new issue