From 34a2fbf83233e3961c1b92862c5270b156393bbc Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Thu, 5 Feb 2004 04:20:43 +0000 Subject: [PATCH] Fix for window focus, and a modification which prevents objects with preset connections from retaining them after they're added to the document. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@18542 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 11 +++++++++++ GormDocument.m | 7 +++++++ Palettes/1Windows/GormNSWindow.m | 5 +++++ 3 files changed, 23 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0dd350f7..b4340110 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2004-02-04 23:13 Gregory John Casamento + + * GormDocument.m: -[GormDocument attachObject:toParent:] + added code to reset the target/action of an object after + it's connection has been added to the connections list. + Since the connections are restored when the .gorm is loaded, + this prevents the target/action from being persisted when + it's not going to get used anyway. + * Palettes/1Windows/GormNSWindow.m: Added -(BOOL)canBecomeMainWindow + implementation to return NO. (suggested by Jeff Tuniessen) + 2004-02-01 18:21 Gregory John Casamento * GormDocument.m: -[GormDocument attachObject:toParent:] diff --git a/GormDocument.m b/GormDocument.m index d632dbbc..e2d173ce 100644 --- a/GormDocument.m +++ b/GormDocument.m @@ -355,6 +355,13 @@ static NSImage *classesImage = nil; [self addConnector: (id)con]; } + // destroy the connection in the object to + // prevent any conflict. The connections are restored when the + // .gorm is loaded, so there's no need for it anymore. + [anObject setTarget: nil]; + [anObject setAction: NULL]; + + // release the connection. RELEASE(con); } } diff --git a/Palettes/1Windows/GormNSWindow.m b/Palettes/1Windows/GormNSWindow.m index 3ac6741e..f2358366 100644 --- a/Palettes/1Windows/GormNSWindow.m +++ b/Palettes/1Windows/GormNSWindow.m @@ -58,4 +58,9 @@ { return _gormStyleMask; } + +- (BOOL) canBecomeMainWindow +{ + return NO; +} @end