mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 17:52:42 +00:00
Merge branch 'master' into randr
Conflicts: ChangeLog
This commit is contained in:
commit
216d1f086f
6 changed files with 126 additions and 123 deletions
|
@ -5,16 +5,16 @@ compiler:
|
|||
- gcc
|
||||
env:
|
||||
- LIBRARY_COMBO=gnu-gnu-gnu
|
||||
- LIBRARY_COMBO=ng-gnu-gnu
|
||||
- LIBRARY_COMBO=ng-gnu-gnu BASE_ABI=--disable-mixedabi
|
||||
- LIBRARY_COMBO=ng-gnu-gnu RUNTIME_VERSION=gnustep-1.9
|
||||
- LIBRARY_COMBO=ng-gnu-gnu BASE_ABI=--disable-mixedabi RUNTIME_VERSION=gnustep-1.9
|
||||
- LIBRARY_COMBO=ng-gnu-gnu RUNTIME_VERSION=gnustep-2.0
|
||||
- LIBRARY_COMBO=ng-gnu-gnu BASE_ABI=--disable-mixedabi RUNTIME_VERSION=gnustep-2.0
|
||||
matrix:
|
||||
exclude:
|
||||
- compiler: gcc
|
||||
env: LIBRARY_COMBO=ng-gnu-gnu
|
||||
env: LIBRARY_COMBO=ng-gnu-gnu RUNTIME_VERSION=gnustep-1.9
|
||||
- compiler: gcc
|
||||
env: LIBRARY_COMBO=ng-gnu-gnu BASE_ABI=--disable-mixedabi
|
||||
env: LIBRARY_COMBO=ng-gnu-gnu BASE_ABI=--disable-mixedabi RUNTIME_VERSION=gnustep-1.9
|
||||
- compiler: gcc
|
||||
env: LIBRARY_COMBO=ng-gnu-gnu RUNTIME_VERSION=gnustep-2.0
|
||||
- compiler: gcc
|
||||
|
|
13
ChangeLog
13
ChangeLog
|
@ -7,6 +7,19 @@
|
|||
|
||||
* Source/NSMenu.m (windowDidChangeScreen:): join two if statements.
|
||||
|
||||
2020-02-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/Additions/GNUstepGUI/GSXibLoading.h,
|
||||
* Source/GSXib5KeyedUnarchiver.m,
|
||||
* Source/GSXibLoading.m: Move more behaviour from the
|
||||
IBActionConnection5 and IBOutletConnection5 classes
|
||||
to the original ones.
|
||||
|
||||
2020-02-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* .travis.yml
|
||||
* travis-deps.sh: Try to keep up with Niels' changes in base.
|
||||
|
||||
2020-02-20 Sergii Stoian <stoyan255@gmail.com>
|
||||
|
||||
* Source/NSMenu.m (_setGeometry): take into account main screen
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
|
||||
@interface IBActionConnection: IBConnection
|
||||
{
|
||||
NSString *trigger;
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
|
@ -113,118 +113,6 @@ static NSString *ApplicationClass = nil;
|
|||
|
||||
@end
|
||||
|
||||
@interface IBActionConnection5 : IBActionConnection
|
||||
{
|
||||
NSString *trigger;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation IBActionConnection5
|
||||
|
||||
- (instancetype) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
self = [super initWithCoder: coder];
|
||||
if (self)
|
||||
{
|
||||
trigger = nil;
|
||||
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
// label and source string tags have changed for XIB5...
|
||||
ASSIGN(label, [coder decodeObjectForKey: @"selector"]);
|
||||
ASSIGN(source, [coder decodeObjectForKey: @"target"]);
|
||||
// destination string tag is still the same (so far) and loaded
|
||||
// by base class...
|
||||
//ASSIGN(destination, [coder decodeObjectForKey: @"destination"]);
|
||||
|
||||
// Looks like the 'trigger' attribute should be used to override the
|
||||
// target/action setup method...
|
||||
if ([coder containsValueForKey: @"trigger"])
|
||||
ASSIGN(trigger, [coder decodeObjectForKey: @"trigger"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Can't decode %@ with %@.",NSStringFromClass([self class]),
|
||||
NSStringFromClass([coder class])];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString*) trigger
|
||||
{
|
||||
return trigger;
|
||||
}
|
||||
|
||||
- (void) establishConnection
|
||||
{
|
||||
if (trigger && [trigger length])
|
||||
{
|
||||
SEL sel = NSSelectorFromString(label);
|
||||
NSString *selName = [NSString stringWithFormat: @"set%@%@:",
|
||||
[[trigger substringToIndex: 1] uppercaseString],
|
||||
[trigger substringFromIndex: 1]];
|
||||
SEL trigsel = NSSelectorFromString(selName);
|
||||
|
||||
if (sel && trigsel && [destination respondsToSelector: trigsel])
|
||||
{
|
||||
NSWarnMLog(@"setting trigger %@ to selector %@", selName, label);
|
||||
//[destination setTarget: source]; // Not needed???
|
||||
[destination performSelector: trigsel withObject: (id)sel];
|
||||
}
|
||||
else if (!sel)
|
||||
{
|
||||
NSWarnMLog(@"label %@ does not correspond to any selector", label);
|
||||
}
|
||||
else if (!trigsel)
|
||||
{
|
||||
NSWarnMLog(@"trigger %@ does not correspond to any selector", trigger);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSWarnMLog(@"destination class (%@) does not respond to trigger selector %@",
|
||||
NSStringFromClass([destination class]), selName);
|
||||
}
|
||||
|
||||
// PREMATURE RETURN...
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise invoke the super class' method...
|
||||
[super establishConnection];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface IBOutletConnection5 : IBOutletConnection
|
||||
@end
|
||||
|
||||
@implementation IBOutletConnection5
|
||||
|
||||
- (instancetype) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
self = [super initWithCoder: coder];
|
||||
if (self)
|
||||
{
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
// label string tag has changed for XIB5...
|
||||
ASSIGN(label, [coder decodeObjectForKey: @"property"]);
|
||||
// destination and source string tags are still the same (so far) and loaded
|
||||
// by base class...
|
||||
}
|
||||
else
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Can't decode %@ with %@.",NSStringFromClass([self class]),
|
||||
NSStringFromClass([coder class])];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface IBUserDefinedRuntimeAttribute5 : IBUserDefinedRuntimeAttribute
|
||||
@end
|
||||
|
@ -313,8 +201,8 @@ static NSArray *XmlBoolDefaultYes = nil;
|
|||
@"NSSegmentItem", @"segment",
|
||||
@"NSCell", @"customCell",
|
||||
@"NSCustomObject5", @"customObject",
|
||||
@"IBOutletConnection5", @"outlet",
|
||||
@"IBActionConnection5", @"action",
|
||||
@"IBOutletConnection", @"outlet",
|
||||
@"IBActionConnection", @"action",
|
||||
@"NSNibBindingConnector", @"binding",
|
||||
@"NSWindowTemplate", @"window",
|
||||
@"NSView", @"tableCellView",
|
||||
|
@ -3122,7 +3010,7 @@ didStartElement: (NSString*)elementName
|
|||
return flag;
|
||||
}
|
||||
|
||||
- (NSPoint) decodePointForKey:(NSString *)key
|
||||
- (NSPoint) decodePointForKey: (NSString *)key
|
||||
{
|
||||
NSPoint point = NSZeroPoint;
|
||||
|
||||
|
|
|
@ -421,18 +421,117 @@
|
|||
|
||||
@implementation IBActionConnection
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
DESTROY(trigger);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (instancetype) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
self = [super initWithCoder: coder];
|
||||
if (self)
|
||||
{
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
// label and source string tags have changed for XIB5...
|
||||
if ([coder containsValueForKey: @"selector"])
|
||||
{
|
||||
ASSIGN(label, [coder decodeObjectForKey: @"selector"]);
|
||||
}
|
||||
if ([coder containsValueForKey: @"target"])
|
||||
{
|
||||
ASSIGN(source, [coder decodeObjectForKey: @"target"]);
|
||||
}
|
||||
|
||||
// Looks like the 'trigger' attribute should be used to override the
|
||||
// action setup method...
|
||||
if ([coder containsValueForKey: @"trigger"])
|
||||
{
|
||||
ASSIGN(trigger, [coder decodeObjectForKey: @"trigger"]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Can't decode %@ with %@.", NSStringFromClass([self class]),
|
||||
NSStringFromClass([coder class])];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString*) trigger
|
||||
{
|
||||
return trigger;
|
||||
}
|
||||
|
||||
- (void) establishConnection
|
||||
{
|
||||
SEL sel = NSSelectorFromString(label);
|
||||
|
||||
[destination setTarget: source];
|
||||
[destination setAction: sel];
|
||||
|
||||
if (trigger && [trigger length])
|
||||
{
|
||||
NSString *selName = [NSString stringWithFormat: @"set%@%@:",
|
||||
[[trigger substringToIndex: 1] uppercaseString],
|
||||
[trigger substringFromIndex: 1]];
|
||||
SEL trigsel = NSSelectorFromString(selName);
|
||||
|
||||
if (sel && trigsel && [destination respondsToSelector: trigsel])
|
||||
{
|
||||
NSWarnMLog(@"setting trigger %@ to selector %@", selName, label);
|
||||
[destination performSelector: trigsel withObject: (id)sel];
|
||||
}
|
||||
else if (!sel)
|
||||
{
|
||||
NSWarnMLog(@"label %@ does not correspond to any selector", label);
|
||||
}
|
||||
else if (!trigsel)
|
||||
{
|
||||
NSWarnMLog(@"trigger %@ does not correspond to any selector", trigger);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSWarnMLog(@"destination class (%@) does not respond to trigger selector %@",
|
||||
NSStringFromClass([destination class]), selName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise invoke the normal method...
|
||||
[destination setAction: sel];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation IBOutletConnection
|
||||
|
||||
- (instancetype) initWithCoder: (NSCoder *)coder
|
||||
{
|
||||
self = [super initWithCoder: coder];
|
||||
if (self)
|
||||
{
|
||||
if ([coder allowsKeyedCoding])
|
||||
{
|
||||
// label string tag has changed for XIB5...
|
||||
if ([coder containsValueForKey: @"property"])
|
||||
{
|
||||
ASSIGN(label, [coder decodeObjectForKey: @"property"]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Can't decode %@ with %@.", NSStringFromClass([self class]),
|
||||
NSStringFromClass([coder class])];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) establishConnection
|
||||
{
|
||||
NS_DURING
|
||||
|
|
|
@ -11,10 +11,12 @@ install_gnustep_make() {
|
|||
cd tools-make
|
||||
if [ -n "$RUNTIME_VERSION" ]
|
||||
then
|
||||
echo "RUNTIME_VERSION=$RUNTIME_VERSION" > GNUstep.conf
|
||||
WITH_RUNTIME_ABI="--with-runtime-abi=${RUNTIME_VERSION}"
|
||||
else
|
||||
WITH_RUNTIME_ABI=""
|
||||
fi
|
||||
./configure --prefix=$DEP_ROOT --with-library-combo=$LIBRARY_COMBO --with-user-config-file=$PWD/GNUstep.conf
|
||||
make install
|
||||
./configure --prefix=$DEP_ROOT --with-library-combo=$LIBRARY_COMBO $WITH_RUNTIME_ABI
|
||||
make install
|
||||
echo Objective-C build flags: `$HOME/staging/bin/gnustep-config --objc-flags`
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue