mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-26 00:50:56 +00:00
* Source/GSNibLoading.m (NSCustomView): Correct implementation of
-initWithCoder: and remove -awakeAfterUsingCoder:. * Source/NSSound.m: Remove method -awakeAfterUsingCoder:. * Source/NSWindow.m (-_captureMouse:, -_releaseMouse:) Add some debug log code here to simplify debugging these methods. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32460 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3cdc68a09b
commit
de705cc3db
4 changed files with 63 additions and 60 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2011-03-05 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/GSNibLoading.m (NSCustomView): Correct implementation of
|
||||||
|
-initWithCoder: and remove -awakeAfterUsingCoder:.
|
||||||
|
* Source/NSSound.m: Remove method -awakeAfterUsingCoder:.
|
||||||
|
* Source/NSWindow.m (-_captureMouse:, -_releaseMouse:) Add some
|
||||||
|
debug log code here to simplify debugging these methods.
|
||||||
|
|
||||||
2011-03-04 Fred Kiefer <FredKiefer@gmx.de>
|
2011-03-04 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Headers/AppKit/PSOperators.h
|
* Headers/AppKit/PSOperators.h
|
||||||
|
|
|
@ -1038,23 +1038,25 @@ static BOOL _isInInterfaceBuilder = NO;
|
||||||
|
|
||||||
- (id) nibInstantiate
|
- (id) nibInstantiate
|
||||||
{
|
{
|
||||||
Class aClass;
|
|
||||||
|
|
||||||
if ([NSClassSwapper isInInterfaceBuilder])
|
if ([NSClassSwapper isInInterfaceBuilder])
|
||||||
{
|
{
|
||||||
_view = self;
|
_view = self;
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if (_view == nil)
|
||||||
{
|
{
|
||||||
aClass = NSClassFromString(_className);
|
Class aClass;
|
||||||
}
|
|
||||||
|
|
||||||
// If the class name is nil, assume NSView.
|
// If the class name is nil, assume NSView.
|
||||||
if (_className == nil)
|
if (_className == nil)
|
||||||
{
|
{
|
||||||
aClass = [NSView class];
|
aClass = [NSView class];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
aClass = NSClassFromString(_className);
|
||||||
|
}
|
||||||
|
|
||||||
if (aClass == nil)
|
if (aClass == nil)
|
||||||
{
|
{
|
||||||
|
@ -1065,12 +1067,8 @@ static BOOL _isInInterfaceBuilder = NO;
|
||||||
{
|
{
|
||||||
_view = [[aClass allocWithZone: NSDefaultMallocZone()] initWithFrame: [self frame]];
|
_view = [[aClass allocWithZone: NSDefaultMallocZone()] initWithFrame: [self frame]];
|
||||||
}
|
}
|
||||||
|
|
||||||
return _view;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) awakeAfterUsingCoder: (NSCoder *)coder
|
|
||||||
{
|
|
||||||
return _view;
|
return _view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1137,10 +1135,12 @@ static BOOL _isInInterfaceBuilder = NO;
|
||||||
if ([NSClassSwapper isInInterfaceBuilder])
|
if ([NSClassSwapper isInInterfaceBuilder])
|
||||||
{
|
{
|
||||||
self = [super initWithCoder: coder];
|
self = [super initWithCoder: coder];
|
||||||
|
if (self == nil)
|
||||||
|
{
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self != nil)
|
|
||||||
{
|
|
||||||
if ([coder allowsKeyedCoding])
|
if ([coder allowsKeyedCoding])
|
||||||
{
|
{
|
||||||
// get the super stuff without calling super...
|
// get the super stuff without calling super...
|
||||||
|
@ -1168,7 +1168,6 @@ static BOOL _isInInterfaceBuilder = NO;
|
||||||
if (self != _view)
|
if (self != _view)
|
||||||
{
|
{
|
||||||
AUTORELEASE(self);
|
AUTORELEASE(self);
|
||||||
[(NSKeyedUnarchiver *)coder replaceObject: self withObject: _view];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1177,7 +1176,6 @@ static BOOL _isInInterfaceBuilder = NO;
|
||||||
format: @"Can't decode %@ with %@.",NSStringFromClass([self class]),
|
format: @"Can't decode %@ with %@.",NSStringFromClass([self class]),
|
||||||
NSStringFromClass([coder class])];
|
NSStringFromClass([coder class])];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return _view;
|
return _view;
|
||||||
}
|
}
|
||||||
|
|
|
@ -767,11 +767,6 @@ static inline void _loadNSSoundPlugIns (void)
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) awakeAfterUsingCoder: (NSCoder *)coder
|
|
||||||
{
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// NSCopying
|
// NSCopying
|
||||||
//
|
//
|
||||||
|
|
|
@ -5451,11 +5451,13 @@ current key view.<br />
|
||||||
*/
|
*/
|
||||||
- (void) _captureMouse: sender
|
- (void) _captureMouse: sender
|
||||||
{
|
{
|
||||||
|
NSDebugLLog(@"CaptureMouse", @"Capturing the mouse");
|
||||||
[GSCurrentServer() capturemouse: _windowNum];
|
[GSCurrentServer() capturemouse: _windowNum];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) _releaseMouse: sender
|
- (void) _releaseMouse: sender
|
||||||
{
|
{
|
||||||
|
NSDebugLLog(@"CaptureMouse", @"Releasing the mouse");
|
||||||
[GSCurrentServer() releasemouse];
|
[GSCurrentServer() releasemouse];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue