Correction for notification issue and connection problem.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21102 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2005-04-13 00:32:33 +00:00
parent f1ab2ddbb1
commit 13ebd044a8
3 changed files with 31 additions and 19 deletions

View file

@ -1,3 +1,9 @@
2005-04-12 20:27 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormGenericEditor.m: Unsubscribe from all notifications.
* GormCore/GormObjectEditor.m: Correct problem preventing
connections.
2005-04-11 23:24 Gregory John Casamento <greg_casamento@yahoo.com> 2005-04-11 23:24 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormInspectorsManager.m: Send a call to "revert" * GormCore/GormInspectorsManager.m: Send a call to "revert"

View file

@ -176,6 +176,11 @@
// The resource manager is a weak connection and is not retained, // The resource manager is a weak connection and is not retained,
// no need to release it here. // no need to release it here.
RELEASE(objects); RELEASE(objects);
// Remove self from any and all notifications.
[[NSNotificationCenter defaultCenter]
removeObserver: self];
[super dealloc]; [super dealloc];
} }

View file

@ -206,31 +206,32 @@ static NSMapTable *docMap = 0;
- (unsigned) draggingEntered: (id<NSDraggingInfo>)sender - (unsigned) draggingEntered: (id<NSDraggingInfo>)sender
{ {
NSArray *pbTypes = nil;
NSString *type = nil;
NSArray *mgrTypes = nil;
// Get the resource manager first, if nil don't bother calling the rest... // Get the resource manager first, if nil don't bother calling the rest...
dragPb = [sender draggingPasteboard]; dragPb = [sender draggingPasteboard];
pbTypes = [dragPb types];
resourceManager = [(GormDocument *)document resourceManagerForPasteboard: dragPb]; resourceManager = [(GormDocument *)document resourceManagerForPasteboard: dragPb];
if(resourceManager != nil) if(resourceManager != nil)
{ {
NSArray *types; mgrTypes = [resourceManager resourcePasteboardTypes];
NSString *type; type = [mgrTypes firstObjectCommonWithArray: pbTypes];
NSArray *resourceTypes = [resourceManager resourcePasteboardTypes]; }
types = [dragPb types]; if (type != nil)
type = [resourceTypes firstObjectCommonWithArray: types]; {
dragType = type;
if (type != nil) }
{ else if ([pbTypes containsObject: GormLinkPboardType] == YES)
dragType = type; {
} dragType = GormLinkPboardType;
else if ([types containsObject: GormLinkPboardType] == YES) }
{ else
dragType = GormLinkPboardType; {
} dragType = nil;
else
{
dragType = nil;
}
} }
return [self draggingUpdated: sender]; return [self draggingUpdated: sender];